Not enough storage is available to process this command

Hallo @all!

Wir benutzen LL16 mit C# .NET 3.5. Eine ‘einfache’ Konsolenanwendung erstellt uns laufend (sozusagen wie ein kleiner Service) PDF Dateien auf Anfrage.
Es handelt sich hierbei um Listen Projekte (.lst Dateien also), hierbei wird die “Print” Methode der Klasse “ListLabel” verwendet.

All dies passiert auf einem Windows Server 2008 (64-Bit und 32 GB RAM) Server.
Nun erhalten wir ca. 1x in der Woche jedoch von unserer Konsolenanwendung eine Exception die lautet: Not enough storage is available to process this command. Und diese Exception tritt auf nachdem die “Print” Methode der Klasse “ListLabel” aufgerufen wurde.

Speicher ist aber definitiv mehr als genug vorhanden, auch im Temp Ordner ist noch genügend Speicher da.
Die Konsolenanwendung wird nach jeder PDF Erzeugung beendet, somit ist auch der Speicher von dieser Anwendung/Prozess frei gegeben.

Hatte vielleicht jemand von euch schon diesen Fehler? Oder kann uns vielleicht tips geben wie wir hier vorgehen könnten?
Problem ist wie gesagt das die Anwendung ca. 1-2 Wochen lang läuft, und irgendwann kommt der Fehler. Währenddessen wurden aber paar Hundert PDFs erfolgreich erzeugt.

Danke für eure Hilfe!
Viele Grüße

Thomas

Hi,

ich schätze, ohne Logging ist da nicht viel zu machen. -> im Handbuch Kapitel 10.

Paulchen

Hi Paul!

Hab jetzt ein logging durchführen können. Die Logdatei ist allerdings sehr groß (1,6MB) und wirklich schlau werde ich draus auch nicht, da man nicht wirklich erkennen kann worans wohl hängt.
Kann ich dir die Datei mal zuschicken?

Dies hier sind die letzten Zeilen aus dem Log:

CXLL16 : 07:50:09.931 00000d6c/00 1 [mscorwks.dll] LlPrintGetOption(1,18)
CXLL16 : 07:50:09.931 00000d6c/00 2 [mscorwks.dll] =1 (OK (1))
CXLL16 : 07:50:09.931 00000d6c/00 3 [mscorwks.dll] LlPrintGetOption(1,6)
CXLL16 : 07:50:09.931 00000d6c/00 4 [mscorwks.dll] =2147483647 (OK (2147483647))
CXLL16 : 07:50:09.931 00000d6c/00 5 [mscorwks.dll] LlPrintIsFieldUsed(1,‘titelzeile0’)
CXLL16 : 07:50:09.931 00000d6c/00 6 [mscorwks.dll] =0 (OK)
CXLL16 : 07:50:09.931 00000d6c/00 7 [mscorwks.dll] LlPrintIsFieldUsed(1,‘zeile0_spalte1’)
CXLL16 : 07:50:09.931 00000d6c/00 8 [mscorwks.dll] =1 (OK (1))
CXLL16 : 07:50:09.931 00000d6c/00 9 [mscorwks.dll] LlDefineFieldExt(1,‘Zeile0_Spalte1’,’’,0x10000000,0000000000000000)
CXLL16 : 07:50:09.931 00000d6c/00 0 [mscorwks.dll] =0 (OK)
CXLL16 : 07:50:09.931 00000d6c/00 1 [mscorwks.dll] LlDefineFieldExt(1,‘Zeile0_Spalte1’,’{\rtf1\deff0{\fonttbl{\f0 Times New Roman;}{\f1 Symbol;}{\f2 Courier New;}{\f3 Wingdings;}{\f4 Univers;}{\f5 Arial Narrow;}{…’,0x10000000,0000000000000000)
CXLL16 : 07:50:09.931 00000d6c/00 2 [mscorwks.dll] =0 (OK)
CXLL16 : 07:50:09.947 00000d6c/00 3 [mscorwks.dll] LlExprError(1,0X000000001EE6B7C0,16384)
CXLL16 : 07:50:09.947 00000d6c/00 4 [mscorwks.dll] =0 (OK) -> ‘’
CXLL16 : 07:50:09.947 00001548/0c 5 [mscorwks.dll] LlSetNotificationCallback(1,0000000000000000)
CXLL16 : 07:50:09.947 00001548/0c 6 [mscorwks.dll] =0x00000000
CXLL16 : 07:50:09.947 00001548/0c 7 [mscorwks.dll] LlJobClose(1)
CXLL16 : 07:50:09.947 00001548/0c 8 WRN: This job is being closed by a thread that is different from the thread that created it. This might cause trouble.
CXLL16 : 07:50:09.947 00001548/0c 9 [mscorwks.dll] >WRN: a project is still active in this session. Did you forget LlPrintEnd() or LlProjectClose()?
CXLL16 : 07:50:09.947 00001548/0c 0 [mscorwks.dll] >ResetDevices()
CXLL16 : 07:50:09.947 00001548/0c 1 [mscorwks.dll] <ResetDevices()
CXLL16 : 07:50:09.962 00001548/0e 2 [mscorwks.dll] >ResetDevices()
CXLL16 : 07:50:09.962 00001548/0e 3 [mscorwks.dll] <ResetDevices()

Die Variablen und Felder werden wohl alle noch definiert und übergeben, aber irgendwann wird dann wohl abgebrochen. Eine temporäre .ll Datei wird erzeugt, hat jedoch nur 6KB und kann mit dem LLViewer nicht geöffnet werden.

Sehr mysteriös…

Danke für deine Hilfe!
Gruß

Tom

Hi nochmal!

Das ist übrigens die Exception welche geworfen wird (Message und StackTrace):

24.10.2011 08:14:03 Not enough storage is available to process this command
24.10.2011 08:14:03 at System.Windows.Forms.NativeWindow.WindowClass.RegisterClass()
at System.Windows.Forms.NativeWindow.WindowClass.Create(String className, Int32 classStyle)
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Application.ThreadContext.get_MarshalingControl()
at System.Windows.Forms.WindowsFormsSynchronizationContext…ctor()
at System.Windows.Forms.WindowsFormsSynchronizationContext.InstallIfNeeded()
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at combit.ListLabel16.LlCore.LlPrintSetBoxText(String text, Int32 progressPercentage)
at combit.ListLabel16.ListLabel.SimplePrint(Object userData, LlProject projectType, String projectFile, Boolean showFileSelect, LlPrintMode printMode, LlBoxType boxType, IntPtr windowHandle, String dialogTitle, Boolean showPrintOptions, String tempPath)
at combit.ListLabel16.ListLabel.Print(Object userData, LlProject projectType, String projectFile, Boolean showFileSelect, LlPrintMode printMode, LlBoxType boxType, IntPtr windowHandle, String dialogTitle, Boolean showPrintOptions, String tempPath)
at combit.ListLabel16.ListLabel.Print(LlProject projectType, String projectFile, Boolean showFileSelect, LlPrintMode printMode, LlBoxType boxType, String dialogTitle, Boolean showPrintOptions, String tempPath)
at Tuev.LLPrint.LLPrintBase.Print(Object oUserData, String strProjectFile, String strOptionString)

Sehr komisch das ganze…

Gruß
Tom

Das muß, zumindest wie ich das Log deute, an Deinem Code liegen - Du ruft LlJobClose() auf, ohne vorher LlPrintEnd() aaufzurufen. Daher ‘meckert’ LL dann “WRN: a project is still active in this session. Did you forget LlPrintEnd() or LlProjectClose()?”.

Das mit dem “This job is being closed by a thread that is different from the thread that created it. This might cause trouble” würde ich ernst nehmen, da hast Du evtl. ein Dispose() nicht oder falsch aufgerufen.

Daß Du Job 1 nutzt zum Druck ist auch etwas, was Du ändern solltest - combit empfieht einen “Dummy-Job” während der ganzen Laufzeit der App offenzulassen (d.h. am Anfang anlegen und am Schluß schließen, bitt eper Dispose()!), da sonst System-DLLs immer wieder ge- und entladen werden, was Resourcenverluste mit sich bringt. Insbesondere KBTD000795 solltest Du dafür zu Herzen nehmen.