Last Comment Bug 48356 - "Application error" window appears when CurrentPage.findInPage(...) is invoked without URL
: "Application error" window appears when CurrentPage.findInPage(...) is invoke...
Status: VERIFIED FIXED
:
Product: Core Graveyard
Classification: Graveyard
Component: Java APIs to WebShell (show other bugs)
: Trunk
: x86 Windows NT
: P3 normal (vote)
: ---
Assigned To: Ashu Kulkarni
: geetha.vaidyanaathan
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2000-08-10 03:28 PDT by Oleg Khokhlov
Modified: 2012-04-09 22:27 PDT (History)
3 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
cvs diff for src_moz/CurrentPageImpl.cpp (1.42 KB, patch)
2000-08-22 12:08 PDT, Ashu Kulkarni
no flags Details | Diff | Splinter Review
cvs diff -u for CurrentPageImpl.cpp (2.16 KB, patch)
2000-08-22 17:02 PDT, Ashu Kulkarni
no flags Details | Diff | Splinter Review
Proposed patch - suggested by Oleg - diff -u CurrentPageImpl.cpp (965 bytes, patch)
2000-09-11 14:05 PDT, Ashu Kulkarni
no flags Details | Diff | Splinter Review
tar.gz of modified patch files (3.04 KB, application/octet-stream)
2000-09-11 14:10 PDT, Ashu Kulkarni
no flags Details
tar.gz of modified patch files (3.04 KB, application/octet-stream)
2000-09-11 14:10 PDT, Ashu Kulkarni
no flags Details
tar.gz of modified patch files (3.04 KB, application/octet-stream)
2000-09-11 14:10 PDT, Ashu Kulkarni
no flags Details
diff -u CurrentPageImpl.cpp - Proposed patch (12.38 KB, patch)
2000-09-12 09:31 PDT, Ashu Kulkarni
no flags Details | Diff | Splinter Review
Proposed patch - diff -u CurrentPageImpl.cpp (1.30 KB, patch)
2000-09-12 09:32 PDT, Ashu Kulkarni
no flags Details | Diff | Splinter Review

Description Oleg Khokhlov 2000-08-10 03:28:45 PDT
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.
Comment 1 Gervase Markham [:gerv] 2000-08-20 08:49:24 PDT
Confirming again. ovk@sparc.spb.su - I've fixed your Bugzilla permissions so you 
submit NEW bugs by default.

Gerv
Comment 2 edburns 2000-08-21 17:23:14 PDT
Reassign to Ashu.
Comment 3 Ashu Kulkarni 2000-08-22 12:08:34 PDT
Created attachment 13285 [details] [diff] [review]
cvs diff for src_moz/CurrentPageImpl.cpp
Comment 4 Ashu Kulkarni 2000-08-22 17:02:00 PDT
Created attachment 13312 [details] [diff] [review]
cvs diff -u for CurrentPageImpl.cpp
Comment 5 Ashu Kulkarni 2000-08-22 17:05:36 PDT
Added patch to fix bug. Checked in fix.
Oleg, pls get this fix and run the new code thro your QA tests. thanks.

_Ashu
Comment 6 Oleg Khokhlov 2000-08-25 02:13:25 PDT
"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.
Comment 7 Ashu Kulkarni 2000-09-11 13:34:36 PDT
The patch suggested by Oleg looks good. I'll check it in and confirm that it
works fine before closing this bug.

thanks
_Ashu
Comment 8 Ashu Kulkarni 2000-09-11 14:05:24 PDT
Created attachment 14422 [details] [diff] [review]
Proposed patch - suggested by Oleg - diff -u CurrentPageImpl.cpp
Comment 9 Ashu Kulkarni 2000-09-11 14:10:46 PDT
Created attachment 14423 [details]
tar.gz of modified patch files
Comment 10 Ashu Kulkarni 2000-09-11 14:10:54 PDT
Created attachment 14424 [details]
tar.gz of modified patch files
Comment 11 Ashu Kulkarni 2000-09-11 14:10:56 PDT
Created attachment 14425 [details]
tar.gz of modified patch files
Comment 12 Ashu Kulkarni 2000-09-11 14:13:35 PDT
tar.gz attached multiple times by mistake due to slow responding bugzilla
server.

_Ashu
Comment 13 edburns 2000-09-11 15:00:58 PDT
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.
Comment 14 Ashu Kulkarni 2000-09-12 09:31:40 PDT
Created attachment 14491 [details] [diff] [review]
diff -u CurrentPageImpl.cpp - Proposed patch
Comment 15 Ashu Kulkarni 2000-09-12 09:32:14 PDT
Created attachment 14492 [details] [diff] [review]
Proposed patch - diff -u CurrentPageImpl.cpp
Comment 16 Ashu Kulkarni 2000-09-12 09:35:22 PDT
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
Comment 17 Keyser Sose 2000-10-05 22:08:27 PDT
Works for Me
Platform: PC
OS: Windows 98
Mozilla Version: 2000100508

Marking as Verified

Note You need to log in before you can comment on or make changes to this bug.