Closed Bug 1358656 Opened 7 years ago Closed 6 years ago

stylish add-on uses a deprecated mozStorage API, and triggers startup abort in debug builds ("You are trying to use a deprecated mozStorage method")

Categories

(WebExtensions :: General, defect)

defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: dholbert, Unassigned)

References

Details

STR:
 1. Run a debug Firefox build on a profile that has the Stylish add-on installed.

ACTUAL RESULTS:
Startup abort, with the following message:
====
Assertion failure: false (You are trying to use a deprecated mozStorage method. Check error message in console to identify the method name.), at $SRC/storage/mozStorageStatement.cpp:888
====

That source link is bogus -- the assertion is actually here in our source code (in a macro definition):
http://searchfox.org/mozilla-central/rev/6e1c138a06a80f2bb3167d9dac050cc0fd4fb39e/storage/mozStorageHelper.h#230


Here's the backtrace of the abort:
#01: mozilla::storage::Statement::BindStringParameter(unsigned int, nsAString const&) ($SRC/storage/mozStorageStatement.cpp:885 (discriminator 89))
#02: NS_InvokeByIndex ($SRC/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_64_unix.S:135)
#03: CallMethodHelper::Invoke() ($SRC/js/xpconnect/src/XPCWrappedNative.cpp:2010)
#04: CallMethodHelper::Call() ($SRC/js/xpconnect/src/XPCWrappedNative.cpp:1329)
#05: XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode) ($SRC/js/xpconnect/src/XPCWrappedNative.cpp:1296 (discriminator 1))
#06: XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*) ($SRC/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:983)
#07: js::Debug_SetValueRangeToCrashOnTouch(JS::Value*, unsigned long) (/tmp/../../../mozilla/js/src/vm/NativeObject.h:52)
#08: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4245)
#09: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4276)
#10: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4257 (discriminator 7))
#11: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:2919 (discriminator 1))
#12: js::GetFunctionThis(JSContext*, js::AbstractFramePtr, JS::MutableHandle<JS::Value>) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:118 (discriminator 1))
#13: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4253)
#14: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4276)
#15: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4286)
#16: JS_SetPropertyById(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::Handle<JS::Value>) ($SRC/js/src/jsapi.cpp:2640)
#17: nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS*, unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) ($SRC/js/xpconnect/src/XPCWrappedJSClass.cpp:1214)
#18: nsXPCWrappedJS::CallMethod(unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) ($SRC/js/xpconnect/src/XPCWrappedJS.cpp:613)
#19: PrepareAndDispatch (//../../../../../../mozilla/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_linux.cpp:120)
#20: SharedStub (-:?)
#21: NS_InvokeByIndex ($SRC/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_64_unix.S:135)
#22: CallMethodHelper::Invoke() ($SRC/js/xpconnect/src/XPCWrappedNative.cpp:2010)
#23: CallMethodHelper::Call() ($SRC/js/xpconnect/src/XPCWrappedNative.cpp:1329)
#24: XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode) ($SRC/js/xpconnect/src/XPCWrappedNative.cpp:1296 (discriminator 1))
#25: XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*) ($SRC/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:983)
#26: js::Debug_SetValueRangeToCrashOnTouch(JS::Value*, unsigned long) (/tmp/../../../mozilla/js/src/vm/NativeObject.h:52)
#27: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4245)
#28: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4276)
#29: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4257 (discriminator 7))
#30: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:2919 (discriminator 1))
#31: js::GetFunctionThis(JSContext*, js::AbstractFramePtr, JS::MutableHandle<JS::Value>) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:118 (discriminator 1))
#32: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4253)
#33: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4276)
#34: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4286)
#35: JS_SetPropertyById(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::Handle<JS::Value>) ($SRC/js/src/jsapi.cpp:2640)
#36: nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS*, unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) ($SRC/js/xpconnect/src/XPCWrappedJSClass.cpp:1214)
#37: nsXPCWrappedJS::CallMethod(unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) ($SRC/js/xpconnect/src/XPCWrappedJS.cpp:613)
#38: PrepareAndDispatch (//../../../../../../mozilla/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_linux.cpp:120)
#39: SharedStub (-:?)
#40: NS_CreateServicesFromCategory(char const*, nsISupports*, char const*, char16_t const*) ($SRC/xpcom/components/nsCategoryManager.cpp:812)
#41: nsXREDirProvider::LoadExtensionBundleDirectories() ($SRC/toolkit/xre/nsXREDirProvider.cpp:950 (discriminator 1))
#42: XREMain::XRE_mainRun() (/tmp/../../../mozilla/toolkit/xre/nsAppRunner.cpp:4238)
#43: GetCurrentProfile(nsIToolkitProfileService*, nsIFile*, nsIToolkitProfile**) (/tmp/../../../mozilla/toolkit/xre/nsAppRunner.cpp:2200)
#44: XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) (/tmp/../../../mozilla/toolkit/xre/nsAppRunner.cpp:4646 (discriminator 1))
#45: nsNativeAppSupportUnix::SetClientState(ClientState) ($SRC/toolkit/xre/nsNativeAppSupportUnix.cpp:158 (discriminator 2))
#46: do_main(int, char**, char**) ($OBJ/browser/app/../../../mozilla/browser/app/nsBrowserApp.cpp:236)
#47: main ($OBJ/browser/app/../../../mozilla/browser/app/nsBrowserApp.cpp:307)
#48: __libc_start_main (/build/glibc-jxM2Ev/glibc-2.24/csu/../csu/libc-start.c:325)
#49: _start ($OBJ/dist/bin/firefox)
#50: ??? (???:???)

Program $OBJ/dist/bin/firefox (pid = 654) received signal 11.
Stack:
#01: js::SparseBitmap::bitwiseOrRangeInto(unsigned long, unsigned long, unsigned long*) const ($SRC/js/src/ds/Bitmap.cpp:105 (discriminator 1))
#02: CoerceInPlace_ToNumber(JS::MutableHandle<JS::Value>) ($SRC/js/src/wasm/WasmRuntime.cpp:280)
#03: __restore_rt (sigaction.c:?)
#04: mozilla::storage::Statement::BindStringParameter(unsigned int, nsAString const&) ($SRC/storage/mozStorageStatement.cpp:885 (discriminator 89))
#05: NS_InvokeByIndex ($SRC/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_64_unix.S:135)
#06: CallMethodHelper::Invoke() ($SRC/js/xpconnect/src/XPCWrappedNative.cpp:2010)
#07: CallMethodHelper::Call() ($SRC/js/xpconnect/src/XPCWrappedNative.cpp:1329)
#08: XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode) ($SRC/js/xpconnect/src/XPCWrappedNative.cpp:1296 (discriminator 1))
#09: XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*) ($SRC/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:983)
#10: js::Debug_SetValueRangeToCrashOnTouch(JS::Value*, unsigned long) (/tmp/../../../mozilla/js/src/vm/NativeObject.h:52)
#11: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4245)
#12: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4276)
#13: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4257 (discriminator 7))
#14: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:2919 (discriminator 1))
#15: js::GetFunctionThis(JSContext*, js::AbstractFramePtr, JS::MutableHandle<JS::Value>) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:118 (discriminator 1))
#16: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4253)
#17: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4276)
#18: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4286)
#19: JS_SetPropertyById(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::Handle<JS::Value>) ($SRC/js/src/jsapi.cpp:2640)
#20: nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS*, unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) ($SRC/js/xpconnect/src/XPCWrappedJSClass.cpp:1214)
#21: nsXPCWrappedJS::CallMethod(unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) ($SRC/js/xpconnect/src/XPCWrappedJS.cpp:613)
#22: PrepareAndDispatch (//../../../../../../mozilla/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_linux.cpp:120)
#23: SharedStub (-:?)
#24: NS_InvokeByIndex ($SRC/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_64_unix.S:135)
#25: CallMethodHelper::Invoke() ($SRC/js/xpconnect/src/XPCWrappedNative.cpp:2010)
#26: CallMethodHelper::Call() ($SRC/js/xpconnect/src/XPCWrappedNative.cpp:1329)
#27: XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode) ($SRC/js/xpconnect/src/XPCWrappedNative.cpp:1296 (discriminator 1))
#28: XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*) ($SRC/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:983)
#29: js::Debug_SetValueRangeToCrashOnTouch(JS::Value*, unsigned long) (/tmp/../../../mozilla/js/src/vm/NativeObject.h:52)
#30: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4245)
#31: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4276)
#32: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4257 (discriminator 7))
#33: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:2919 (discriminator 1))
#34: js::GetFunctionThis(JSContext*, js::AbstractFramePtr, JS::MutableHandle<JS::Value>) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:118 (discriminator 1))
#35: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4253)
#36: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4276)
#37: Interpret(JSContext*, js::RunState&) (/tmp/../../../mozilla/js/src/vm/Interpreter.cpp:4286)
#38: JS_SetPropertyById(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::Handle<JS::Value>) ($SRC/js/src/jsapi.cpp:2640)
#39: nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS*, unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) ($SRC/js/xpconnect/src/XPCWrappedJSClass.cpp:1214)
#40: nsXPCWrappedJS::CallMethod(unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) ($SRC/js/xpconnect/src/XPCWrappedJS.cpp:613)
#41: PrepareAndDispatch (//../../../../../../mozilla/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_linux.cpp:120)
#42: SharedStub (-:?)
#43: NS_CreateServicesFromCategory(char const*, nsISupports*, char const*, char16_t const*) ($SRC/xpcom/components/nsCategoryManager.cpp:812)
#44: nsXREDirProvider::LoadExtensionBundleDirectories() ($SRC/toolkit/xre/nsXREDirProvider.cpp:950 (discriminator 1))
#45: XREMain::XRE_mainRun() (/tmp/../../../mozilla/toolkit/xre/nsAppRunner.cpp:4238)
#46: GetCurrentProfile(nsIToolkitProfileService*, nsIFile*, nsIToolkitProfile**) (/tmp/../../../mozilla/toolkit/xre/nsAppRunner.cpp:2200)
#47: XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) (/tmp/../../../mozilla/toolkit/xre/nsAppRunner.cpp:4646 (discriminator 1))
#48: nsNativeAppSupportUnix::SetClientState(ClientState) ($SRC/toolkit/xre/nsNativeAppSupportUnix.cpp:158 (discriminator 2))
#49: do_main(int, char**, char**) ($OBJ/browser/app/../../../mozilla/browser/app/nsBrowserApp.cpp:236)
#50: main ($OBJ/browser/app/../../../mozilla/browser/app/nsBrowserApp.cpp:307)
#51: __libc_start_main (/build/glibc-jxM2Ev/glibc-2.24/csu/../csu/libc-start.c:325)
#52: _start ($OBJ/dist/bin/firefox)
#53: ??? (???:???)
Sleeping for 300 seconds.


It looks like the deprecated methods that stylish uses are "BindInt32Parameter" and "BindStringParameter".  Apparently these have been deprecated for a while but they were only recently made fatal (in debug builds) in bug 1007034.
Summary: stylish uses a deprecated mozStorage API → stylish add-on uses a deprecated mozStorage API, and triggers startup abort in debug builds ("You are trying to use a deprecated mozStorage method")
Severity: normal → critical
(In reply to Daniel Holbert [:dholbert] from comment #0)
> It looks like the deprecated methods that stylish uses are
> "BindInt32Parameter" and "BindStringParameter".  Apparently these have been
> deprecated for a while but they were only recently made fatal (in debug
> builds) in bug 1007034.

Right, the methods to invoke are BindInt32ByIndex (bindByIndex) or the same ...ByName if the param is named.
Mass-closing bugs that relate to legacy versions of add-ons or are otherwise no longer worth tracking. Please comment if you think this bug should be reopened.

Sorry for the bugspam. Made you look, though!
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Component: Add-ons → General
Product: Tech Evangelism → WebExtensions
You need to log in before you can comment on or make changes to this bug.