I am trying to ensure my newly developed app is compatible with OS releases 2 and up. When I run gremlins on OS 2.0, I see a memory leak. I don't get this leak in any other OS releases, although I understand that this is not conclusive evidence.
The app is written in C, and compiled with prc-tools and SDK 5.2. It uses lots of gluelib functions. It looks to me like the offscreen window created by the OS to save the form behind the menu is not being freed. This gives me some hope that the problem is actually in the OS and not in my app. If anyone else could weigh in with their comments I would appreciate it. The minimized gremlin sequence that causes the bug is very simple: 1. Start "Wine" 1.0 on a PalmPilot running Palm OS 2.0. 2. Tap the Menu button. 3. Relaunch "Wine". However, if I enter this sequence by hand, I don't see any error; it only happens when replaying the Gremlin_xxx_Events_Min.pev file. I have no idea what the difference is - tracing through the code with gdb didn't reveal any differences. The error log with just "received events" turned on is as follows: 0.000: <- EvtGetEvent: appStopEvent 0.100: <- EvtGetEvent: frmLoadEvent ID: 1000 0.100: <- EvtGetEvent: winEnterEvent Enter: 00001908 Exit: 00000000 Enter Form: "Wine" 0.110: <- EvtGetEvent: frmOpenEvent ID: 1000 35.291: <- EvtGetEvent: appStopEvent 35.431: <- EvtGetEvent: frmLoadEvent ID: 1000 35.431: <- EvtGetEvent: winEnterEvent Enter: 00001908 Exit: 00000000 Enter Form: "Wine" 35.431: <- EvtGetEvent: frmOpenEvent ID: 1000 35.451: <- EvtGetSysEvent: keyDownEvent Key:0x105 (vchrMenu), Modifiers: 0x0008 35.451: <- EvtGetEvent: keyDownEvent Key:0x105 (vchrMenu), Modifiers: 0x0008 35.471: <- EvtGetEvent: winExitEvent Enter: 0000CE3E Exit: 00001908 Exit Form: "Wine" 35.471: <- EvtGetEvent: winEnterEvent Enter: 0000CE3E Exit: 00001908 Exit Form: "Wine" 35.471: <- EvtGetEvent: appStopEvent 35.481: WARNING: ======================================================== 35.481: WARNING: Memory Leaks 35.481: WARNING: ======================================================== 35.481: WARNING: Begin Memory Leak Dump 35.481: WARNING: ======================================================== 35.481: Relocatable chunk leaked at 0x00001D9C, size = 22 35.481: Chunk allocated by: 35.481: WinCreateOffscreenWindow 35.481: WinSaveBits 35.481: InvertInsertionPoint 35.481: InsPtEnable 35.481: MenuDispose 35.481: FrmDeleteForm 35.481: FrmHandleEvent 35.481: SendEventToForm 35.481: FrmCloseAllForms 35.481: AppStop 35.481: WinePalmMain 35.481: PilotMain 35.481: <Unknown @ 0x100A1166> 35.481: SysAppLaunch 35.481: PilotMain 35.481: __Startup__ 35.481: Chunk contents: 35.481: 00 00 3F 00 00 00 00 00 00 00 00 FF 00 00 00 00 ..?............. 35.481: 00 00 00 00 30 00 ....0. 35.481: -------------------------------------------------------- My app doesn't handle the winEnterEvent. Thanks for the help! Dave -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
