+1 800 256 3608 (toll-free in North America) or +49 7531 90 60 10| service@combit.com

Memory leak ??


(Guest) #1

Hello,

I found that after loading CMLL18.DLL, using it, and unloading this DLL, some components remain in memory.

I found this because my app goes to 100% processor utilisation if I check for running applications using the Windows API call GetWindowTextA in USER32.DLL, after loading/unloading CMLL18.DLL

After some investigation and debugging, I found that after creating a PDF file or printing some components remain in memory. The memory usage of the application increases slightly after every loading/unloading CMLL18.DLL !!!
I use LlJobClose() and LLModuleExit() to end the job, and (trying to) unload L&L.
If MUST close my application to unload the L&L components that remain loaded.

I was unable to find the application title. However, I was able to find the ClassName of the module using API call GetClassNameA in USER32.DLL.

These classes are:

  • LL.WndForBroadcasts3218
  • TForm1
  • TPUtilWindow First
  • TPUtilWindow First
  • IME First

These modules do not respond to windows messages, and so my app locks up.

Question 1: Is this by design?
Question 2: If this is by design, why the modules do not respond to windows messages?
Question 3: How can I force unloading L&L dll’s completely, without the need to close/restart my application.

Regards,
Jack Duijf


(Guest) #2

Hi Jack.

thank you for your post.

WndForBroadcasts should close with the last job closed, so if it stays put, it’s most likely a thread problem (creating/closing jobs in differnt threads). A Log file will show that problem (“WRN: window cannot be destroyed”…).

Best regards,

Christian Rauchfuß
Technical Support
combit GmbH


(Guest) #3

Hello Christian,

Thank you for the reply.
I started DebWin3.exe and started my app.
I notice 3 things.

  1. If is start my app with NO DebWin3, the document is created in just a few seconds.
  2. If I start my app with DebWin3 activated, it takes 15 seconds to complete the lines below:

[quote]CMLL18 : 12:57:35.761 00001638/00 8 [XPPRT1.dll] LIC: STANDARD
** WinAdmNet.EXE(PID 5664):Storing [fe80::a093:2672:30a:1654], scope id[10]

** WinAdmNet.EXE(PID 5664):SNMPCleanup
CMLL18 : 12:57:51.470 00001638/00 9 [XPPRT1.dll] WARNING: PrintDlg() failed (CommDlgExtendedError()=PDERR_NODEFAULTPRN) while querying the system for the default printer.
Out of experience, I expect I will not be able to create a DC on that device. But wait and see.
[/quote]
The timeout is just after SNMPCleanup.
There is a default printer assigned in Windows. I Already tried to change the default printer to another device, but same result.
After 15 seconds the log continues.

  1. If is use DebWin3, my application does crash.
    I see a windows dialog saying:

[quote]Microsoft Visual C++ Runtime Library
“This application has requested the Runtime to terminate it in an unusual way”
“Please contact the application’s support team for more information”
[/quote]
I assume it is my app, because DebWin3 remains active.
The Windows tells me that my application is “not responding”, and is terminated.
This behaviour is identical to all my Xbase++ applications that use LL18.
The last few log lines are:

[quote]CMLL18 : 12:57:51.626 00001638/00 4 [XPPRT1.dll] LlPrintStart(1,2,‘C:\Apps_Jds\AbcWinAdmNet\reports\Factuur’,0x00000800,1)
CMLL18 : 12:57:51.626 00001638/00 5 [XPPRT1.dll] [called by CMLL18.DLL]
CMLL18 : 12:57:51.626 00001638/00 6 [XPPRT1.dll] [called by CMLL18.DLL]
CMLL18 : 12:57:51.626 00001638/00 7 [XPPRT1.dll] [called by XPPRT1.dll]
CMLL18 : 12:57:51.626 00001638/00 8 [XPPRT1.dll] [called by XPPRT1.dll]
CMLL18 : 12:57:51.626 00001638/00 9 [XPPRT1.dll] [called by SY_LL18.dll]
CMLL18 : 12:57:51.626 00001638/00 0 [XPPRT1.dll] LIC: clsLicenseInfo::IsAllowed(0,state=00000002)
CMLL18 : 12:57:51.626 00001638/00 1 [XPPRT1.dll] LIC: _nLicState=2
CMLL18 : 12:57:51.626 00001638/00 2 [XPPRT1.dll] >clsApplication::hLibrary(13,1,0,1)
CMLL18 : 12:57:51.626 00001638/00 3 [XPPRT1.dll] >clsApplication::GetLibrary(13,1,0,0)
CMLL18 : 12:57:51.626 00001638/00 4 [XPPRT1.dll] <clsApplication::GetLibrary() -> 0X0DFE0000
CMLL18 : 12:57:51.626 00001638/00 5 [XPPRT1.dll] <clsApplication::hLibrary() -> 0X0DFE0000
CMLL18 : 12:57:51.626 00001638/00 6 [XPPRT1.dll] LlDefineFieldExt(1,‘LL.CountData’,‘255’,0x88008002,00000000)
CMLL18 : 12:57:51.626 00001638/00 7 [XPPRT1.dll] =0 (OK)
CMLL18 : 12:57:51.626 00001638/00 8 [XPPRT1.dll] LlDefineFieldExt(1,‘LL.CountDataThisPage’,‘12’,0x88008002,00000000)
CMLL18 : 12:57:51.626 00001638/00 9 [XPPRT1.dll] =0 (OK)
CMLL18 : 12:57:51.626 00001638/00 0 [XPPRT1.dll] LlDefineFieldExt(1,‘LL.CountPrintedData’,‘140’,0x88008002,00000000)
CMLL18 : 12:57:51.626 00001638/00 1 [XPPRT1.dll] =0 (OK)
CMLL18 : 12:57:51.626 00001638/00 2 [XPPRT1.dll] LlDefineFieldExt(1,‘LL.CountPrintedDataThisPage’,‘10’,0x88008002,00000000)
CMLL18 : 12:57:51.626 00001638/00 3 [XPPRT1.dll] =0 (OK)
CMLL18 : 12:57:51.626 00001638/00 4 [XPPRT1.dll] LlDefineFieldExt(1,‘LL.FCountData’,‘256’,0x88000002,00000000)
CMLL18 : 12:57:51.626 00001638/00 5 [XPPRT1.dll] =0 (OK)
CMLL18 : 12:57:51.626 00001638/00 6 [XPPRT1.dll] LlDefineFieldExt(1,‘LL.FCountDataThisPage’,‘13’,0x88000002,00000000)
CMLL18 : 12:57:51.626 00001638/00 7 [XPPRT1.dll] =0 (OK)
CMLL18 : 12:57:51.626 00001638/00 8 [XPPRT1.dll] LlDefineFieldExt(1,‘LL.FCountPrintedData’,‘141’,0x88000002,00000000)
CMLL18 : 12:57:51.626 00001638/00 9 [XPPRT1.dll] =0 (OK)
CMLL18 : 12:57:51.626 00001638/00 0 [XPPRT1.dll] LlDefineFieldExt(1,‘LL.FCountPrintedDataThisPage’,‘11’,0x88000002,00000000)
CMLL18 : 12:57:51.626 00001638/00 1 [XPPRT1.dll] =0 (OK)
CMLL18 : 12:57:51.626 00001638/00 2 [XPPRT1.dll] LlDefineFieldExt(1,‘FINAL’,’’,0x90000000,00000000)
CMLL18 : 12:57:51.626 00001638/00 3 [XPPRT1.dll] =0 (OK)
CMLL18 : 12:57:51.626 00001638/00 4 [XPPRT1.dll] LlDefineFieldExt(1,‘LL.IsForcedGroupHeader’,‘False’,0x82004000,00000000)
CMLL18 : 12:57:51.626 00001638/00 5 [XPPRT1.dll] =0 (OK)
CMLL18 : 12:57:51.626 00001638/00 6 [XPPRT1.dll] LlDefineVariableExt(1,‘LL.CountDataThisPage’,‘12’,0x88000002,00000000)
CMLL18 : 12:57:51.626 00001638/00 7 [XPPRT1.dll] =0 (OK)
CMLL18 : 12:57:51.626 00001638/00 8 [XPPRT1.dll] LlDefineVariableExt(1,‘LL.CountData’,‘255’,0x88000002,00000000)
CMLL18 : 12:57:51.626 00001638/00 9 [XPPRT1.dll] =0 (OK)
CMLL18 : 12:57:51.626 00001638/00 0 [XPPRT1.dll] LlDefineVariableExt(1,‘LL.CountPrintedDataThisPage’,‘8’,0x88000002,00000000)
CMLL18 : 12:57:51.626 00001638/00 1 [XPPRT1.dll] =0 (OK)
CMLL18 : 12:57:51.626 00001638/00 2 [XPPRT1.dll] LlDefineVariableExt(1,‘LL.CountPrintedData’,‘140’,0x88000002,00000000)
CMLL18 : 12:57:51.626 00001638/00 3 [XPPRT1.dll] =0 (OK)
CMLL18 : 12:57:51.626 00001638/00 4 [XPPRT1.dll] LlDefineVariableExt(1,‘LL.IsForcedPage’,‘True’,0x82000000,00000000)
CMLL18 : 12:57:51.626 00001638/00 5 [XPPRT1.dll] =0 (OK)
CMLL18 : 12:57:51.641 00001638/00 6 [XPPRT1.dll] INF: loading project file ‘C:\Apps_Jds\AbcWinAdmNet\reports\Factuur.lst’/00000000 (FileAttributes=0x00002020, LoadType=normal, r/o)
CMLL18 : 12:57:51.641 00001638/00 7 [XPPRT1.dll] @NOTIF.(code= 60, param=0X0B1975C0, user=00000000)
CMLL18 : 12:57:51.641 00001638/00 8 [XPPRT1.dll] HINT: There is no destination window handle to send the call to. Please use LlSetNotificationCallback(), or pass a valid window handle to LL_OPTION_NOTIFICATIONMESSAGEHWND or API calls, if you need the message.
CMLL18 : 12:57:51.641 00001638/00 9 [XPPRT1.dll] -> 00000000
CMLL18 : 12:57:51.641 00001638/00 0 [XPPRT1.dll] >ResetDevices()
CMLL18 : 12:57:51.641 00001638/00 1 [XPPRT1.dll] <ResetDevices()
CMLL18 : 12:57:51.641 00001638/00 2 [CMLL18.DLL] add printer ‘Samsung CLX-6250 Series PS’ in PAI as AVAILABLE as it can be opened again

[/quote]

My app crashes when executing:

LlPrintStart(::hJob,2,"C:\Apps_Jds\AbcWinAdm\Reports\Factuur",LL_PRINT_NORMAL)
or 
LlPrintStart(::hJob,2,"C:\Apps_Jds\AbcWinAdm\Reports\Factuur",LL_PRINT_NORMAL,0)

Anyway, if I use DebWin3 with any of the Xbase++ samples provided by Combit, then they also crash.
All access to L&L is initiated and completed in the same Xbase++ thread.

How to proceed?

Regards,
Jack Duijf


(Guest) #4

Hi Jack,

thank you for your post.

Please note the hints in our online knowledgebase:

Multithreading with List & Label

If this will not solve the problem, then we will need additional information that cannot be exchanged through the forum platform.I’d suggest to open a support case via our support portal at Please copy any pertinent information from this thread into the case description.

Best regards,

Christian Rauchfuß
Technical Support
combit GmbH