Closed
Bug 368897
Opened 19 years ago
Closed 19 years ago
crash in nsIBaseWindow.create()
Categories
(Core Graveyard :: Java to XPCOM Bridge, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 335696
People
(Reporter: moz-bugz, Assigned: jhpedemonte)
Details
Attachments
(1 file)
|
3.56 KB,
text/plain
|
Details |
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.1) Gecko/20061208 Firefox/2.0.0.1
Build Identifier: xulrunner-1.8.0.4-linux-i686
Trying to embed mozilla in a java AWT frame results in a jvm crash
Reproducible: Always
Steps to Reproduce:
1. open attached java file
2. change GRE_PATH to a xulrunner-1.8.0.4
3. compile&run
Actual Results:
#
# An unexpected error has been detected by Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0xf45b0d77, pid=16117, tid=4158221216
#
# Java VM: Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing)
# Problematic frame:
# C [libxul.so+0xc48d77] _ZN8nsWindow12NativeCreateEP9nsIWidgetPvRK6nsRectPF13nsEventStatusP10nsGUIEventEP16nsIDeviceContextP11nsIAppShellP10nsIToolkitP16nsWidgetInitData+0xf7
#
# An error report file with more information is saved as hs_err_pid16117.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Expected Results:
the mozilla.org website should appear inside the AWT frame
The same code (slightly modified, see comments in the java file) works in windows
| Reporter | ||
Comment 1•19 years ago
|
||
| Assignee | ||
Updated•19 years ago
|
Attachment #253526 -
Attachment mime type: text/x-java → text/plain
| Reporter | ||
Comment 2•19 years ago
|
||
I am using jdk1.6.0-b105 and gtk 2.8.8
| Assignee | ||
Comment 3•19 years ago
|
||
You shouldn't use |getPeer()| any more; as of JDK 1.1, it has been deprecated. I have already opened bug 335696 to handle this issue of getting the native window handle from an AWT frame, using Sun's recommended way (involved JNI; see http://java.sun.com/j2se/1.3/docs/guide/awt/AWT_Native_Interface.html).
As for why it crashes on Linux and not Windows, I'm guessing that the handle returned by |getPeer()| isn't the handle that Mozilla actually expects.
Dup -> bug 335696
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
| Reporter | ||
Comment 4•19 years ago
|
||
Yes, getPeer() is deprecated. But it is not yet broken. At least, the return value of XComponentPeer.getWindow() and the content of jawt_X11DrawingSurfaceInfo.drawable are equal. I can attach my jni-enhanced test class if you don't believe me.
What exactly does mozilla expect as window handle if not the Drawable?
| Reporter | ||
Comment 5•19 years ago
|
||
jawt_X11DrawingSurfaceInfo.display seems to work slightly better as window handle.
the jvm no longer crashes, and the webbrowser seems to work (causes network activity), but unfortunately, it is invisible!
| Reporter | ||
Comment 6•19 years ago
|
||
Same result (no crash, but invisible) when I use the return value of gdk_window_foreign_new(myCanvassXID) as first parameter of nsIBaseWindow.initWindow().
What might be the reason of the browser being invisible? Is it because the awt frame was not created by gtk? Is there some map or realize call missing?
Perhaps some event is delivered to the wrong display?
Remember that the same code (using the hwnd as parentNativeWindow) runs on windows, so this issue must be somehow specific to gtk.
| Assignee | ||
Comment 7•19 years ago
|
||
Moved the conversation over to bug 335696. Please post any further replies there.
Updated•11 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•