Problem with SAVE-APPLICATION (was hellowin.exe crashes)
Roger Corman <[email protected]> Thu, 16 Oct 2003 22:17:43 -0700
| Newsgroups | gmane.lisp.corman |
|---|---|
| Message-ID | <[email protected]> |
Hi Willem, I recently noticed and have fixed a problem which causes this behavior. This affects version 2.5 as well as 2.01 (and 2.0) but shows up more in 2.5. I have not released the patch for this yet but plan to do so in the near future. The problem: If you use the Corman Lisp IDE to create an application, using SAVE-APPLICATION, the application may not run correctly (may silently crash, or otherwise) on startup. Workaround: Use the console, CLCONSOLE.EXE, to create applications. What's going on: My implementation of SAVE-IMAGE is used to save an entire, live lisp heap image. This is used by SAVE-APPLICATION, where the image is attached as a resource to an executable. At the time I implemented SAVE-IMAGE, I knew that it may have problems if multiple threads were running--however, it is generally not used in that situation. This probably deserved some notes in the documentation. However, I didn't think it likely that users would be running multiple threads and attempting to create applications at the same time. In 2.0, I added Direct Call capabilities, and the IDE started up a separate lisp thread for doing various functions. Its use was limited, but has expanded substantially in 2.5. I believe this additional thread causes problems with SAVE-APPLICATION, by causing problems with SAVE-IMAGE. The SAVE-IMAGE function does a level 3 garbage collection to clear out any ephemeral heaps, and then does its work. Another thread could cause the ephemeral heap to keep allocating, thus invalidating the saved heap (the ephemeral heaps are not saved, and any pointers into them from the primary heap will cause problems). I have fixed this problem in the kernel, by suspending other threads during SAVE-IMAGE. I will release this code and an updated kernel in a patch soon. Until then, please use the clconsole application to create applications. Roger -------------------------------------- At 08:08 AM 10/15/2003, you wrote: >Hi all -- Probably I'm overlooking something. > >Using either > (load "examples/hellowin.lisp") > (save-application "hellowin" #'win::hellowin) > >or > Lisp -> Execute File... , choosing 'examples/hellowin.lisp' > (save-application "hellowin" #'win::hellowin) > >and making sure hellowin.wav is in the same directory as the >hellowin.exe, I get the following exception when running the >executable. It's in Dutch; "ongeldige pagina" means "invalid page". > >HELLOWIN heeft een fout met betrekking tot een ongeldige pagina >veroorzaakt in >module KERNEL32.DLL op017f:bff87eb5. >Registers: >EAX=c00300f0 CS=017f EIP=bff87eb5 EFLGS=00010212 >EBX=00fd01f8 SS=0187 ESP=00fcffbc EBP=00fd0028 >ECX=00000001 DS=0187 ESI=0076c244 FS=4d6f >EDX=000000c8 ES=0187 EDI=012e0005 GS=0000 >Bytes in CS:EIP: >53 56 57 8b 30 83 7d 10 01 8b 4e 38 89 4d f8 75 >Stackdump: > > >- Willem > > > >To unsubscribe from this group, send an email to: >[email protected] > > > >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ ------------------------ Yahoo! Groups Sponsor ---------------------~--> Rent DVDs from home. Over 14,500 titles. Free Shipping & No Late Fees. Try Netflix for FREE! http://us.click.yahoo.com/mk9osC/hP.FAA/3jkFAA/SyjtlB/TM ---------------------------------------------------------------------~-> To unsubscribe from this group, send an email to: [email protected] Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/