Jump to content

Question: WM 6.5 closes applications by itself ?


Guest zagzag99

Recommended Posts

Guest naynada
forget what I've said, I think it's a problem of memory...

when I reach 60% it starts to close programs

so what i've made it's just free some memory... not solving the problem...

Yup, I now also think it is to do with memory.

I've just flashed Khuanchai's latest rom (the 20 July one) and since there's plenty of RAM available (compared to when I was running sector's) I'm now able to simultaneously run S2P and MS Reader!

Yayy! ;)

Link to comment
Share on other sites

Guest GodsGift
Yup, I now also think it is to do with memory.

I've just flashed Khuanchai's latest rom (the 20 July one) and since there's plenty of RAM available (compared to when I was running sector's) I'm now able to simultaneously run S2P and MS Reader!

Yayy! ;)

So this now does point towards it being a native winmo 6.5 issue.

Interesting as there are threads stating its a problem with mobile shell 3

Does anyone have a solution to stop the autokill happening?

I've tried the registry change for the HTC taskmanager autokill. If its inherent within winmo 6.5 then its gonna be hard to stop unless, as naynada said, we flash to a custom VERY lite rom.

GG

Link to comment
Share on other sites

Guest gentoo52

i now have the new 23007 ROM from Ryrzy. with this one, and earlier one from him i had no more problems! great! ;)

it is also quite fast, the only downside is that, as i belive, it doesnt come with samsung/ms apps - for those who care.

sector and khuanchai ship their latest ROMs also without HTC Task Manager - maybe that solved the problem too??

Greetz,

gentoo

Link to comment
Share on other sites

Guest GodsGift

yup i am currently testing sectors 23009 rom and so far so good but need to do some more testing before confirming behaviour.

Cheers,

GG

Link to comment
Share on other sites

  • 2 weeks later...
Guest zymmer

I'm using Sector 23009 M2D and the problem is there....Just a question of how many memory do u have left.....As soon as memory in use exceeds 50MB or so start killing things.....

I use M2D, Inesoft Phone, Touchpal, GAlarm, S2U2 that are persistent and that reduce my free memory from statup (45MB os average usage from soft reset)....If you dont have it maybe you will not normally see the problem, just try to open enough application to fullfil 60MB of usage....

Link to comment
Share on other sites

Guest naynada
I'm using Sector 23009 M2D and the problem is there....Just a question of how many memory do u have left.....As soon as memory in use exceeds 50MB or so start killing things.....

I use M2D, Inesoft Phone, Touchpal, GAlarm, S2U2 that are persistent and that reduce my free memory from statup (45MB os average usage from soft reset)....If you dont have it maybe you will not normally see the problem, just try to open enough application to fullfil 60MB of usage....

Yep, I'm still using Khuanchai's rom as I said earlier...and after progressively installing more programs (like you, Touchpal, GAlarm, S2U2, ph0nex etc) the autokilling kicks in again. Yeah, 50MBish does seem to be the cutoff point.

Am quite reluctant to reflash to anything until it is absolutely certain that the "bug is fixed"/"feature is removed". :)

Link to comment
Share on other sites

Guest eduuuuu

Any solution yet?

Still happening with me

using kuanchai July 24th ROM

maybe a conflict with one of following?

s2u2

s2p

spb mobile shell 3 (latest)

wktask

pocketalarm

samsung's clock

touch response

tks a lot.

Link to comment
Share on other sites

Guest zymmer

Hi,

I am back to Khuanchai 23001 3-in-1 (8MB pagepool) and this problem is gone, i can rise memory usage to 90% with no problem....

My theory is that after 23001 Msoft included/enabled/modified this feature to prevent memory starvation and maybe is not well ported to Omnia, and feature thinks that memory is critically down when is not.....Can someone else try to check this theory?. Would be nice if someone that says that it has no problem of this kind trying to open 5 or 6 memory hunger applocations (Opera with a newpaper web with lot of photos and flash, Internet Explorer with the same newspaper web, Google Maps, Live Search) and try to rise memory usage to 90%....

Regards,

Zymmer

Link to comment
Share on other sites

Guest zman919

Damn annoying issue, to be sure. Depending on the # of startup apps I have, I can't keep anything additional apps running in the background (including tmail). I've been up and down the OOM threshold registry settings and similar posts on other forums and can't come to any concrete conclusion other than 50MB free seems to be my magic amount, after which WM 6.5 starts closing idle apps.

FYI -- running Adryn's 6.5 CF03 2.0 base. Problem is definitely there.

Link to comment
Share on other sites

Guest zman919

Just noodling on this a bit. Here's what I've come across..

http://msdn.microsoft.com/en-us/library/bb158569.aspx

From that, it would appear the thresholds are pretty low -- certainly far lower than where I (and others) seem to experience problems. Likewise, changing registry values as noted here....

http://msdn.microsoft.com/en-us/library/aa924972.aspx

... doesn't seem to do diddly.

I do wonder if it's possible to protect processes from TerminateProcess (and other memory-management messages sent from the shell) via this type of approach.... http://www.rootkit.com/newsread.php?newsid=139

Link to comment
Share on other sites

Guest zman919

More interesting info. It's a bit dated, but I've seen enough write-ups by those-in-the-know that WM5 and WM6 memory management are similar enough that this probably applies quite well. Plus, it's the best write-up I've found in terms of clear description.

http://blogs.msdn.com/wmshell/archive/2006/05/25/607263.aspx

A couple thoughts spring to mind...

Find and hook SHCloseApps()

Retroactively apply WS_EX_TOOLWINDOW to top-level windows you want to always remain open and untouched by SHCloseApps()

Link to comment
Share on other sites

Guest Root-dir

well ive been digging around my registry and i think HKEY_CURRENT_USER\Performance has something to do with this.

it inculdes HKEY_CURRENT_USER\Performance:Available RAM on boot which I belive is only set to about half the memory we have avalible on our devices

the other area i think might be of intrest is HKEY_LOCAL_MACHINE\System\OOM I think OOM is Out Of Memory

Im curious to see what these values reflected in the pre 6.5 stock roms what i think has happend is our 6.5 roms are based of a base level device and the system thinks theres far less memory than there acctualy is.

I will do some digging through msdn looks like one of you already has I dont have time to look at it more right at the moment but I will mess with this later today when I get a chance because there are some things in 6.5 that i really dont want to give up but may if we cant get this fixed

Link to comment
Share on other sites

Guest zman919
well ive been digging around my registry and i think HKEY_CURRENT_USER\Performance has something to do with this.

it inculdes HKEY_CURRENT_USER\Performance:Available RAM on boot which I belive is only set to about half the memory we have avalible on our devices

the other area i think might be of intrest is HKEY_LOCAL_MACHINE\System\OOM I think OOM is Out Of Memory

Im curious to see what these values reflected in the pre 6.5 stock roms what i think has happend is our 6.5 roms are based of a base level device and the system thinks theres far less memory than there acctualy is.

I will do some digging through msdn looks like one of you already has I dont have time to look at it more right at the moment but I will mess with this later today when I get a chance because there are some things in 6.5 that i really dont want to give up but may if we cant get this fixed

Yes, OOM is Out Of Memory. Unfortunately taking all the values down to near-zero levels didn't change functionality one bit. Some of my reads indicate that OOM settings have more to do with presenting messages rather than actually affecting how WM kills idle apps.

Link to comment
Share on other sites

Guest zman919

Made somewhat interesting progress today. I wrote a small app that injects a wrapper around target applications. This wrapper assumes the role of the parent for the target app's window. The wrapper itself is a tool window, and as such isn't subject to memory-based shutdowns from the OS.

It's pretty inefficient, but an interesting proof of concept. Working to clean it up a bit more.

Link to comment
Share on other sites

Guest Root-dir
Made somewhat interesting progress today. I wrote a small app that injects a wrapper around target applications. This wrapper assumes the role of the parent for the target app's window. The wrapper itself is a tool window, and as such isn't subject to memory-based shutdowns from the OS.

It's pretty inefficient, but an interesting proof of concept. Working to clean it up a bit more.

mind sharing your source im still learning my way around this obnoxious visual studio thing as well as the winmo sdk...

Link to comment
Share on other sites

Guest eduuuuu

Ive tried kuanchai hybrid ROM (lastest 2-Aug)... and the problem was still there

I've changed to Ryrzy ROM (hybrid 23016/21928 DXID1) - and the problems seems to be gone!

I have installed all the applications that I thought would cause this problem.. and nothing bad happened yet. (s2u2, s2p, wktask, pocketalarm, sktools, Mobile Shell3, MS3Config)

There is one thing I haven't done: (optimized to performance inside sktools) -> if someone experience the problem with Ryrzy's rom... maybe the problem is on that one procedure I havent done?

Edited by eduuuuu
Link to comment
Share on other sites

Guest shadowsjc

i had the same issue on 6.1 with manila 2d installed.. it would close anything i opened if i had more than 3-4 apps running at the same time. i havent seen that yet on my current 6.5 ROM (bgill's' 1.4.2), but then again i also havent had too many apps open simultaneously.

Link to comment
Share on other sites

Guest zman919

Curiouser and Curiouser.

I don't think this is purely a RAM availability issue. According to all the various docs I've read, a WM_HIBERNATE should be sent first in an OOM situation. However, I don't see a WM_HIBERNATE hitting my test app. I do, however, see a WM_CLOSE being sent immediately upon opening a second app. So I have a situation that isn't following the spec, and isn't truly a RAM availability issue (I have well over 50MB available).

(*edit* and it then gets killed outright by the shell via TerminateProcess(), despite the WM_CLOSE being caught and ignored by my test apps. This follows the spec).

What I can't easily confirm is a resource availability issue. However, if I wrap all my test apps in my Protector wrapper (ie, assign their windows to ToolWindow-based host apps), nothing gets closed (which makes sense, since these apps don't receive WM_CLOSE messages).

Nothing falls down, either. That is, if there was truly a resource availability issue building up, something should corrupt. I haven't run serious stress tests on this premise, but it's something to chase.

I wonder if there's a limit on the number of top-level apps (ie, those with traditional top-level windows) that can be running concurrently. This would explain why I can continue to add service-type startup apps at will, but can't seem to run more than a couple sessions of simple test apps.

Down the rabbit hole I go. :)

Edited by zman919
Link to comment
Share on other sites

Guest zman919

This is explaining some behavior I've seen with Palringo as well. Palringo starts as a window-less service-type app. When it gets an IM, it creates a window. This window hangs around if the app is "closed" (catches the close and instead deactivates the app). However, the window probably expects a WM_HIBERNATE if there's a memory issue, at which point it would (I imagine), close the window but keep the service part of the app running.

However, what happens (I believe) is that it gets a WM_CLOSE and then a TerminateProcess(). This explains why Palringo runs idefinitely for me until I get an IM, and then quickly closes on me as I open another app.

This bug is freakin annoying.

Link to comment
Share on other sites

Guest naynada
Made somewhat interesting progress today. I wrote a small app that injects a wrapper around target applications. This wrapper assumes the role of the parent for the target app's window. The wrapper itself is a tool window, and as such isn't subject to memory-based shutdowns from the OS.

It's pretty inefficient, but an interesting proof of concept. Working to clean it up a bit more.

An impressive analysis, zman :)

Well, if your app is successful, it will definitely benefit many, many people in the interim! (if MS decides/manage to correct this bug; otherwise, a long term fix =P)

If it's worth anything, after flashing a billion times between Sector, Khuanchai, Shokka, I finally have a somewhat stable setup, where I'm able to solidly run 2 apps simultaneously.

Funny thing is, after a soft reset it will gladly run 4 apps simultaneously (it'll kill a 5th app)...but after a period of usage it'll refuse to do so and limit itself back to 2 apps...

No. processes @ boot = 23 (including the taskmanager or memmaid) and RAM = ~58MB.

=/

Anyway, keep up the good work zman! =]

Link to comment
Share on other sites

Guest JaGuR
Hi,

It seems WM6.5 never kills igo.

It kills other applications randomly, even manila.

Is there a way to start apps like IGO?

Vagika

Any Idea of how many Apps we can get away with running before this bug comes into play ?

And being a bit of a Noob, does this not effect processes and just applications ?

Cheers

Link to comment
Share on other sites

Guest zman919
Yes, this is an incredibly irritating bug.

On WM6.1, I was able to listen to music (via S2P) and read ebooks (MS Reader) at the same time.

Now, on Sector's WM6.5, S2P will ALWAYS, without fail, close whenever I multitask anything at all.

Disabling HTC Taskmanager's AutoKill, and reducing the AutoKill memory threshold seems to have little/no effect.

However, at one stage, I did disable a couple of mortscripts which were sucking CPU cycles, and that helped a lot. But the problem has resurfaced, and I've no idea why.

A real pain in the ass. Hope this is resolved sometime.

For what it's worth, Conduit's PocketPlayer doesn't suffer from this issue. It runs a separate, windowless thread for playback, so even if the window is force closed by WM, music continues uninterrupted. Re-running PocketPlayer re-opens the window as it was (this, by the way, is the "official Windows Mobile 6 Certified logo" approach to application self-management, as I've unfortunately become well-acquainted with over the last few days)

Link to comment
Share on other sites

Guest zman919
Hi,

It seems WM6.5 never kills igo.

It kills other applications randomly, even manila.

Is there a way to start apps like IGO?

Vagika

When iGo is minimized it closes its window itself and remains resident in a non-UI process. This way it isn't subject to WM memory management. In all honesty, this is the correct way to write apps for WM, especially apps that are desirable to keep running "no matter what".

This is also the basis for the EverApp (lack of better name for now) utility I'm working on -- hooking existing windows to UI-less parent threads.

Edited by zman919
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.