Closed Bug 33333 Opened 24 years ago Closed 15 years ago

javascript:OpenThisUrl() crashes webclient.

Categories

(Core Graveyard :: Java APIs to WebShell, defect, P3)

x86
Other
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: edburns, Assigned: ashuk)

References

()

Details

(Keywords: crash)

Load the URL above in webclient, then click on the "Correct 
http://www.mozilla.org" link.

Webclient instantly crashes:

#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
#
# Error ID: 4F533F57494E13120E43505002BE
#

abnormal program termination
I filed it, I accept it.
Status: NEW → ASSIGNED
Adding crash keyword.
Keywords: crash
*** Bug 40565 has been marked as a duplicate of this bug. ***
From: Christopher Blizzard <blizzard@mozilla.org>
Sender: blizzard@feed.0xdeadbeef.com
To: edburns@acm.org
CC: mozilla-embedding@mozilla.org
Subject: Re: javascript:openThisUrl('http://www.mozilla.org'); in embedding
Date: Mon, 08 May 2000 11:46:44 -0400
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0

edburns@acm.org wrote:
> 
> Hello,
> 
> How should apps embedding mozilla deal with when the user clicks on a
> 
> javascript:openThisUrl('http://www.mozilla.org');
> 
> link?
> 
> I tried to see where this happens, and got down to nsJSProtocolHandler,
> but lost track of it when it went into JavaScript.  Can someone give me
> some pointers?
> 
> Who gets asked to create a new window?

I think that javascript: urls are kinda broken in some ways.  In any
case, there is a callback that allows you to control the creation of new
windows.  Have a look at the getNewBrowser() interface in the
nsIWebBrowserChrome interface:

/*
	Tells the implementer of this interface to create a new
webBrowserChrome
	object for it.  Typically this means the implemetor will create a new 
	top level window that is represented by nsIWebBrowserChrome.  This
	most often will be called when for instance there is a need for a new
	JS window, etc.  Soon after this new object is returned, the webBrowser
	attribute will checked, if one does not exist, one will be created and
	setWebBrowser will be called with the new widget to instantiate in this 
	new window.	
*/
nsIWebBrowser getNewBrowser(in unsigned long chromeMask);

This gets turned into this call in C++:

NS_IMETHODIMP GtkMozEmbedChrome::GetNewBrowser(PRUint32 chromeMask, 
					       nsIWebBrowser **_retval)

It gives you the chance to create a new toplevel window and surround it
with your own chrome and pass it back to the layout engine.  I'll be
adding this to the gtk embedding widget which should give you some clues
how to do it.

--Chris

-- 
------------
Christopher Blizzard
http://people.redhat.com/blizzard/
He who lives by the sword, should go out and get himself a really
nice sword.
------------

Reassigning.
Assignee: edburns → ashuk
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Depends on bug 48227
Depends on: 48227
Depends on: 47357
bug 48227 is fixed.  Can this get fixed now?

Jake
Actually, forget what I said.  This seems to be fixed in M18 2000092808

Jake
Worksforme with the Win98 10/3 branch build.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
This is a bug opened against Webclient (part of the Blackwood project), and as 
of 10/04, the fix for this bug is still not in the mozilla/java/webclient 
codebase. 

Reopening this bug.

_Ashu
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Status: REOPENED → ASSIGNED
I cannot reproduce the crash by any of these 4 links with my local window branch
pull on 10/16 afternoon. Is this stilla crash issue? If not, please remove crash
from the keyword.
I reproduce it on Linux 2.2 with latest nightly mozilla & webclient.
All four links do not proceeded.

Output for first 2 links:
JavaScript error: 
 line 0: uncaught exception: [Exception... "Failure"  code: "-2147467259" nsresu
lt: "0x80004005 (NS_ERROR_FAILURE)"  location: "http://java.sun.com/people/edbur
ns/work/jsOpenThisURL.html Line: 5"]

Output for last 2 links:
# # An unexpected exception has been detected in native code outside the VM.# 
Program counter=0x499c0a77
#
# Problematic Thread: prio=1 tid=0x81ba228 nid=0xf2a runnable 
#
Changing QA contact
QA Contact: geetha.vaidyanaathan → avm
*** Bug 77552 has been marked as a duplicate of this bug. ***
On NT webclient crashed if i try to load this URL.
Step to reproduce:
1. run webclient
2. paste url to location string

Expected result : webclient load this page
Actual result: webclient crashed.
I have following output:

debug: edburns: Currently Viewing: http://java.sun.com/people/edburns/work/jsOpe
nThisURL.html
Enabling Quirk StyleSheet
debug: edburns: STATE_TRANSFERRING
Summary: javasccript:OpenThisUrl() crashes webclient. → javascript:OpenThisUrl() crashes webclient.
Current status:
Webclient loads the page and doesn't crash.
Clicking on links doesn't work but webclient doesn't crash.

WinNT 4.0 SP4 with JDK 1.4.0 beta, Netscape61_RELEASE mozilla branch + 
JAVADEV_6_1_20010831 blackwood branch;

x86 Solaris 2.8 with JDK 1.4.0-beta3-b84, MOZILLA_0_9_4_BRANCH + blackwood 
trunk;
wfm build 2002053012, win2k sp2
running webclient 1.1, mozilla 0.9.2 on a Linux and javascript:document.write
("Sample message") works but javascript:window.print() does not.
I got the crash in the java loading process with:
http://adsl.internode.on.net/speedtest/
http://www.unitedlinux.com/
Mozilla 1.5b
Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.5b) Gecko/20030908
Links are dead; why not close this one, unless a test URL or testcase can be made?
closing bugs filed by active contributors is *not* recommended practice.
WUW the conflicting reports of working for some and not others?
Closing until we can find a working testcase.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago15 years ago
Resolution: --- → INCOMPLETE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.