You are here

[Closed] mysterious platform crash (Stack Overflow)

17 posts / 0 new
Last post
Simeon
Simeon's picture
Offline
Last seen: 10 years 1 month ago
DeveloperTranslator
Joined: 2006-09-25 15:15
[Closed] mysterious platform crash (Stack Overflow)

Today I updated 3 of my apps and when I clicked the platform icon in my sys tray (Win XP SP3), it made that "blonk" error sound and the icon disappeared. I restarted it and everything was normal.
The same happened several times during the last months when I uninstalled an app.

I know this is one of those incomplete error reports no dev likes but I cant say anything else.

EDIT:
One idea I had is that it happens if I install several apps at the same time or shortly one after the other and the platform hasn't finished refreshing its app list but I couldn't reproduce it on purpose.

depp.jones
Offline
Last seen: 1 hour 31 min ago
DeveloperTranslator
Joined: 2010-06-05 17:19
Me too. I didn't file a bug

Me too. Wink
I didn't file a bug report til now, because I simply had no bug, apart from motiveless crashing from time to time.

I have no precise observation, there are just too many variables involved during day to day use. I "feel" it happens mostly after one or more installations (or updates?).

Reading Simeons post just brought to my mind that it might have something to do with icon refreshing. AFAIR it crashed more often when I fast clicked the menu to start another app when an installation had just finished...

I'll keep an eye open for further details...

3D1T0R
3D1T0R's picture
Offline
Last seen: 3 years 4 months ago
Developer
Joined: 2006-12-29 23:48
I've had a few crashes,

     but most of the time it tells me that it's running out of system resources after it's been running for days, then clicking on the system tray icon (or using Win+Alt+[spacebar]) shows me a black rectangle the size and position that the Menu should be, and if I move my mouse over it it will repeat the message whenever it's over something that should change if it were working properly; and I just right click the system tray icon, click exit and run StartPortableApps.exe again.
perhaps there's a memory leak somewhere that's causing my error, but I doubt that It's the same problem as you're having.

Note: This is happening when I leave the PortableApps.com Menu (2.0 Beta 3) running for days on a Windows XP SP3 machine, from X: which is SUBSTed to a PAtest folder.
I have not seen this behavior in any other situation, but I haven't really been trying to locate the problem either as it occurs rarely, and I just restart it and it's happy again.

EDIT: *facepalm* apparently I never actually updated to Beta 5 (I have the updater, so I must have just copypasted it) in that folder, my bad. Updated to 2.0 Beta 5 will update this thread if it happens again.

~3D1T0R

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 38 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Reproduce?

Can the folks who've had this happen attempt to reproduce it using what you think may be causing it in your setup (installing multiple apps quickly, for example). One possibility is that if the menu is getting a refresh message via windows from an installer while it is in the middle of refreshing, it may not be able to handle it. This would be a relatively rare situation, but possible if you have a bunch of apps and are installing multiple apps via the updater and a small one is installed and finishes before the menu is done refreshing from the last one on a slower drive.

Sometimes, the impossible can become possible, if you're awesome!

depp.jones
Offline
Last seen: 1 hour 31 min ago
DeveloperTranslator
Joined: 2010-06-05 17:19
I'm sorry to tell that it

I'm sorry to tell that it seems nearly impossible to reproduce here on my system.

It crashed just one time the last week, directly after an installation - I think it was the update of SystemExplorer dev test. The Menu just flashed for the split of a second as I clicked the tray icon and was gone. Too fast to see if the refreshing was ongoing (but you don't see it after an installation anyway). There was a flicker of a windows error message (the red circle white cross type), but too fast to be identified...
Maybe I have time to do a thorough test this evening.

A suggestion for one of the next Platform releases: some kind of "active" tray icon that indicates its state may be helpful. I have in mind the PA.com arrow rotating to indicate the Platform is doing something in the background, and a tooltip with something like "refreshing icon list...". I sometimes find it irritating that the menu does not respond even if I know the cause. I know a lot of people who are scared stiff in such cases and think it is broken. Or better: they may have broken something - again. Smile

Simeon
Simeon's picture
Offline
Last seen: 10 years 1 month ago
DeveloperTranslator
Joined: 2006-09-25 15:15
yes

I havent been able to reproduce it either but you description of what happens is far more accurate than mine so I just wanted to say that thats exactly what happened on my PC.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

depp.jones
Offline
Last seen: 1 hour 31 min ago
DeveloperTranslator
Joined: 2010-06-05 17:19
Update: Finally got the error message

After various crashes, mostly after installing a new app - but not always - I only just had the chance to see the error message that I could only vaguely guess before. It said "Stack overflow" and stayed for about 15 seconds until the platform vanished with no action taken.
I have Windows XP running for about 2 days now (with some hibernation time now and then) and started the platform from different drives repeatedly (not running parallel, though). I have done a lot of updating, installing and uninstalling as I maintained my repository drive and local installation and synced some settings so many refreshes have been done. It crashed two times in the meantime, once yesterday and once today, leaving the error message readable

Hope that helps... even if it is just a small hint.

Simeon
Simeon's picture
Offline
Last seen: 10 years 1 month ago
DeveloperTranslator
Joined: 2006-09-25 15:15
yes

it just happened again when I updated a couple of my apps. and the error message was "stack overflow.".

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

Simeon
Simeon's picture
Offline
Last seen: 10 years 1 month ago
DeveloperTranslator
Joined: 2006-09-25 15:15
Reproduced

I think I found what caused this:
I have the platform sit in the systray.
1)Install 10 apps one after the other without clicking on the platform icon
2)then click on the platform icon and it will crash.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

RichardSlade
Offline
Last seen: 13 years 3 months ago
Joined: 2011-05-25 08:27
Stack Overflow

I've had portable apps crash a number of times on me. Each time it's after I've installed a number of applications using downloaded installation files; I have always waited till one installation has finished and I've closed the installation dialogue box before trying to install another. The portable apps menu stays visible throughout the updating procedure and I just select install another application without having to use the tray icon. I've got most of the portable apps programs installed and a few others I counted 288 in total.

After the last successful installation I move the cursor back over the portable apps menu to click to install another application and a box appears saying stack overflow and freezes. I'm using Windows 7 and I usually get another message saying that Portable apps has crashed and offers to close the program otherwise I close it myself. If I continue installing applications after restarting, it usually happens again. I haven't noticed that it happens after a specific number of installations. This happened with both the current portable apps and the new 2.0 beta.

depp.jones
Offline
Last seen: 1 hour 31 min ago
DeveloperTranslator
Joined: 2010-06-05 17:19
That's my experience,

That's my experience, too.
What makes it even more critical is that can happen also when the installations are executed by the updater. So when you wait long enough (several weeks) for a couple of apps being ready for update and then run the updater, it crashes after the update run.
I hope that will be fixed when the new app directory is implemented or it would break that for the affected computers.

BrianCumminger
BrianCumminger's picture
Offline
Last seen: 12 years 7 months ago
Joined: 2011-06-07 00:31
Bug Duplicated (and possible cause)

I experienced this bug 3 times while using 2.0 beta 5 pre 2 and I believe I found the cause. I am using Windows 7 64-bit and experienced some graphical glitches along with the crash. After the platform crashed for the 2nd time and before the process was killed, I went to Process Explorer to examine various attributes of the process and saw that PortableAppsPlatform.exe was holding on to 9,999 GDI handles at the time of the error.

All of the crashes were linked directly to me trying to install dozens of applications (through the 'Manage Apps' -> 'Install A New App' interface) so I'm pretty sure that one of the functions involved is leaking GDI handles. This would also explain the graphical glitches.

My apologies if this bug is different from the one discribed in the topic I'm replying to but it seemed to be the right place for a regular user to reply. I love the Portable Apps platform and I'd be happy to do any additional testing to help fix this bug.

EDIT:
So the GDI handles count stays the same until a new application is finished installing, at which point the handles count increases by about 600-700.

Initial launch:     702
Installed 1 app:   1372
Installed 2 apps:  1979
Installed 3 apps:  2589
Installed 4 apps:  3205
Installed 5 apps:  3827
Installed 6 apps:  4455
Installed 7 apps:  5089
Installed 8 apps:  5729
Installed 9 apps:  6375
Installed 10 apps: 7027
Installed 11 apps: 7683
Installed 12 apps: 8345
Installed 13 apps: 9013
Installed 14 apps: 9687
Installed 15 apps: 9999

At this point the portable apps launcher becomes unresponsive and then crashes. It seems to me that when the list of apps is updated, the old list is not freed from memory.

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 5 months ago
Joined: 2007-04-15 21:08
GDI object leak

I came across this when installing all apps a week ago for validation purposes and reported it to John. It didn't occur to me that it was the same issue as it was here, because I knew precisely what was going wrong in this case: I had the distinct advantage of running it in Wine and so got lots of "err:gdi:alloc_gdi_handle out of GDI object handles, expect a crash" messages in the console (and it did). So I knew immediately that there was a GDI object leak in refreshing the app list. You've confirmed here that these are the same issue; thanks for that.

For testing, Wine is so much more useful than Windows for almost everything. It regularly gives you helpful messages in the console, things like this GDI object leak, or for missing DLLs it'll tell you what it was looking for rather than just "failing to initialise" as Windows will do (and the Dependency Walker won't tend to help for side-by-side assemblies, either - but Wine'll tell you).

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

depp.jones
Offline
Last seen: 1 hour 31 min ago
DeveloperTranslator
Joined: 2010-06-05 17:19
Thanks for investigating!

Thanks for investigating! Good work.
I can completely confirm that. I further looked at it and it can be brought down to the icon refreshing (as Chris said already). I tested installing (via updater, from the platform or by executing a paf-file) and it has the same effect as refreshing the app list.
That explains why it happens more often with my external hdd. It's simply because I have much more apps installed there. I think Simeon also has a long app list, so his setup is more prone to the bug than a usual installation with just a handful of apps.

More information:
My app repository hdd (a mixture of pafs and other portable apps, totalling 175 folders) starts with 1254 GDI handles and adds about 1200 every refresh, so the bug happens much faster (8 times refresh and bang!). That mislead me to thinking it had something to do with the access speed...
A fresh platform stays the same (around 114 GDI handles), one app installed (7zip for testing) adds 6 GDI handles every refresh. A single exe (unlocker portable for testing) adds 4 GDI handles every refresh - unlocker portable has two exe files in its directory by default and therefore adds 8 handles, deleting one exe reduces it to 4.
So, adding portable apps that are not pafs but contain several exes adds to the problem.
Uninstalling every app makes the handles stay constant again (on the risen number though).

Simeon
Simeon's picture
Offline
Last seen: 10 years 1 month ago
DeveloperTranslator
Joined: 2006-09-25 15:15
fixed?

Is this fixed in 2.0 Prerelease 1?

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 38 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Should Be

It should be, but as I didn't run into it much myself, I didn't want to assume it was.

Sometimes, the impossible can become possible, if you're awesome!

depp.jones
Offline
Last seen: 1 hour 31 min ago
DeveloperTranslator
Joined: 2010-06-05 17:19
I' sorry to tell that the

I' sorry to tell that the creep up of GDI handles still exists. I did not do the counting again, but simply refreshing my test installation of RC 1.1 crashed it after about 15 to 20 times (abot 90 Apps installed, GDI handles reached 10.000).

Log in or register to post comments