GNOME Bugzilla – Bug 670251
firefox addon crashes Firefox
Last modified: 2012-03-08 11:19:36 UTC
While the addon is marked only compatible up to 6.0.* latest versions of Firefox (starting with 10) will load the addon nevertheless. After it's been enabled again it was found it causes reproducible crashes of Firefox. Please check https://bugzilla.novell.com/show_bug.cgi?id=746647 Mozilla devs were looking into the issue and found it's an error in the addon. You can get detailed information from the report there: https://bugzilla.mozilla.org/show_bug.cgi?id=727745
Which exact tracker version is this about? Also, could you please paste relevant information from the linked webpages here so it can be found when querying?
It was found with 0.12.5 but the code is wrong in head still as analyzed by Mozilla. Backtrace from crash: Program received signal SIGSEGV, Segmentation fault. JS_SetContextThread (cx=0x0) at /usr/src/debug/mozilla/js/src/jsapi.cpp:6276 6276 JS_AbortIfWrongThread(cx->runtime); (gdb) bt
+ Trace 229686
Analysis from Mozilla: Oh, so the extension isn't actually holding onto the closure it passes into native code. So the relevant data gets GCed, and it crashes. The culprit line is here: http://git.gnome.org/browse/tracker/tree/src/plugins/firefox/chrome/content/plugin.js#n49 The closure is constructed with |tracker.AsyncReadyCallback.ptr(callback_closure)|, which passes it directly into the native function without storing a reference to it. The best solution is probably to do something like: tracker.readyCallback = tracker.AsyncReadyCallback.ptr(callback_closure) tracker.connection_open_async(null, tracker.readyCallback, null); I've updated the docs to add an explicit warning to this effect: https://developer.mozilla.org/en/js-ctypes/js-ctypes_reference/Callbacks
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.