Closed Bug 8106 Opened 26 years ago Closed 26 years ago

Calling 'exit' while closing the top level window (causing the whole app to quit).


(Core Graveyard :: Profile: BackEnd, defect, P3)



(Not tracked)



(Reporter: racham, Assigned: ramiro)



Note (Linux users) : on Linux, at present, clicking on 'StartCommunicator' in
the ProfileManager or clicking on 'Finish' in the CreateProfile Wizard quits the
whole app. Where as on Windows and Mac it launches in to the apprunner as the
result (which is the desired behavior). We are using appshell's TopLevelWindow()
call as a platform for our UI. On executing CloseWindow() of toolkitCore from
JavaScript, on Linux, the final interface that support CloseWindow() call is
calling exit(). Hence the whole app gets closed instead of returning control to
the cpp program that created the top level window (in our case it happened to
be the apprunner [nsAppRunner.cpp] it self).. Windows and Mac are not exhibiting
this exit behavior.

This has a side effect on profile manager. This means, people who are using
Linux, if they have just have 1 profile they will be launched into the apprunner
directly. If they have multiple profiles, they will  be launched in to the
Profile Manager infinitely. The only way out then will be to use 'apprunner -P
<profileOfYourChoice>' to get launched into the apprunner directly.

Blocks: 7016
Component: Apprunner → Profile Manager
QA Contact: leger → gbush
Target Milestone: M7
If this is not fixed for M7, gbush make sure it gets in M7 Release Notes please
apprunner -P profilex will not always launch apprunner with a specified profile.

I created 3 profiles during ProfileManager smoke tests. One smoke test was to
apprunner -P profile2 and that worked.  apprunner -P profile1 or apprunner
-P profile3 always took me back to Profile Manager and the 'loop' mentioned

Please open a new bug for that problem (-P profilx). Let us leave this bug for
Ramiro to keep track of and fix the exit problem on Linux.


I debugged this a big and it seems that exit is being called because the window
count is zero.

Why would the window count be zero on XP code in linux only ?

Maybe there is a rogue refcount somewhere on unix specific code.

I doubt i can fix this for M7.

Would it be ok to document this on the release notes and fix it later ?

Adding slamm to cc.

Marking assigned.
Let's do that (fixing the bug in M8).
Target Milestone: M7 → M8
ok, marking m8.
Blocks: 8237
The other side-effect is that we never get to the label 'done' in AppRunner's
main(). This means that prefs are not saved on Linux.

This is therefore not a profile manager bug. We should never call exit(). The
call to Run() should always return.
Closed: 26 years ago
Resolution: --- → FIXED
Target Milestone: M8 → M7
I just checked in a fix for this.

marking fixed.
builds 1999061908, 1999062008
Component: Profile Manager → Profile Manager BackEnd
Moving all Profile Manager bugs to new Profile Manager Backend component.
Profile Manager component to be deleted.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.