The default bug view has changed. See this FAQ.

"Application error" window appears when CurrentPage.findInPage(...) is invoked without URL

VERIFIED FIXED

Status

Core Graveyard
Java APIs to WebShell
P3
normal
VERIFIED FIXED
17 years ago
5 years ago

People

(Reporter: Oleg Khokhlov, Assigned: Ashu Kulkarni)

Tracking

Trunk
x86
Windows NT

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(8 attachments)

(Reporter)

Description

17 years ago
If no URL is loaded and CurrentPage.findInPage(...) is invoked, then 
"Application error" window appears:

   The exception Breakpoint.
   A breakpoint has been reached.
   (0x80000003) occurred in the aplication at location 0x77f76274.

How to reproduce:
1. Start webclient without any URL.
2. Choose the menu item "Search->Find".
3. In the find dialog window type something in "Find" field.
4. Press the "Find" button.


Mozilla M16, Webclient source from Aug 07, 2000. WinNT 4.0 SP4. JDK 1.3.0R.
(Reporter)

Updated

17 years ago
Summary: "Application error" window appears when CurrentPage.findInPage(...) is invoked without URL → "Application error" window appears when CurrentPage.findInPage(...) is invoked without URL
Confirming again. ovk@sparc.spb.su - I've fixed your Bugzilla permissions so you 
submit NEW bugs by default.

Gerv
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

17 years ago
Assignee: edburns → ashuk

Comment 2

17 years ago
Reassign to Ashu.
(Assignee)

Updated

17 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 3

17 years ago
Created attachment 13285 [details] [diff] [review]
cvs diff for src_moz/CurrentPageImpl.cpp
(Assignee)

Comment 4

17 years ago
Created attachment 13312 [details] [diff] [review]
cvs diff -u for CurrentPageImpl.cpp
(Assignee)

Comment 5

17 years ago
Added patch to fix bug. Checked in fix.
Oleg, pls get this fix and run the new code thro your QA tests. thanks.

_Ashu
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
(Reporter)

Comment 6

17 years ago
"Application error" window still appears:

It appears when interfaceRequestor->GetInterface(NS_GET_IID(nsIDOMWindow), 
getter_AddRefs(domWindow)) is called.

May be we need some check before interfaceRequestor->GetInterface(...) is 
called. Something like that:

nsIURI* url;
rv=initContext->docShell->GetCurrentURI(&url);
 if (NS_FAILED(rv) || nsnull == url)  {
      ::util_ThrowExceptionToJava(env, "Exception: NULL URL passed to Find 
call");
      return;
 } 

I tested findInPage(..) method with this code and it works. But, may be, there 
are other ways exist.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 7

17 years ago
The patch suggested by Oleg looks good. I'll check it in and confirm that it
works fine before closing this bug.

thanks
_Ashu
Status: REOPENED → ASSIGNED
(Assignee)

Comment 8

17 years ago
Created attachment 14422 [details] [diff] [review]
Proposed patch - suggested by Oleg - diff -u CurrentPageImpl.cpp
(Assignee)

Comment 9

17 years ago
Created attachment 14423 [details]
tar.gz of modified patch files
(Assignee)

Comment 10

17 years ago
Created attachment 14424 [details]
tar.gz of modified patch files
(Assignee)

Comment 11

17 years ago
Created attachment 14425 [details]
tar.gz of modified patch files
(Assignee)

Comment 12

17 years ago
tar.gz attached multiple times by mistake due to slow responding bugzilla
server.

_Ashu

Comment 13

17 years ago
Comments on http://bugzilla.mozilla.org/showattachment.cgi?attach_id=14422 : 

Use nsCOMPtr<nsIURI> and getter_AddRefs().  If you do that, then I give you 
r=,a= edburns.
(Assignee)

Comment 14

17 years ago
Created attachment 14491 [details] [diff] [review]
diff -u CurrentPageImpl.cpp - Proposed patch
(Assignee)

Comment 15

17 years ago
Created attachment 14492 [details] [diff] [review]
Proposed patch - diff -u CurrentPageImpl.cpp
(Assignee)

Comment 16

17 years ago
Patch checked into cvs. Pls see 09/12/00 09:32 for diff -u of proposed patch and 
09/12/00 09:31 for modified CurrentPageImpl.cpp file

_Ashu
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago17 years ago
Resolution: --- → FIXED

Comment 17

17 years ago
Works for Me
Platform: PC
OS: Windows 98
Mozilla Version: 2000100508

Marking as Verified
Status: RESOLVED → VERIFIED
Component: Java APIs to WebShell → Java APIs to WebShell
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.