Closed Bug 554911 Opened 10 years ago Closed 10 years ago

[QT] mozilla-runtime process hang and not closed properly after closing fennec UI

Categories

(Core :: IPC, defect)

x86
Linux
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: romaxa, Assigned: romaxa)

References

Details

Attachments

(3 files, 1 obsolete file)

Try to compile latest e10s branch with Qt port.
Open Fennec, load some page, close fennec.
UI process closed, but child process not, eating all CPU

Connect with GDB show this backtrace:
#0  0x40038c84 in pthread_join (threadid=1145328768, thread_return=0x0) at pthread_join.c:89
#1  0x4123d628 in base::Thread::Stop (this=0x25a60)
    at mozilla/ipc/chromium/src/base/thread.cc:114
#2  0x41247b14 in ~ChildProcess (this=0xbef279d0)
    at mozilla/ipc/chromium/src/chrome/common/child_process.cc:33
#3  0x406594f4 in XRE_InitChildProcess (aArgc=<value optimized out>, aArgv=<value optimized out>, aProcess=GeckoProcessType_Content)
    at mozilla/toolkit/xre/nsEmbedFunctions.cpp:384
#4  0x000086a8 in main (argc=3, argv=0xbef27b64)
    at mozilla/ipc/app/MozillaRuntimeMain.cpp:87
Blocks: 516521
Attached file Full backtrace
Attached patch Fixed qApp init and deinit. (obsolete) — Splinter Review
Attachment #435373 - Flags: review?(dougt)
Attachment #435373 - Flags: review?(dougt) → review-
Comment on attachment 435373 [details] [diff] [review]
Fixed qApp init and deinit.

+  if (!qApp && !sQApp)

where is qApp?  You should probably comment about the life of these objects.

Also, I think you should probably move all of this functionality/logic into a static class and have that own sQApp.
> where is qApp?  You should probably comment about the life of these objects.
qApp - is global static pointer to QApplication (if it was initialized before it is not null), if it is null, then we should create our own, and keep reference pointer.

> 
> Also, I think you should probably move all of this functionality/logic into a
> static class and have that own sQApp.

Where that class should live?
Assignee: nobody → romaxa
Attachment #435373 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #435725 - Flags: review?(dougt)
Comment on attachment 435725 [details] [diff] [review]
QApp instance moved into separate class


>+
>+extern int    gArgc;
>+extern char **gArgv;

Where are these from?  When using extern, please reference where you think they should be declared.

>+nsQAppInstance *nsQAppInstance::mQAppInstance = NULL;
>+int nsQAppInstance::mQAppRefCount = 0;

I think these should be sQAppInstance given that this class is static?
                        ^

>+
>+void nsQAppInstance::Release(void) {
>+  if (mQAppRefCount && !--mQAppRefCount) {

you mean (mQAppInstance && !--mQAppRefCount) {


 r+ if you fix the above.
Attachment #435725 - Flags: review?(dougt) → review+
Attached patch Patch for m-cSplinter Review
Attachment #435826 - Flags: review?(dougt)
Attachment #435826 - Flags: review?(dougt) → review+
http://hg.mozilla.org/mozilla-central/rev/2126aeac778b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.