naynada, on Aug 4 2009, 23:39, said:
An impressive analysis, zman

Be impressed when I can fix it.
So to recap, WM6.5 kills top-level window applications unexpectedly, violently and with (apparently) plenty of RAM available. It's like a more malevolent version of the HTC task manager task killer.
I've tried every reg hack I could come across / think of, and none of them worked. This includes...
Setting all the OOM reg values to zero
The DorkMemory/WM5 hack
The AutoOOM hack
I don't think it's a process count issue, because I can load up on startup apps and they all run without issue. I also don't think it's purely a window count issue, because early after boot I can run 3-4 windowed apps concurrently without issue, but after a while I'm down to 1-2.
I also don't see this is a classic OOM condition, because the WM messages aren't firing according to spec (that is, no WM_HIBERNATE is sent). Perhaps MS changed the spec on OOM conditions.... but I'll be damned if 50MB free is an "out of memory" condition.
I also tested the notion of available RAM after bootup being some sort of threshold for this behavior. I added a startup app that reserved 20MB, and then killed it after a couple minutes. The problem persisted... so it doesn't seem to care about available RAM (I noticed the Available RAM at Boot Time registry entry *did* include my artifical 20MB consumption).
So I'm back to EverApp... the utility I'm writing that re-casts an apps window as a child of a ToolWindow app (which is immune from the window killer). It's just very kludgy right now... may not be something I can do in managed code... we'll see.The other option is to decompile shell32.exe and/or coredll.dll and nuke whatever subroutine is responsible for this, but my skills at decompiling in the CF world aren't that great (and the subsequent fix would require re-packaging into cooked ROMs, which I'm trying to avoid if possible).
This post has been edited by zman919: 05 August 2009 - 06:41 PM