Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 466975

Summary: [Browser][Xulrunner] XULRunner browser crashes when any file is downloaded.
Product: [Eclipse Project] Platform Reporter: Niraj Modi <niraj.modi>
Component: SWTAssignee: Lakshmi P Shanmugam <lshanmug>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: daniel_megert, lshanmug, matthew.painter, niraj.modi
Version: 4.5Flags: niraj.modi: review+
Target Milestone: 4.5 RC1   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/47661
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=1dcffe779062d10b45151b31325f882a4d9028be
Whiteboard:
Bug Depends on:    
Bug Blocks: 437700    
Attachments:
Description Flags
Error logs with 64 bit none

Description Niraj Modi CLA 2015-05-11 04:59:28 EDT
Created attachment 253373 [details]
Error logs with 64 bit

A regression, as below scenario passes with 4.4 and till Mars M6 builds, fails with Mars M7 build.
I tested only on Window7 with various versions of XULRunner 1.9, 10, 24 and 31

Steps to reproduce:-
1. Open "BrowserExample" with Browser type as Mozilla and specify Xulrunner library path. You could specify below VM args:
-Dorg.eclipse.swt.browser.DefaultType=mozilla -Dorg.eclipse.swt.browser.XULRunnerPath=<XULRUNNER_LIB_PATH>

2. Type any link that will trigger a file download, e.g.
http://download.eclipse.org/eclipse/downloads/drops4/R-4.4.2-201502041700/swt-4.4.2-win32-win32-x86_64.zip

3. Mozilla tries to download the file and crashes with following error "EXCEPTION_ACCESS_VIOLATION" in Console with 64bit JRE, refer attachment for detailed error log:
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000000000000, pid=1820, tid=8712
#
# JRE version: Java(TM) SE Runtime Environment (7.0_71-b14) (build 1.7.0_71-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.71-b01 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  0x0000000000000000
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
Comment 1 Lakshmi P Shanmugam CLA 2015-05-11 05:42:14 EDT
Thanks Niraj for catching this. I'm able to reproduce on Mac too.
Comment 2 Eclipse Genie CLA 2015-05-11 14:20:41 EDT
New Gerrit change created: https://git.eclipse.org/r/47661
Comment 4 Lakshmi P Shanmugam CLA 2015-05-12 05:53:11 EDT
Download works with the patch on Mac and Linux - 32 & 64 bit.
Comment 5 Dani Megert CLA 2015-05-12 10:42:00 EDT
Please make sure that positive reviews are recorded on the bug report before committing code to RC1.
Comment 6 Niraj Modi CLA 2015-05-13 03:51:34 EDT
Tested on Windows7, fix works fine for XULRunner versions 1.9, 10 and 24.

With XULRunner31:
64bit - no crash observed, but download doesn't starts.
32bit - here behavior is different, clicking on "Save" button to download any file, silently starts the download in background without showing any download-progress dialog(as it shows with other XULRunner versions)
Comment 7 Niraj Modi CLA 2015-05-13 07:57:42 EDT
(In reply to Niraj Modi from comment #6)
> Tested on Windows7, fix works fine for XULRunner versions 1.9, 10 and 24.
> 
> With XULRunner31:
> 64bit - no crash observed, but download doesn't starts.
After few trials with XULRunner31_64bit could see silent download working in background similar to XULRunner31_32bit. May be it was file overriding problem.
Will suggest, we track this issue as separate bug.

Anyways there is no crash observed now, proposed changes looks good.
Comment 8 Lakshmi P Shanmugam CLA 2015-05-13 08:03:24 EDT
(In reply to Niraj Modi from comment #6)
> Tested on Windows7, fix works fine for XULRunner versions 1.9, 10 and 24.
> 
> With XULRunner31:
> 64bit - no crash observed, but download doesn't starts.
> 32bit - here behavior is different, clicking on "Save" button to download
> any file, silently starts the download in background without showing any
> download-progress dialog(as it shows with other XULRunner versions)

(In reply to Niraj Modi from comment #7)
> (In reply to Niraj Modi from comment #6)
> > Tested on Windows7, fix works fine for XULRunner versions 1.9, 10 and 24.
> > 
> > With XULRunner31:
> > 64bit - no crash observed, but download doesn't starts.
> After few trials with XULRunner31_64bit could see silent download working in
> background similar to XULRunner31_32bit. May be it was file overriding
> problem.
> Will suggest, we track this issue as separate bug.
> 
> Anyways there is no crash observed now, proposed changes looks good.

Thanks for testing and verifying the fix.
I've opened Bug 467203 to track the Download progress dialog not showing up issue.