Closed
Bug 322463
Opened 19 years ago
Closed 19 years ago
FF crash if I try to open (install) my plugin
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: milan, Assigned: dougt)
References
()
Details
(Keywords: crash)
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sl; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; sl; rv:1.8) Gecko/20051111 Firefox/1.5
I have written one plugin for Firefox. It worked fine before 1.5 version. When using 1.5 version it installs without errors, but when I open some HTML page where my plugin is embeded FF crashes. I think the problem must be inside FF, because it crashes before my code was invoked.
Reproducible: Always
Steps to Reproduce:
1. Open proXSign11.xpi (I will try to attach it) using FF 1.5 and File -> Open... (this will install my plugin on your PC)
2. Open Test.js page and click on the "Sign" button
I will try to upload above mentioned files somewhere.
Actual Results:
FF crashed, Windows and FF quality insurance dialogs appear.
Expected Results:
My plugin should work. No errors/crashes should be reported.
Comment 1•19 years ago
|
||
What is the Talkback ID of the crash?
Reporter | ||
Comment 2•19 years ago
|
||
(In reply to comment #1)
> What is the Talkback ID of the crash?
For example: TB13600107E
All Talkback IDs are:
TB13604925G, TB13600707X, TB13600706Z, TB13600672K, TB13600658H, TB13600589Z, TB13600392Y, TB13600349Y, TB13600313M, TB13600178G, TB13600119Q, TB13600107E, TB13599557Z, TB13524915Z, TB13524890M, TB13524824K
Thank you for your response.
Comment 3•19 years ago
|
||
If you could attach the proXSign11.xpi file (or give an url) and a page where you experience the crash, that would be nice.
Comment 4•19 years ago
|
||
It does look that your code is involved, though (nproXSign11.dll in the stack trace)
Stack Signature kernel32.dll + 0x1eb33 (0x7c81eb33) 6a10f2f3
Product ID Firefox15
Build ID 2005111116
Trigger Time 2006-01-05 05:36:54.0
Platform Win32
Operating System Windows NT 5.1 build 2600
Module kernel32.dll + (0001eb33)
URL visited
User Comments
Since Last Crash 7 sec
Total Uptime 3914 sec
Trigger Reason Unknown exception 0xc06d007f
Source File, Line No. N/A
Stack Trace
kernel32.dll + 0x1eb33 (0x7c81eb33)
nproXSign11.dll + 0x19ccff (0x02d1ccff)
nproXSign11.dll + 0x1733e2 (0x02cf33e2)
XPTC_InvokeByIndex [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp, line 102]
XPCWrappedNative::CallMethod [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/js/src/xpconnect/src/xpcwrappednative.cpp, line 2139]
XPC_WN_CallMethod [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/js/src/xpconnect/src/xpcwrappednativejsops.cpp, line 1444]
js_Invoke [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/js/src/jsinterp.c, line 1177]
js_Interpret [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/js/src/jsinterp.c, line 3523]
js_Invoke [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/js/src/jsinterp.c, line 1197]
js_InternalInvoke [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/js/src/jsinterp.c, line 1274]
JS_CallFunctionValue [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/js/src/jsapi.c, line 4158]
nsJSContext::CallEventHandler [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/dom/src/base/nsJSEnvironment.cpp, line 1411]
nsJSEventListener::HandleEvent [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/dom/src/events/nsJSEventListener.cpp, line 195]
nsEventListenerManager::HandleEventSubType [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/content/events/src/nsEventListenerManager.cpp, line 1685]
nsEventListenerManager::HandleEvent [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/content/events/src/nsEventListenerManager.cpp, line 1786]
nsGenericElement::HandleDOMEvent [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/content/base/src/nsGenericElement.cpp, line 2169]
nsHTMLInputElement::HandleDOMEvent [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/content/html/content/src/nsHTMLInputElement.cpp, line 1395]
PresShell::HandleEventInternal [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/layout/base/nsPresShell.cpp, line 6367]
PresShell::HandleEventWithTarget [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/layout/base/nsPresShell.cpp, line 6265]
nsEventStateManager::CheckForAndDispatchClick [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/content/events/src/nsEventStateManager.cpp, line 3039]
nsEventStateManager::PostHandleEvent [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/content/events/src/nsEventStateManager.cpp, line 2016]
PresShell::HandleEventInternal [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/layout/base/nsPresShell.cpp, line 6439]
PresShell::HandleEvent [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/layout/base/nsPresShell.cpp, line 6203]
nsViewManager::HandleEvent [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/view/src/nsViewManager.cpp, line 2559]
nsViewManager::DispatchEvent [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/view/src/nsViewManager.cpp, line 2246]
HandleEvent [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/view/src/nsView.cpp, line 174]
nsWindow::DispatchEvent [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/widget/src/windows/nsWindow.cpp, line 1252]
nsWindow::DispatchMouseEvent [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/widget/src/windows/nsWindow.cpp, line 5982]
ChildWindow::DispatchMouseEvent [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/widget/src/windows/nsWindow.cpp, line 6233]
nsWindow::WindowProc [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/widget/src/windows/nsWindow.cpp, line 1434]
USER32.dll + 0x8734 (0x77d48734)
USER32.dll + 0x8816 (0x77d48816)
USER32.dll + 0x89cd (0x77d489cd)
USER32.dll + 0x8a10 (0x77d48a10)
nsAppShell::Run [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/widget/src/windows/nsAppShell.cpp, line 159]
nsAppStartup::Run [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/toolkit/components/startup/src/nsAppStartup.cpp, line 151]
main [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/browser/app/nsBrowserApp.cpp, line 61]
kernel32.dll + 0x16d4f (0x7c816d4f)
Keywords: crash
Version: unspecified → 1.5 Branch
Reporter | ||
Comment 5•19 years ago
|
||
(In reply to comment #4)
> It does look that your code is involved, though (nproXSign11.dll in the stack
> trace)
When I try to load into FF 1.5 my plugin (debug configuration build) I got a dialog saying "Illigal operation performed". I belive FF couldn't find some DLL that my plugin uses. I have tried using Depends.exe, but couldn't find which DLL was missing. Is there a way to get more debug info from FF 1.5?
Comment 6•19 years ago
|
||
Make a debug build, I suppose. Again, judging from the stack trace, it's the code in your DLL that crashes. I think that in such cases, you should ask for help in developer newsgroups instead of claiming a bug.
you did use the profile feature of depends as documented on www.mozilla.org, right?
also, can you provide symbols for your plugin? if so, perhaps we could find someone willing to spend time helping you.
note that developer.mozilla.org has a link to a build you can use that has symbols so you can skip building your own.
Reporter | ||
Comment 8•19 years ago
|
||
(In reply to comment #7)
> you did use the profile feature of depends as documented on www.mozilla.org,
> right?
I'm not sure I have seen that. Could you provide exact link?
> note that developer.mozilla.org has a link to a build you can use that has
> symbols so you can skip building your own.
I couldn't find a link. Can you help me, please?
> also, can you provide symbols for your plugin? if so, perhaps we could find
> someone willing to spend time helping you.
Let's leave it as last option. :)
When I reported this "bug", my plugin crashed FF during the first call of my plugin from JavaScript code. My plugin's first function call was extreamly simple and it shouldn't cause a crash. Then I tried to upload my plugin (900 kB), but I got an error saying that limit is 300 kB. :( After that I have slightly edited my HTML (containing previously mentioned JavaScript code) and now FF crashes deaply inside my plugin and not at the very beginning. :( i don't have first version of my HTML file, anymore. :(
http://developer.mozilla.org/en/docs/How_to_get_a_stacktrace_with_WinDbg
i suppose you could email your plugin to timeless@gmail and i could make it available somewhere.... but really i'd rather have at least the dll+pdb, just a dll isn't something i'm likely to want to install on my system.
Reporter | ||
Comment 11•19 years ago
|
||
(In reply to comment #10)
> http://www.mozilla.org/quality/help/dependency-walker.html
Great article and great tool. :)
This is output in red color (I belive that means errors):
00:00:09.953: GetProcAddress(0x02EF0000 [c:\program files\mozilla firefox 1.5\plugins\MYPLUGIN.DLL], "NSGetFactory") called from "c:\program files\mozilla firefox 1.5\NSPR4.DLL" at address 0x60147565 and returned NULL by thread 1. Error: The specified procedure could not be found (127).
00:00:10.093: GetProcAddress(0x602E0000 [c:\program files\mozilla firefox 1.5\XPCOM.DLL], "??RnsQueryInterface@@UBEIABUnsID@@PAPAX@Z") called from "c:\program files\mozilla firefox 1.5\plugins\MYPLUGIN.DLL" at address 0x0326B2ED and returned NULL by thread 1. Error: The specified procedure could not be found (127).
Well, it is obvious that my plugin can't find nsQueryInterface, but I don't know how to fix it. :(
Reporter | ||
Comment 12•19 years ago
|
||
Comment 13•19 years ago
|
||
please attach a zip'd dwi for that.
note that plugins are supposed to be named npFoo.dll where np and dll can't change, but foo is whatever you like. if you don't name them that way, the plugin engine is quite likely to not handle your plugin properly.
Reporter | ||
Comment 14•19 years ago
|
||
I have sent dwi file to timeless AT gmail DOT com, because even RARed its size was 500 kB.
Comment 15•19 years ago
|
||
i suspect the plugin should be using glue or something.
Assignee: nobody → dougt
Component: General → XPCOM
Product: Firefox → Core
QA Contact: general → xpcom
Version: 1.5 Branch → 1.8 Branch
Reporter | ||
Comment 16•19 years ago
|
||
Dear friends,
I have just realized that xpcom.dll doesn't export same classes that it used to export, like nsMemory, and my plugin is using them. Why? I will attach new picture that shows Dependancy Walker on my plugin with 1.0.7 version of FF (first attachment was with 1.5 version). Please compare both pictures.
Thank you in advance.
Reporter | ||
Comment 17•19 years ago
|
||
Comment 18•19 years ago
|
||
those symbols weren't frozen, you weren't supposed to be using them. see xpcom glue. bsmedberg will be glad to talk to you about it. heck so will dougt.
Comment 19•19 years ago
|
||
Timeless is right: you are importing nonfrozen functions from the 1.0.x version of xpcom.dll which have been changed/don't exist in the 1.5 version. In order to work with both versions you will need to define MOZILLA_STRICT_API and link against xpcomglue_s.lib from the 1.0 SDK.
Unfortunately there are some bugs with the 1.0 SDK so that even if you link against xpcomglue_s it sometimes imports symbols it shouldn't. You should check your imports with "dumpbin /imports"... you should only be importing symbols from xpcom.dll which begin with NS_ and are defined in nsXPCOM.h or nsStringAPI.h
See http://developer.mozilla.org/en/docs/XPCOM_Glue
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 20•19 years ago
|
||
(In reply to comment #19)
> In order to work with both versions you will need to define
> MOZILLA_STRICT_API and link against xpcomglue_s.lib from the 1.0 SDK.
> See http://developer.mozilla.org/en/docs/XPCOM_Glue
I have visited above link and included xpcomglue_s.lib in my project, but it didn't changed anything - just as I expected. Only including one more .lib file wasn't enough. There have to be done something more? I had already included MOZILLA_STRICT_API, XPCOM_GLUE, XP_WIN and XP_WIN32 preprocessor definitions before and linked against xpcom.lib.
Reporter | ||
Comment 21•19 years ago
|
||
Does (In reply to comment #18)
> those symbols weren't frozen, you weren't supposed to be using them. see xpcom
> glue.
Does that means that "they are not recommended" or that they does not exist at all any more?
Comment 22•19 years ago
|
||
nonfrozen symbols may change or disappear in future versions of the app, as you discovered from 1.0 to 1.5.
Reporter | ||
Comment 23•19 years ago
|
||
(In reply to comment #22)
> nonfrozen symbols may change or disappear in future versions of the app, as you
> discovered from 1.0 to 1.5.
Those are all (class) memeber functions that I use and Dependancy Walker reports that they don't exist any more in xpcom.dll which ships with 1.5 version:
void nsDebug::Assertion(char const *,char const *,char const *,int)
unsigned int nsQueryInterface::operator()(struct nsID const &,void * *)
void * nsMemory::Clone(void const *,unsigned int)
void nsMemory::Free(void *)
void nsDebug::PreCondition(char const *,char const *,char const *,int)
I've been using nsMemory class in properties (get methods) of my XPCOM objects:
interface nsMyObject : nsISupports {
attribute string someProperty;
}
NS_IMETHODIMP nsMyObject::GetSomeProperty(char * *aSomeProperty)
{
*aSomeProperty = (char*)nsMemory::Clone(m_someProperty, strlen(m_someProperty)+1);
return NS_OK;
}
What should I use instead to avoid using nsMemory? I'm not using nsDebug in any way, so it have to be used implicitly by plugin/XPCOM? How can I avoid "using" nsDebug.
Comment 24•19 years ago
|
||
You should be using the nsDebug glue symbols that comes with xpcomglue_s.lib (same for nsMemory etc).
Reporter | ||
Comment 25•19 years ago
|
||
(In reply to comment #24)
> You should be using the nsDebug glue symbols that comes with xpcomglue_s.lib
> (same for nsMemory etc).
Is it something I should change in my source code?
I've been searching Internet and found this:
http://developer.mozilla.org/en/docs/Creating_XPCOM_Components:Component_Internals#XPCOM_Glue
but I still don't know how to use xpcomglue_s.lib simbols instead of xpcom.lib simbols? Can you help me, by pointing me to some documentation?
Thank you in advance. :)
You need to log in
before you can comment on or make changes to this bug.
Description
•