| Summary: | [Cocoa][10.12] crashes on „macOS Sierra“ related to NSCopyBits | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Till Brychcy <register.eclipse> | ||||||||||
| Component: | SWT | Assignee: | Lakshmi P Shanmugam <lshanmug> | ||||||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | apkdh78, arunkumar.thondapu, avsudhalkar, cdtdoug, daniel_megert, David.Hunka, horacio.vico, jaywettlaufer, jstevenson, julien.dehaudt, lshanmug, peter, prateek.goyal5, sanket.gadiya, vtherli | ||||||||||
| Version: | 4.7 | ||||||||||||
| Target Milestone: | 4.7 M7 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Mac OS X | ||||||||||||
| See Also: |
https://git.eclipse.org/r/82216 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=528fcab722ccdaa43c8d596494e2f2799889db3c https://git.eclipse.org/r/93811 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=089958ed011ab767098213b25c7d079103bdee49 |
||||||||||||
| Whiteboard: | |||||||||||||
| Bug Depends on: | 502090 | ||||||||||||
| Bug Blocks: | 516704 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Till Brychcy
New Gerrit change created: https://git.eclipse.org/r/82216 We have a customer who is running into this in our product. In this case they are not launching Eclipse from Eclipse. They are just using our Eclipse based environment. From the crash log it looks like the same problem 31 com.apple.AppKit 0x00007fffb2aed629 _NSRenderImageFromWindow + 1624 32 com.apple.AppKit 0x00007fffb2aecfb1 _NXScroll + 499 33 com.apple.AppKit 0x00007fffb2fa7a95 NSCopyBitsFromGraphicsContext + 312 34 com.apple.AppKit 0x00007fffb2fa7957 NSCopyBits + 58 35 libswt-pi-cocoa-4623.jnilib 0x000000012985d139 Java_org_eclipse_swt_internal_cocoa_OS_NSCopyBits + 187 I'm setting 4.7M7 as target in the hopes that someone from the SWT team will find time to look at this... Created attachment 267422 [details]
modified Snippet 240
I can reproduce the crash in Canvas.scroll with Snippet 48.
I'm unable to reproduce a crash in GC.copyArea with the attached snippet. However, I think we should replace both the occurrences of NSCopyBits. I'll update the gerrit patch.
Created attachment 267424 [details]
modified Snippet240
Attached the modified Snippet240
Gerrit change https://git.eclipse.org/r/82216 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=528fcab722ccdaa43c8d596494e2f2799889db3c Created attachment 267426 [details]
modified Snippet240
attached modified Snippet240
Thanks Till, for the bug report and the initial patch! New Gerrit change created: https://git.eclipse.org/r/93811 Gerrit change https://git.eclipse.org/r/93811 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=089958ed011ab767098213b25c7d079103bdee49 Verified in I20170508-2000 *** Bug 525879 has been marked as a duplicate of this bug. *** I was able to reproduce a similar issue in Eclipse Oxygen. When I select multiple lines and hit "delete"key it crashes eclipse: Stack: Stack: [0x00007ffeef400000,0x00007ffeefc00000], sp=0x00007ffeefbf60b0, free space=8152k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libsystem_platform.dylib+0x5091] _platform_memmove$VARIANT$Haswell+0x171 C [CoreGraphics+0x29795] CGBlt_copyBytes+0x165 C [CoreGraphics+0x2add7] argb32_image+0x1387 C [CoreGraphics+0x3924e1] ripl_Mark+0x16 C [CoreGraphics+0x38e8f9] RIPLayerBltImage+0x40b C [CoreGraphics+0xfa803] ripc_RenderImage+0xe4 C [CoreGraphics+0xfbe1e] ripc_DrawImage+0x34f C [CoreGraphics+0x65a30] CGContextDelegateDrawImage+0x29 C [AppKit+0x1d616f] __backing_store_DrawImage_block_invoke+0x46 C [AppKit+0x1d24a1] backing_store_delegate+0x3c2 C [AppKit+0x4cc666] backing_store_DrawImage.llvm.20A1ED98+0x202 C [CoreGraphics+0x65a30] CGContextDelegateDrawImage+0x29 C [AppKit+0x4cd500] backing_store_DrawWindowContents.llvm.20A1ED98+0x4ad C [CoreGraphics+0x6ef0c] CGContextDelegateDrawWindowContents+0x3b C [SkyLight+0x1cf0d8] SLContextCopyWindowContentsToRect+0xb2 C [AppKit+0x3ad97b] _NSRenderImageFromWindow+0x5ae C [AppKit+0x3ad3ad] _NXScroll+0x1c3 C [AppKit+0x95a506] NSCopyBitsFromGraphicsContext+0x138 C [AppKit+0x95a3c8] NSCopyBits+0x3a C [libswt-pi-cocoa-4711.jnilib+0xbdb0] Java_org_eclipse_swt_internal_cocoa_OS_NSCopyBits+0x120 j org.eclipse.swt.internal.cocoa.OS.NSCopyBits(JLorg/eclipse/swt/internal/cocoa/NSRect;Lorg/eclipse/swt/internal/cocoa/NSPoint;)V+0 j org.eclipse.swt.widgets.Canvas.scroll(IIIIIIZ)V+326 j org.eclipse.swt.custom.StyledText.scroll(IIIIIIZ)V+11 j org.eclipse.swt.custom.StyledText.scrollText(II)V+75 j org.eclipse.swt.custom.StyledText.handleTextChanging(Lorg/eclipse/swt/custom/TextChangingEvent;)V+180 j org.eclipse.swt.custom.StyledText$5.textChanging(Lorg/eclipse/swt/custom/TextChangingEvent;)V+5 j org.eclipse.jface.text.DefaultDocumentAdapter.fireTextChanging()V+195 j org.eclipse.jface.text.DefaultDocumentAdapter.documentAboutToBeChanged(Lorg/eclipse/jface/text/DocumentEvent;)V+50 j org.eclipse.jface.text.AbstractDocument.fireDocumentAboutToBeChanged(Lorg/eclipse/jface/text/DocumentEvent;)V+121 (In reply to AMIT SUDHALKAR from comment #13) > I was able to reproduce a similar issue in Eclipse Oxygen. When I select > multiple lines and hit "delete"key it crashes eclipse: > [...] > Stack: [...] > C [libswt-pi-cocoa-4711.jnilib+0xbdb0] This line shows that you are using an milestone build of Oxygen, Eclipse4.7M2.app This bug was fixed in 4.7M7 I downloaded the latest one available on the download site, where do I get the one with the fix, or is there a way to back port the fix to this version ? Appreciate your help. I downloaded the latest one available on the download site, where do I get the one with the fix, or is there a way to back port the fix to this version ? Appreciate your help. Is this the link to download the M7 version: https://www.eclipse.org/downloads/packages/release/Oxygen/M7 (In reply to Till Brychcy from comment #14) > (In reply to AMIT SUDHALKAR from comment #13) > > I was able to reproduce a similar issue in Eclipse Oxygen. When I select > > multiple lines and hit "delete"key it crashes eclipse: > > > [...] > > Stack: > [...] > > C [libswt-pi-cocoa-4711.jnilib+0xbdb0] > > This line shows that you are using an milestone build of Oxygen, > Eclipse4.7M2.app > > This bug was fixed in 4.7M7 (In reply to AMIT SUDHALKAR from comment #17) > Is this the link to download the M7 version: > 4.7M7 is old by now, too. If you'd download something today, I'd suggest 4.7.1a with java 9 and unit 5 support: http://download.eclipse.org/eclipse/downloads/drops4/R-4.7.1a-201710090410/ or any of the packages on https://www.eclipse.org/downloads/eclipse-packages/ (I think they are still 4.7.1 based, without java 9 and unit 5) I don't have JDK9 so, downloaded Eclipse 4.7 M7 from the link: https://www.eclipse.org/downloads/packages/release/Oxygen/M7 Eclipse About: ================= Eclipse Java EE IDE for Web Developers. Version: Oxygen Release Milestone 7 (4.7.0 M7) Build id: 20170519-0031 ================= (In reply to Till Brychcy from comment #18) > (In reply to AMIT SUDHALKAR from comment #17) > > Is this the link to download the M7 version: > > > > 4.7M7 is old by now, too. > > If you'd download something today, I'd suggest 4.7.1a with java 9 and unit 5 > support: > > http://download.eclipse.org/eclipse/downloads/drops4/R-4.7.1a-201710090410/ > > > or any of the packages on > > https://www.eclipse.org/downloads/eclipse-packages/ > (I think they are still 4.7.1 based, without java 9 and unit 5) *** Bug 526183 has been marked as a duplicate of this bug. *** Created attachment 271820 [details]
Neon crash log
Any thoughts to backport the fix into Neon ?
Some of our users are facing this crash when launching a debug session in our RCP based on Neon, and unfortunately, Oxygen integration is not in short terms plan...
Thanks guys.
(In reply to Julien D from comment #21) > Created attachment 271820 [details] > Neon crash log > > Any thoughts to backport the fix into Neon ? > There are no more releases for Neon. Maintenance builds are available only for Oxygen (4.7). The fix has been backported to the R4_6_maintenance branch [1], but as mentioned before there will be no builds from the R4_6 branch. You'll have to build the SWT jar with the new libraries yourself. [1] http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?h=R4_6_maintenance&id=05ad9a7ee80cc8b6c65d65863a1226f3a6745c11 http://git.eclipse.org/c/platform/eclipse.platform.swt.binaries.git/commit/?h=R4_6_maintenance&id=d2025836e4cbce56fb212a9d7e802e6aca1bc99b *** Bug 528946 has been marked as a duplicate of this bug. *** *** Bug 527171 has been marked as a duplicate of this bug. *** Is it possible to backport above changes in Eclipse 4.5.2 mars? I am trying to do these changes in Eclipse 4.5.2 Mars on OSX 10.13.4, that has Xcode 9.3. I also downloaded Xulrunner SDK 31 64bit for osx . But I am getting below compilation errors in building libswt-xulrunner-cocoa-4530.jnilib. e.g. - [exec] xpcom.cpp:85:15: error: unknown type name 'nsStaticModuleInfo' [exec] rc = (jint)((SWT_XREInitEmbedding)arg0)((nsILocalFile *)arg1, (nsILocalFile *)arg2, (nsIDirectoryServiceProvider *)arg3, (nsStaticModuleInfo const *)arg4, arg5); [exec] xpcom.cpp:183:13: error: no matching function for call to 'NS_NewLocalFile' [exec] rc = (jint)NS_NewLocalFile((nsAString *)arg0, arg1, (nsILocalFile*)lparg2); [exec] xpcom.cpp:6836:13: error: use of undeclared identifier 'XPCOMGlueShutdown' [exec] rc = (jint)XPCOMGlueShutdown(); Could you tell me how you are using xulrunner SDK to build macosx native jar? I am still seeing this issue in Oxygen Release Milestone 2 (4.7.0 M2). My MacOS version is: 10.13.3 (17D102). (In reply to prateek goyal from comment #26) > I am still seeing this issue in Oxygen Release Milestone 2 (4.7.0 M2). > > My MacOS version is: 10.13.3 (17D102). Of course you do. The fix went into M4. (In reply to Dani Megert from comment #27) > (In reply to prateek goyal from comment #26) > > I am still seeing this issue in Oxygen Release Milestone 2 (4.7.0 M2). > > > > My MacOS version is: 10.13.3 (17D102). > > Of course you do. The fix went into M4. Sorry, M7. (In reply to Dani Megert from comment #28) > (In reply to Dani Megert from comment #27) > > (In reply to prateek goyal from comment #26) > > > I am still seeing this issue in Oxygen Release Milestone 2 (4.7.0 M2). > > > > > > My MacOS version is: 10.13.3 (17D102). > > > > Of course you do. The fix went into M4. > > Sorry, M7. Thanks a lot. Sorry for incovenience. *** Bug 536245 has been marked as a duplicate of this bug. *** |