gnome notification crashes [@ nsAlertsIconListener::SendClosed()] with jetpack extension script

RESOLVED DUPLICATE of bug 516124

Status

()

Toolkit
XUL Widgets
--
critical
RESOLVED DUPLICATE of bug 516124
9 years ago
7 years ago

People

(Reporter: stransky, Unassigned)

Tracking

({crash})

Firefox Tracking Flags

(Not tracked)

Details

(crash signature)

(Reporter)

Description

9 years ago
Downstream bug - https://bugzilla.redhat.com/show_bug.cgi?id=533029

System notification crashes because mAlertListener is null:

(gdb) p mAlertListener
$7 = {<nsCOMPtr_base> = {mRawPtr = 0x0}, <No data fields>}

260     void
261     nsAlertsIconListener::SendClosed()
262     {
263       mAlertListener->Observe(NULL, "alertfinished", mAlertCookie.get());
264     }

It's because nsAlertsIconListener::InitAlertAsync() is launched with aAlertListener = 0x0, so mAlertListener is NULL too:

Breakpoint 1, nsAlertsIconListener::InitAlertAsync (this=0xafe90f40,
aImageUrl=..., aAlertTitle=..., aAlertText=..., 
    aAlertTextClickable=0, aAlertCookie=..., aAlertListener=0x0) at
nsAlertsIconListener.cpp:273

backtrace of nsAlertsIconListener::InitAlertAsync():

(gdb) bt
#0  nsAlertsIconListener::InitAlertAsync (this=0xafd75800, aImageUrl=..., aAlertTitle=..., aAlertText=..., 
    aAlertTextClickable=0, aAlertCookie=..., aAlertListener=0x0) at nsAlertsIconListener.cpp:273
#1  0x00d9af6d in nsAlertsService::ShowAlertNotification (this=<value optimized out>, aImageUrl=<value optimized out>, 
    aAlertTitle=<value optimized out>, aAlertText=<value optimized out>, aAlertTextClickable=<value optimized out>, 
    aAlertCookie=<value optimized out>, aAlertListener=<value optimized out>, aAlertName=<value optimized out>)
    at nsAlertsService.cpp:72
#2  0x028bc2ed in nsAlertsService::ShowAlertNotification (this=<value optimized out>, aImageUrl=<value optimized out>, 
    aAlertTitle=<value optimized out>, aAlertText=<value optimized out>, aAlertTextClickable=<value optimized out>, 
    aAlertCookie=<value optimized out>, aAlertListener=<value optimized out>, aAlertName=<value optimized out>)
    at nsAlertsService.cpp:82
#3  0x02ae8c2f in NS_InvokeByIndex_P () from /usr/lib/xulrunner-1.9.1/libxul.so
#4  0x021d3071 in XPCWrappedNative::CallMethod (ccx=<value optimized out>, mode=<value optimized out>)
    at xpcwrappednative.cpp:2456
#5  0x021db1d6 in XPC_WN_CallMethod (cx=<value optimized out>, obj=<value optimized out>, argc=<value optimized out>, 
    argv=<value optimized out>, vp=<value optimized out>) at xpcwrappednativejsops.cpp:1590
#6  0x0720f9b3 in js_Invoke (cx=<value optimized out>, argc=<value optimized out>, vp=<value optimized out>, 
    flags=<value optimized out>) at jsinterp.cpp:1386
#7  0x071ffedc in js_Interpret (cx=<value optimized out>) at jsinterp.cpp:5179
#8  0x0720f2a6 in js_Execute (cx=<value optimized out>, chain=<value optimized out>, script=<value optimized out>, 
    down=<value optimized out>, flags=<value optimized out>, result=<value optimized out>) at jsinterp.cpp:1622
#9  0x071d5769 in JS_EvaluateUCScriptForPrincipals (cx=<value optimized out>, obj=<value optimized out>, 
    principals=<value optimized out>, chars=<value optimized out>, length=<value optimized out>, 
    filename=<value optimized out>, lineno=<value optimized out>, rval=<value optimized out>) at jsapi.cpp:5145
#10 0x021b8220 in xpc_EvalInSandbox (cx=<value optimized out>, sandbox=<value optimized out>, source=<value optimized out>, 
    filename=<value optimized out>, lineNo=<value optimized out>, jsVersion=<value optimized out>, 
    returnStringOnly=<value optimized out>, rval=<value optimized out>) at xpccomponents.cpp:3580
#11 0x021b872c in nsXPCComponents_Utils::EvalInSandbox (this=<value optimized out>, source=<value optimized out>)
    at xpccomponents.cpp:3517
#12 0x02ae8c2f in NS_InvokeByIndex_P () from /usr/lib/xulrunner-1.9.1/libxul.so
#13 0x021d3071 in XPCWrappedNative::CallMethod (ccx=<value optimized out>, mode=<value optimized out>)
    at xpcwrappednative.cpp:2456
#14 0x021db1d6 in XPC_WN_CallMethod (cx=<value optimized out>, obj=<value optimized out>, argc=<value optimized out>, 
    argv=<value optimized out>, vp=<value optimized out>) at xpcwrappednativejsops.cpp:1590
#15 0x0720f9b3 in js_Invoke (cx=<value optimized out>, argc=<value optimized out>, vp=<value optimized out>, 
    flags=<value optimized out>) at jsinterp.cpp:1386
#16 0x071ffedc in js_Interpret (cx=<value optimized out>) at jsinterp.cpp:5179
#17 0x0720f9c6 in js_Invoke (cx=<value optimized out>, argc=<value optimized out>, vp=<value optimized out>, 
    flags=<value optimized out>) at jsinterp.cpp:1394
#18 0x071de0df in array_extra (cx=0xb4d1c800, mode=<value optimized out>, argc=<value optimized out>, 
    vp=<value optimized out>) at jsarray.cpp:3164
---Type <return> to continue, or q <return> to quit---
#19 0x07207d49 in js_Interpret (cx=<value optimized out>) at jsinterp.cpp:5147
#20 0x0720f9c6 in js_Invoke (cx=<value optimized out>, argc=<value optimized out>, vp=<value optimized out>, 
    flags=<value optimized out>) at jsinterp.cpp:1394
#21 0x071fb7dc in js_fun_call (cx=<value optimized out>, argc=<value optimized out>, vp=<value optimized out>)
    at jsfun.cpp:1985
#22 0x07207d49 in js_Interpret (cx=<value optimized out>) at jsinterp.cpp:5147
#23 0x0720f9c6 in js_Invoke (cx=<value optimized out>, argc=<value optimized out>, vp=<value optimized out>, 
    flags=<value optimized out>) at jsinterp.cpp:1394
#24 0x071fb7dc in js_fun_call (cx=<value optimized out>, argc=<value optimized out>, vp=<value optimized out>)
    at jsfun.cpp:1985
#25 0x07207d49 in js_Interpret (cx=<value optimized out>) at jsinterp.cpp:5147
#26 0x0720f9c6 in js_Invoke (cx=<value optimized out>, argc=<value optimized out>, vp=<value optimized out>, 
    flags=<value optimized out>) at jsinterp.cpp:1394
#27 0x021cf15f in nsXPCWrappedJSClass::CallMethod (this=<value optimized out>, wrapper=<value optimized out>, 
    methodIndex=<value optimized out>, info=<value optimized out>, nativeParams=<value optimized out>)
    at xpcwrappedjsclass.cpp:1697
#28 0x021cadae in nsXPCWrappedJS::CallMethod (this=<value optimized out>, methodIndex=<value optimized out>, 
    info=<value optimized out>, params=<value optimized out>) at xpcwrappedjs.cpp:569
#29 0x02ae976e in PrepareAndDispatch (methodIndex=<value optimized out>, self=<value optimized out>, 
    args=<value optimized out>) at xptcstubs_gcc_x86_unix.cpp:95
#30 0x0251c810 in nsEventListenerManager::HandleEventSubType (this=<value optimized out>, 
    aListenerStruct=<value optimized out>, aListener=<value optimized out>, aDOMEvent=<value optimized out>, 
    aCurrentTarget=<value optimized out>, aPhaseFlags=<value optimized out>) at nsEventListenerManager.cpp:1098
#31 0x0251cba3 in nsEventListenerManager::HandleEvent (this=<value optimized out>, aPresContext=<value optimized out>, 
    aEvent=<value optimized out>, aDOMEvent=<value optimized out>, aCurrentTarget=<value optimized out>, 
    aFlags=<value optimized out>, aEventStatus=<value optimized out>) at nsEventListenerManager.cpp:1206
#32 0x025388e6 in nsEventTargetChainItem::HandleEvent (this=<value optimized out>, aVisitor=<value optimized out>, 
    aFlags=<value optimized out>, aMayHaveNewListenerManagers=<value optimized out>) at nsEventDispatcher.cpp:236
#33 0x02538a04 in nsEventTargetChainItem::HandleEventTargetChain (this=<value optimized out>, 
    aVisitor=<value optimized out>, aFlags=<value optimized out>, aCallback=<value optimized out>, 
    aMayHaveNewListenerManagers=<value optimized out>) at nsEventDispatcher.cpp:300
#34 0x02538e30 in nsEventDispatcher::Dispatch (aTarget=<value optimized out>, aPresContext=<value optimized out>, 
    aEvent=<value optimized out>, aDOMEvent=<value optimized out>, aEventStatus=<value optimized out>, 
    aCallback=<value optimized out>) at nsEventDispatcher.cpp:514
#35 0x02539067 in nsEventDispatcher::DispatchDOMEvent (aTarget=<value optimized out>, aEvent=<value optimized out>, 
    aDOMEvent=<value optimized out>, aPresContext=<value optimized out>, aEventStatus=<value optimized out>)
    at nsEventDispatcher.cpp:576
#36 0x024c04ef in nsDocument::DispatchEvent (this=<value optimized out>, aEvent=<value optimized out>, 
    _retval=<value optimized out>) at nsDocument.cpp:6227
#37 0x024a8192 in nsContentUtils::DispatchTrustedEvent (aDoc=<value optimized out>, aTarget=<value optimized out>, 
---Type <return> to continue, or q <return> to quit---
    aEventName=<value optimized out>, aCanBubble=<value optimized out>, aCancelable=<value optimized out>, 
    aDefaultAction=<value optimized out>) at nsContentUtils.cpp:3115
#38 0x024c354a in nsDocument::DispatchContentLoadedEvents (this=<value optimized out>) at nsDocument.cpp:3974
#39 0x024cc110 in nsRunnableMethod<nsDocument>::Run (this=<value optimized out>)
    at ../../../dist/include/xpcom/nsThreadUtils.h:278
#40 0x02ada9d1 in nsThread::ProcessNextEvent (this=<value optimized out>, mayWait=<value optimized out>, 
    result=<value optimized out>) at nsThread.cpp:521
#41 0x02aa6762 in NS_ProcessNextEvent_P (thread=<value optimized out>, mayWait=<value optimized out>)
    at nsThreadUtils.cpp:236
#42 0x02a17022 in nsBaseAppShell::Run (this=<value optimized out>) at nsBaseAppShell.cpp:170
#43 0x028b2623 in nsAppStartup::Run (this=<value optimized out>) at nsAppStartup.cpp:193
#44 0x021a33b2 in XRE_main (argc=<value optimized out>, argv=<value optimized out>, aAppData=<value optimized out>)
    at nsAppRunner.cpp:3321
#45 0x08049e7c in main (argc=<value optimized out>, argv=0xbfa10424) at nsXULStub.cpp:482
(Reporter)

Comment 1

9 years ago
Reproduction steps - install Jetpack & create simple script which launches a notification windows when a page is loaded.
(Reporter)

Comment 2

9 years ago
reproduction steps:

1) install jetpack and enable it
2) about:jetpack
   - Develop
      - write simple "jetpack.notifications.show("Nazdar");" script here
3) restart firefox
(Reporter)

Updated

9 years ago
Keywords: crash

Updated

9 years ago
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 516124

Updated

9 years ago
Severity: normal → critical
Summary: gnome notification crashes [@ nsAlertsIconListener::SendClosed()] → gnome notification crashes [@ nsAlertsIconListener::SendClosed()] with jetpack extension script
(Assignee)

Updated

7 years ago
Crash Signature: [@ nsAlertsIconListener::SendClosed()]
You need to log in before you can comment on or make changes to this bug.