Closed Bug 955288 Opened 6 years ago Closed 6 years ago

Crash [@purpleDebug::ReportMessageWithLocation]

Categories

(Chat Core :: Debug, defect, critical)

x86
Other
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 file, 1 obsolete file)

*** Original post on bio 1855 at 2012-12-14 15:48:00 UTC ***

###!!! ABORT: You can't dereference a NULL nsCOMPtr with operator->().: 'mRawPtr != 0', file ../../../mozilla/dist/include/nsCOMPtr.h, line 781
NS_DebugBreak+0x00000033 [./libxpcom.dylib +0x00000CF3]
nsCOMPtr<imIAccount>::operator->() const+0x0000004A [./components/libpurplexpcom.dylib +0x00009BCA]
purpleDebug::ReportMessageWithLocation(PurpleDebugLevel, char const*, char const*, int, char const*, char const*)+0x000006FB [./components/libpurplexpcom.dylib +0x0001DD3B]
purple_debug_with_location+0x00000270 [./components/libpurplexpcom.dylib +0x0006B610]
purple_util_write_data_to_file_absolute+0x0000006C [./components/libpurplexpcom.dylib +0x000B09CC]
purple_buddy_icon_data_cache+0x0000016D [./components/libpurplexpcom.dylib +0x00056D2D]
purple_buddy_icon_data_new+0x0000015C [./components/libpurplexpcom.dylib +0x00054C7C]
purple_buddy_icons_set_account_icon+0x0000004F [./components/libpurplexpcom.dylib +0x0005539F]
purpleAccount::SetAccountIcon(nsCString_external const&)+0x000000AE [./components/libpurplexpcom.dylib +0x0000AC2E]
purpleAccount::ApplyCurrentUserIcon()+0x00001653 [./components/libpurplexpcom.dylib +0x00006153]
purpleAccount::Init(imIAccount*, prplIProtocol*)+0x000013C8 [./components/libpurplexpcom.dylib +0x00004A78]
purpleProtocol::GetAccount(imIAccount*, prplIAccount**)+0x000000AD [./components/libpurplexpcom.dylib +0x00039B7D]
NS_InvokeByIndex_P+0x00000219 [./XUL +0x022C5499]
CallMethodHelper::Invoke()+0x00000054 [./XUL +0x016E90A4]
CallMethodHelper::Call()+0x0000013C [./XUL +0x016E746C]
XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode)+0x000002D6 [./XUL +0x016E3AC6]
XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*)+0x0000028F [./XUL +0x016F397F]
js::CallJSNative(JSContext*, int (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&)+0x000000A2 [./XUL +0x02FBCE42]
js::InvokeKernel(JSContext*, JS::CallArgs, js::MaybeConstruct)+0x000003AD [./XUL +0x02FB4CFD]
js::Interpret(JSContext*, js::StackFrame*, js::InterpMode)+0x0000B49F [./XUL +0x02FA988F]
js::RunScript(JSContext*, JSScript*, js::StackFrame*)+0x00000322 [./XUL +0x02F9E2E2]
js::InvokeKernel(JSContext*, JS::CallArgs, js::MaybeConstruct)+0x00000486 [./XUL +0x02FB4DD6]
js::Invoke(JSContext*, js::InvokeArgsGuard&, js::MaybeConstruct)+0x00000063 [./XUL +0x02FF8A33]
js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::Value*)+0x000001F3 [./XUL +0x02FB5393]
JS_CallFunctionValue+0x00000132 [./XUL +0x02EB1812]
nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS*, unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*)+0x0000148E [./XUL +0x016D834E]
nsXPCWrappedJS::CallMethod(unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*)+0x0000017B [./XUL +0x016CBF1B]
PrepareAndDispatch+0x000005F7 [./XUL +0x022C6F07]
###!!! ABORT: You can't dereference a NULL nsCOMPtr with operator->().: 'mRawPtr != 0', file ../../../mozilla/dist/include/nsCOMPtr.h, line 781
Segmentation fault: 11
Blocks: 955260
Attached patch Trivial patch (obsolete) — Splinter Review
*** Original post on bio 1855 as attmnt 2170 at 2012-12-14 15:50:00 UTC ***

This trivial patch (a null check) avoids the crash, but I'm not sure I fully understand the situation causing this :(.
Attached patch PatchSplinter Review
*** Original post on bio 1855 as attmnt 2171 at 2012-12-14 16:07:00 UTC ***

Ok, the problem is that we execute http://lxr.instantbird.org/instantbird/source/chat/components/src/imAccounts.js#147 and http://lxr.instantbird.org/instantbird/source/chat/components/src/imAccounts.js#150 before the imAccount constructor has returned, so before the account is added in _accounts and _accountsById.
Attachment #8353933 - Flags: review?(clokep)
Comment on attachment 8353932 [details] [diff] [review]
Trivial patch

*** Original change on bio 1855 attmnt 2170 at 2012-12-14 16:07:23 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8353932 - Attachment is obsolete: true
Assignee: nobody → florian
Comment on attachment 8353933 [details] [diff] [review]
Patch

*** Original change on bio 1855 attmnt 2171 at 2012-12-14 16:15:27 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8353933 - Flags: review?(clokep) → review+
*** Original post on bio 1855 at 2012-12-14 23:30:30 UTC ***

http://hg.instantbird.org/instantbird/rev/3e37cf51d05a

Thanks!
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.4
You need to log in before you can comment on or make changes to this bug.