| Summary: | [SWT_AWT] SWT_AWT.new_Shell(display, Canvas) crashes the application with "Invalid memory access" | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Christopher Deckers <chrriis> |
| Component: | SWT | Assignee: | Scott Kovatch <skovatch> |
| Status: | RESOLVED FIXED | QA Contact: | Silenio Quarti <Silenio_Quarti> |
| Severity: | critical | ||
| Priority: | P3 | CC: | eclipse.felipe, ptalbot, remy.suen, Silenio_Quarti, skovatch |
| Version: | 4.0 | ||
| Target Milestone: | 3.7 M3 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
| Attachments: | |||
|
Description
Christopher Deckers
Created attachment 181053 [details]
Test case showing the crash
Click on the 2nd link to cause the crash.
This test case is a simplified version of a framework that eases the integration of SWT controls in Swing. Note that addNotify is called from SWT thread and not from AWT event queue because this simple case does not have all the threading sync mechanisms that the framework has. The same crash happens when threading is done correctly though so I don't think this matters here.
Yes, I experience that one too here on Snow Leopard and this is crippling all our apps! We didn't have that one with SWT 3.6 final. Is this XULRunner-specific? I don't see a crash if I set isMozilla to false. I also don't crash with 1.9.2.10, which is all I could download this morning. Maybe it's specific to 1.9.2.8? Never mind. I re-read the bug; clicking on the second link causes a crash. Looks like I'm not checking for the existence of a subclass before attempting to re-register one. Fixed > 20101018, but I should note that in this example I only get a new window when using WebKit. If isMozilla is true it no longer crashes but doesn't show a new window, either. . (In reply to comment #5) > Fixed > 20101018, but I should note that in this example I only get a new > window when using WebKit. If isMozilla is true it no longer crashes but doesn't > show a new window, either. Thanks a lot for the fast fix! I will cross-check this fix in the coming days. As far as I know the window should open though, so I will open a new bug if I notice the same behavior. Trying this evening with nightly build 20101021 on Snow Leopard with the last Java 6 update (1.6.0_22-b04-307 64-bit) and it works only sometimes for me. Weirdly if I launch it in debug mode from Eclipse, I have better chances of making it work than in run mode. But most of the time I still get an "Invalid memory access of location). It seems to be very random, which is not reassuring. See crash report coming. Created attachment 181575 [details]
Various crashes, freeze and exception when using this test case
Attached an archive of the various crash reports I have compiled, + a thread dump of a freeze and an exception when closing the main frame, all of this in a very short period of time always with the same test case.
This is very random, and overall seems to be always located in [Thread 0 daemon] at various places.
As an additional note, I tried today the same code on Snow Leopard, java 1.6.0_22-b04-307 64-bit, with 3.6.2 M20101020-0925 I don't experience the crashes and various exceptions I have with 3.7 N20101021-2000 (In reply to comment #9) > Created an attachment (id=181575) [details] > Various crashes, freeze and exception when using this test case Looks like the archive is empty. The attachment is only 130 bytes and I get empty folders when I download it. Created attachment 181597 [details]
Crashes, freeze and exception archive
Sorry you are right, here is an valid archive with the crash reports.
What version of XULRunner are you using? So far I'm not seeing this with 1.9.2.10, but I am trying 32-bit. Let me see if I can get this up and running on 64-bit. The crashes happened to me using WebKit (Safari) in 64-bit. (In reply to comment #14) > The crashes happened to me using WebKit (Safari) in 64-bit. I'm opening a couple of windows with the link and then quitting the application by hitting the close button on the first window that appears. So far I'm not getting any crashes with 64-bit SWT and WebKit. I'll keep trying but if you have any new steps to reproduce let me know. Well, that's weird, because I just tried it again, and I have crashes or exceptions one time out of three, either when I launch the snippet, or when I click on the open link. So I don't have steps to reproduce since this is very random (but very frequent!). Could it be some corrupted jar? I will download another nightly and report. Thanks for trying! Tried it with N20101023-2000 and have the same erratic behavior. Even launching the snippet gives me a crash sometimes. Snow Leopard 10.6.4 - Java 1.6.0_22-b04-307 64-bit. Always located in the Thread 0 daemon. I'm at loss as to give you precise instructions to see that, but right now SWT is totally unusable for me... could anyone else try this too? I tried it: works fine except in Patrick's case: - In my test case, set the isMozilla variable to false. - Use the 64bit SWT port (-d64). - Launch the test case. - Click on the 2nd link, close the window that opens. - Repeat the previous step 2 or 3 times -> awful crash. It does not seem to happen in 32 bit but it quickly comes with 64bit. I used I20101025-1800. Created attachment 182483 [details]
Simple SWT_AWT test case crashing almost everytime on 64bit
Launching any SWT_AWT application in 64bit almost everytime crashes when the VM is 64bit and there is a WebKit browser (the default).
This makes the 64bit version of SWT unusable on the Mac.
This still happens in the latest nightly (N20101104-2000)
(In reply to comment #19) > Created an attachment (id=182483) [details] > Simple SWT_AWT test case crashing almost everytime on 64bit I am seeing crashes now with the 64-bit 11/2 i-build, but none of the crashes are in SWT code. At least it's consistent now. Building and testing 64-bit-only changes are a pain, though, so it may take a day or two to figure something out. (In reply to comment #20) Thanks for your efforts Scott! I can well believe that 64-bit only changes are a pain, but it's an architecture more and more people use nowadays. Hi Scott, Any news about this bug? A comment from one user: "I haven't had too much time to follow the SWT bug fixes closely and I refrain from trying it until the crashes with 64-bit is not fixed." Previous SWT versions had too many bugs (=unusable) but newer versions crash on Mac 64bit, so it is not an easy situation. Created attachment 185921 [details] Fix See bug 332389. That bug has the same root cause as this one -- can't add an IVAR to a class that was dynamically subclassed from an already-existing object. (In reply to comment #23) > See bug 332389. That bug has the same root cause as this one -- can't add an > IVAR to a class that was dynamically subclassed from an already-existing > object. This bug will only show up in x86_64, as 64-bit code uses the 'modern objective-C runtime' on 10.5 or 10.6. Given the cause of the crash, I'm surprised it wasn't showing up in 32-bit code as well. Fixed with the commit for bug 332389. |