Last Comment Bug 717156 - B2G telephony: crash after page reload due to improper callback unregistering
: B2G telephony: crash after page reload due to improper callback unregistering
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Device Interfaces (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla12
Assigned To: Philipp von Weitershausen [:philikon]
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks: webtelephony
  Show dependency treegraph
 
Reported: 2012-01-10 22:39 PST by Philipp von Weitershausen [:philikon]
Modified: 2012-01-12 11:00 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 (1.67 KB, patch)
2012-01-11 13:42 PST, Philipp von Weitershausen [:philikon]
bent.mozilla: review+
Details | Diff | Splinter Review

Description Philipp von Weitershausen [:philikon] 2012-01-10 22:39:48 PST
This is a Firefox desktop build with --enable-b2g-ril and a stupidly simple phone app.

Backtrace:

#0  0x00007f487cf0651d in nanosleep () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f487cf063bc in sleep () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007f4877c9e3fd in ah_crap_handler (signum=11)
    at /home/philipp/dev/mc.hg/toolkit/xre/nsSigHandlers.cpp:121
#3  0x00007f4877ca40ac in nsProfileLock::FatalSignalHandler (signo=11, 
    info=0x7fffdacaa670, context=0x7fffdacaa540)
    at /home/philipp/dev/mc.hg/obj-ff-dbg/toolkit/profile/nsProfileLock.cpp:226
#4  <signal handler called>
#5  0x00007f48787fe9ba in mozilla::dom::telephony::Telephony::TelephoneCallback::CallStateChanged (this=0x7f485b8d3fc0, callIndex=1, callState=11, number=...)
    at /home/philipp/dev/mc.hg/dom/telephony/Telephony.h:146
#6  0x00007f487946161d in NS_InvokeByIndex_P (that=0x7f485b8d3fc0, 
    methodIndex=3, paramCount=3, params=0x7fffdacaac20)
    at /home/philipp/dev/mc.hg/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_unix.cpp:195
#7  0x00007f4878caa7c7 in CallMethodHelper::Invoke (this=0x7fffdacaabe0)
    at /home/philipp/dev/mc.hg/js/xpconnect/src/XPCWrappedNative.cpp:2899
#8  0x00007f4878ca860d in CallMethodHelper::Call (this=0x7fffdacaabe0)
    at /home/philipp/dev/mc.hg/js/xpconnect/src/XPCWrappedNative.cpp:2230
#9  0x00007f4878ca84a4 in XPCWrappedNative::CallMethod (ccx=..., 
    mode=XPCWrappedNative::CALL_METHOD)
    at /home/philipp/dev/mc.hg/js/xpconnect/src/XPCWrappedNative.cpp:2196
#10 0x00007f4878cb594e in XPC_WN_CallMethod (cx=0x7f487c8be5f0, argc=3, 
---Type <return> to continue, or q <return> to quit---
    vp=0x7f48643fe288)
    at /home/philipp/dev/mc.hg/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:1540
#11 0x00007f48799929b3 in js::CallJSNative (cx=0x7f487c8be5f0, 
    native=0x7f4878cb56f0 <XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*)>, args=...) at /home/philipp/dev/mc.hg/js/src/jscntxtinlines.h:311
#12 0x00007f4879977860 in js::InvokeKernel (cx=0x7f487c8be5f0, args=..., 
    construct=js::NO_CONSTRUCT)
    at /home/philipp/dev/mc.hg/js/src/jsinterp.cpp:520
#13 0x00007f48798ddc39 in js::Invoke (cx=0x7f487c8be5f0, args=..., 
    construct=js::NO_CONSTRUCT)
    at /home/philipp/dev/mc.hg/js/src/jsinterp.h:157
#14 0x00007f487992ab0a in js_fun_apply (cx=0x7f487c8be5f0, argc=2, 
    vp=0x7f48643fe268) at /home/philipp/dev/mc.hg/js/src/jsfun.cpp:1657
#15 0x00007f48799929b3 in js::CallJSNative (cx=0x7f487c8be5f0, 
    native=0x7f487992a880 <js_fun_apply(JSContext*, unsigned int, JS::Value*)>, args=...) at /home/philipp/dev/mc.hg/js/src/jscntxtinlines.h:311
#16 0x00007f4879977860 in js::InvokeKernel (cx=0x7f487c8be5f0, args=..., 
    construct=js::NO_CONSTRUCT)
    at /home/philipp/dev/mc.hg/js/src/jsinterp.cpp:520
#17 0x00007f48799851a6 in js::Interpret (cx=0x7f487c8be5f0, 
    entryFrame=0x7f48643fe0d0, interpMode=js::JSINTERP_NORMAL)
    at /home/philipp/dev/mc.hg/js/src/jsinterp.cpp:3013
#18 0x00007f4879977614 in js::RunScript (cx=0x7f487c8be5f0, 
---Type <return> to continue, or q <return> to quit---
    script=0x7f486369d350, fp=0x7f48643fe0d0)
    at /home/philipp/dev/mc.hg/js/src/jsinterp.cpp:475
#19 0x00007f4879977951 in js::InvokeKernel (cx=0x7f487c8be5f0, args=..., 
    construct=js::NO_CONSTRUCT)
    at /home/philipp/dev/mc.hg/js/src/jsinterp.cpp:538
#20 0x00007f48798ddc39 in js::Invoke (cx=0x7f487c8be5f0, args=..., 
    construct=js::NO_CONSTRUCT)
    at /home/philipp/dev/mc.hg/js/src/jsinterp.h:157
#21 0x00007f487992ad5e in js::CallOrConstructBoundFunction (cx=0x7f487c8be5f0, 
    argc=1, vp=0x7f48643fe0a0) at /home/philipp/dev/mc.hg/js/src/jsfun.cpp:1781
#22 0x00007f48799929b3 in js::CallJSNative (cx=0x7f487c8be5f0, 
    native=0x7f487992ab68 <js::CallOrConstructBoundFunction(JSContext*, unsigned int, JS::Value*)>, args=...)
    at /home/philipp/dev/mc.hg/js/src/jscntxtinlines.h:311
#23 0x00007f4879977860 in js::InvokeKernel (cx=0x7f487c8be5f0, args=..., 
    construct=js::NO_CONSTRUCT)
    at /home/philipp/dev/mc.hg/js/src/jsinterp.cpp:520
#24 0x00007f48798ddc39 in js::Invoke (cx=0x7f487c8be5f0, args=..., 
    construct=js::NO_CONSTRUCT)
    at /home/philipp/dev/mc.hg/js/src/jsinterp.h:157
#25 0x00007f4879977b3a in js::Invoke (cx=0x7f487c8be5f0, thisv=..., fval=..., 
    argc=1, argv=0x7fffdacac4d0, rval=0x7fffdacac4e0)
    at /home/philipp/dev/mc.hg/js/src/jsinterp.cpp:570
---Type <return> to continue, or q <return> to quit---
#26 0x00007f48798ba673 in JS_CallFunctionValue (cx=0x7f487c8be5f0, 
    obj=0x7f4863697cd0, fval=..., argc=1, argv=0x7fffdacac4d0, 
    rval=0x7fffdacac4e0) at /home/philipp/dev/mc.hg/js/src/jsapi.cpp:5455
#27 0x00007f487880f935 in mozilla::dom::workers::events::ListenerManager::DispatchEvent (this=0x7f48634bf000, aCx=0x7f487c8be5f0, aTarget=0x7f4863697cd0, 
    aEvent=0x7f4856d6a060, aPreventDefaultCalled=0x7fffdacac60f)
    at /home/philipp/dev/mc.hg/dom/workers/ListenerManager.cpp:437
#28 0x00007f48788090c6 in mozilla::dom::workers::events::EventTarget::DispatchEvent (aCx=0x7f487c8be5f0, aArgc=1, aVp=0x7f48643fe088)
    at /home/philipp/dev/mc.hg/dom/workers/EventTarget.cpp:220
#29 0x00007f48799929b3 in js::CallJSNative (cx=0x7f487c8be5f0, 
    native=0x7f4878809002 <mozilla::dom::workers::events::EventTarget::DispatchEvent(JSContext*, unsigned int, JS::Value*)>, args=...)
    at /home/philipp/dev/mc.hg/js/src/jscntxtinlines.h:311
#30 0x00007f4879977860 in js::InvokeKernel (cx=0x7f487c8be5f0, args=..., 
    construct=js::NO_CONSTRUCT)
    at /home/philipp/dev/mc.hg/js/src/jsinterp.cpp:520
#31 0x00007f48798ddc39 in js::Invoke (cx=0x7f487c8be5f0, args=..., 
    construct=js::NO_CONSTRUCT)
    at /home/philipp/dev/mc.hg/js/src/jsinterp.h:157
#32 0x00007f4879977b3a in js::Invoke (cx=0x7f487c8be5f0, thisv=..., fval=..., 
    argc=1, argv=0x7fffdacac910, rval=0x7fffdacac920)
    at /home/philipp/dev/mc.hg/js/src/jsinterp.cpp:570
---Type <return> to continue, or q <return> to quit---
#33 0x00007f48798ba446 in JS_CallFunctionName (cx=0x7f487c8be5f0, 
    obj=0x7f4863697cd0, name=0x7f4879edb68d "dispatchEvent", argc=1, 
    argv=0x7fffdacac910, rval=0x7fffdacac920)
    at /home/philipp/dev/mc.hg/js/src/jsapi.cpp:5442
#34 0x00007f48788087f4 in mozilla::dom::workers::events::DispatchEventToTarget
    (aCx=0x7f487c8be5f0, aTarget=0x7f4863697cd0, aEvent=0x7f4856d6a060, 
    aPreventDefaultCalled=0x7fffdacac98e)
    at /home/philipp/dev/mc.hg/dom/workers/Events.cpp:1185
#35 0x00007f487882004a in (anonymous namespace)::MessageEventRunnable::WorkerRun (this=0x7f48561c3980, aCx=0x7f487c8be5f0, aWorkerPrivate=0x7f48634bf000)
    at /home/philipp/dev/mc.hg/dom/workers/WorkerPrivate.cpp:898
#36 0x00007f487882230a in mozilla::dom::workers::WorkerRunnable::Run (
    this=0x7f48561c3980)
    at /home/philipp/dev/mc.hg/dom/workers/WorkerPrivate.cpp:1662
#37 0x00007f4879439673 in nsThread::ProcessNextEvent (this=0x7f487c85dd40, 
    mayWait=true, result=0x7fffdacacb6f)
    at /home/philipp/dev/mc.hg/xpcom/threads/nsThread.cpp:660
#38 0x00007f48793cb9f7 in NS_ProcessNextEvent_P (thread=0x7f487c85dd40, 
    mayWait=true)
    at /home/philipp/dev/mc.hg/obj-ff-dbg/xpcom/build/nsThreadUtils.cpp:245
#39 0x00007f48792a3bda in mozilla::ipc::MessagePump::Run (this=0x7f486e246780, 
    aDelegate=0x7f487c8d6a80)
    at /home/philipp/dev/mc.hg/ipc/glue/MessagePump.cpp:134
---Type <return> to continue, or q <return> to quit---
#40 0x00007f487948b38d in MessageLoop::RunInternal (this=0x7f487c8d6a80)
    at /home/philipp/dev/mc.hg/ipc/chromium/src/base/message_loop.cc:208
#41 0x00007f487948b31e in MessageLoop::RunHandler (this=0x7f487c8d6a80)
    at /home/philipp/dev/mc.hg/ipc/chromium/src/base/message_loop.cc:201
#42 0x00007f487948b2f7 in MessageLoop::Run (this=0x7f487c8d6a80)
    at /home/philipp/dev/mc.hg/ipc/chromium/src/base/message_loop.cc:175
#43 0x00007f487913c684 in nsBaseAppShell::Run (this=0x7f48698d84e0)
    at /home/philipp/dev/mc.hg/widget/xpwidgets/nsBaseAppShell.cpp:189
#44 0x00007f4878e802d6 in nsAppStartup::Run (this=0x7f48698ef510)
    at /home/philipp/dev/mc.hg/toolkit/components/startup/nsAppStartup.cpp:220
#45 0x00007f4877c8ff69 in XRE_main (argc=4, argv=0x7fffdacaf818, 
    aAppData=0x623c60)
    at /home/philipp/dev/mc.hg/toolkit/xre/nsAppRunner.cpp:3537
#46 0x00000000004023f9 in do_main (
    exePath=0x7fffdacae710 "/home/philipp/dev/mc.hg/obj-ff-dbg/dist/bin/", 
    argc=4, argv=0x7fffdacaf818)
    at /home/philipp/dev/mc.hg/browser/app/nsBrowserApp.cpp:205
#47 0x0000000000402660 in main (argc=4, argv=0x7fffdacaf818)
    at /home/philipp/dev/mc.hg/browser/app/nsBrowserApp.cpp:295
Comment 1 Philipp von Weitershausen [:philikon] 2012-01-11 13:42:42 PST
Created attachment 587807 [details] [diff] [review]
v1

Looks like we tried to be smarter than we actually are ;). Fixed! Code is much dumber now.
Comment 2 Philipp von Weitershausen [:philikon] 2012-01-11 16:21:07 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/ece727bdde6e
Comment 3 Matt Brubeck (:mbrubeck) 2012-01-12 11:00:52 PST
https://hg.mozilla.org/mozilla-central/rev/ece727bdde6e

Note You need to log in before you can comment on or make changes to this bug.