Bug 548430 - [Cocoa] NullPointerException in Image.internal_new_GC (4.12.0RC2)
Summary: [Cocoa] NullPointerException in Image.internal_new_GC (4.12.0RC2)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.12   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 4.16 M3   Edit
Assignee: Sravan Kumar Lakkimsetti CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 548961 559404 559628 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-06-19 08:58 EDT by Juergen Baier CLA
Modified: 2020-05-20 04:57 EDT (History)
22 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Baier CLA 2019-06-19 08:58:28 EDT
I just noticed some exceptions in the Eclipse error log. I'm currently running 4.12 RC2 on macOS Mojave.

There are similar existing issues in the same method, but I'm not sure if this is something different.

Note that this is a fresh install, without additional plugins.


!ENTRY org.eclipse.ui 4 0 2019-06-19 12:08:14.946
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at org.eclipse.swt.graphics.Image.internal_new_GC(Image.java:1597)
	at org.eclipse.swt.graphics.GC.<init>(GC.java:262)
	at org.eclipse.swt.graphics.GC.<init>(GC.java:223)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBufferPaint(AnnotationRulerColumn.java:531)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.lambda$1(AnnotationRulerColumn.java:266)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4364)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
	at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1278)
	at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:176)
	at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:776)
	at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:170)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5996)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend_bool(Native Method)
	at org.eclipse.swt.internal.cocoa.NSRunLoop.runMode(NSRunLoop.java:45)
	at org.eclipse.swt.widgets.Display.sleep(Display.java:4934)
	at org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(WorkbenchAdvisor.java:360)
	at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.eventLoopIdle(IDEWorkbenchAdvisor.java:949)
	at org.eclipse.ui.internal.Workbench$1.eventLoopIdle(Workbench.java:483)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1178)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:635)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
Comment 1 Sravan Kumar Lakkimsetti CLA 2019-06-21 02:36:47 EDT
I don't see this problem on Mac. I am using 
Eclipse SDK
Version: 2019-09 (4.13)
Build id: I20190620-1800
OS: Mac OS X, v.10.14.5, x86_64 / cocoa
Java version: 11.0.1

Do you have a reproducible scenario which I can use?
Comment 2 Juergen Baier CLA 2019-06-21 04:37:46 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #1)
> I don't see this problem on Mac. I am using 
> Eclipse SDK
> Version: 2019-09 (4.13)
> Build id: I20190620-1800
> OS: Mac OS X, v.10.14.5, x86_64 / cocoa
> Java version: 11.0.1
> 
> Do you have a reproducible scenario which I can use?

Sorry, I could not reproduce this in a reliable way. At the time I tried out RC2 I switched some code mining settings on and off, created a new .classpath and .project via the Gradle buildship plugin.

I could not find the errors again in my logfile after I installed the release version.
Comment 3 Nicolas Chamouard CLA 2019-06-21 08:58:32 EDT
I have the same bug : 

Version: 2019-06 (4.12.0)
Build id: 20190614-1200
Mac OS X, v.10.14.5
Java 9.04

It seems to happen when eclipse in in full screen mode (green button)
I click on another app in my other screen
When I come back to the java editor each event (click, scroll ..) makes the error appear multiple times
If i close the current java file no more error are created.
Comment 4 bandolero perez CLA 2019-06-28 05:54:43 EDT
Same error, slight different stack trace

MacOS10.14.5

eclipse.buildId=4.12.0.I20190605-1800
java.version=1.8.0_202-ea
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_GB
Framework arguments:  -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -keyring /Users/***/.eclipse_keyring
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.jee.product -data file:/Users/***/Documents/workspace/ -product org.eclipse.epp.package.jee.product -keyring /Users/***/.eclipse_keyring

org.eclipse.ui
Error
Fri Jun 28 11:52:09 CEST 2019
Unhandled event loop exception

java.lang.NullPointerException
	at org.eclipse.swt.graphics.Image.internal_new_GC(Image.java:1597)
	at org.eclipse.swt.graphics.GC.<init>(GC.java:262)
	at org.eclipse.swt.graphics.GC.<init>(GC.java:223)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBufferPaint(AnnotationRulerColumn.java:531)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.lambda$1(AnnotationRulerColumn.java:266)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4364)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
	at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1278)
	at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:176)
	at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:776)
	at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:170)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5996)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:5242)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5674)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:97)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3762)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
	at org.eclipse.jface.window.Window.open(Window.java:799)
	at org.eclipse.ui.internal.views.log.EventDetailsDialog.open(EventDetailsDialog.java:191)
	at org.eclipse.ui.internal.views.log.EventDetailsDialogAction.run(EventDetailsDialogAction.java:102)
	at org.eclipse.ui.internal.views.log.LogView.lambda$2(LogView.java:565)
	at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:776)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:176)
	at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:773)
	at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1516)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1203)
	at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:251)
	at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:249)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:308)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4364)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4151)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3768)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:635)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
Comment 5 Lakshmi P Shanmugam CLA 2019-06-28 06:01:04 EDT
(In reply to bandolero perez from comment #4)
When do get this exception? Any steps to reproduce?
Comment 6 Nicolas Chamouard CLA 2019-07-02 11:29:35 EDT
I don't know the name of the vertical bar at the right of the Java Editor vertical scroll bar. This bar displays small rectangles indicating the location of the warnings and errors in the file.

When the exception occurs, this bar is empty and do not display the small rectangles anymore.
Comment 7 Nicolas Chamouard CLA 2019-08-19 04:39:30 EDT
Maybe this can help, macOs logs also report the error

erreur	10:19:51.932200 +0200	eclipse	CGBitmapContextCreate: unsupported parameter combination: set CGBITMAP_CONTEXT_LOG_ERRORS environmental variable to see the details
erreur	10:19:51.932400 +0200	eclipse	CGContextScaleCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
erreur	10:19:51.932543 +0200	eclipse	CGContextGetCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
erreur	10:19:51.932657 +0200	eclipse	CGContextSetBaseCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

I have a MacBookPro12,1 with Iris 6100 Graphics
Comment 8 Sravan Kumar Lakkimsetti CLA 2019-08-19 22:38:51 EDT
I think this is related to deprecation of NSAlphaNonpremultipliedBitmapFormat in 10.14.

During debugging of bug 549210 I noticed a problem with not able to create context on a imageRep created with NSAlphaNonpremultipliedBitmapFormat.

https://git.eclipse.org/r/146428 should fix this problem
Comment 9 Eclipse Genie CLA 2019-08-27 02:47:28 EDT
New Gerrit change created: https://git.eclipse.org/r/148386
Comment 10 Sravan Kumar Lakkimsetti CLA 2019-08-29 02:28:54 EDT
(In reply to Eclipse Genie from comment #9)
> New Gerrit change created: https://git.eclipse.org/r/148386

Can some one in the community test this patch? We having difficulty in getting test case for this problem. It would be helpful if some one tests on MAc os 10.14
Comment 11 Sravan Kumar Lakkimsetti CLA 2019-09-04 01:24:15 EDT
Since we don't have a reproducible scenario. It is deemed risky fix for 4.13RC2. Somoving to 4.14M1
Comment 12 Greg Amerson CLA 2019-09-19 13:06:07 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #10)
> (In reply to Eclipse Genie from comment #9)
> > New Gerrit change created: https://git.eclipse.org/r/148386
> 
> Can some one in the community test this patch? We having difficulty in
> getting test case for this problem. It would be helpful if some one tests on
> MAc os 10.14

I am seeing the reported error in my environment.  How can I test the patch?  I guess I just need a link to documentation on how to build SWT jars for MacOS locally.
Comment 13 Pierre-Yves Bigourdan CLA 2019-10-04 04:32:59 EDT
(In reply to Greg Amerson from comment #12)
> I am seeing the reported error in my environment.  How can I test the patch?
> I guess I just need a link to documentation on how to build SWT jars for
> MacOS locally.

I've never tried doing this myself, but maybe these links will help:
* https://www.eclipse.org/swt/macgen.php
* https://wiki.eclipse.org/SWT/Developer_Guide#Build_SWT
Comment 14 Pierre-Yves Bigourdan CLA 2019-10-14 04:42:10 EDT
Could this get merged? I'm happy to test in the next milestone, but I'm not able to build SWT from scratch on my work machine. That's what milestones are for anyway, gathering wider user feedback, rather than just from one of two people. :)
Comment 16 Sravan Kumar Lakkimsetti CLA 2019-10-14 05:07:58 EDT
(In reply to Eclipse Genie from comment #15)
> Gerrit change https://git.eclipse.org/r/148386 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=b67d97f3c9f47daebc8c5a79fb2125d8c1bfcb0a

it is merged now. Please verify this bug in to night's build
Comment 17 Pierre-Yves Bigourdan CLA 2019-10-15 04:58:15 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #16)
> it is merged now. Please verify this bug in to night's build

Given that this only happens in occasional bursts on my macOS and I haven't figured a definite way to reproduce it either, I figured it would be simpler to just upgrade my Eclipse to the nightly build and keep on working as usual. However, when I add the nightly update site (http://download.eclipse.org/eclipse/updates/4.14-I-builds) and try updating my installation, I get one of those infamous errors:

Cannot complete the install because of a conflicting dependency.
  Software being installed: Eclipse Platform 4.14.0.v20191014-2022 (org.eclipse.platform.feature.group 4.14.0.v20191014-2022)
  Software currently installed: Eclipse IDE for Java Developers 4.13.0.20190917-0000 (epp.package.java 4.13.0.20190917-0000)
  Only one of the following can be installed at once: 
    Ant Build Tool Core 3.5.500.v20190701-1953 (org.eclipse.ant.core 3.5.500.v20190701-1953)
    Ant Build Tool Core 3.5.600.v20190914-1928 (org.eclipse.ant.core 3.5.600.v20190914-1928)
  Cannot satisfy dependency:
    From: Eclipse IDE for Java Developers 4.13.0.20190917-0000 (epp.package.java 4.13.0.20190917-0000)
    To: org.eclipse.equinox.p2.iu; org.eclipse.platform.feature.group [4.13.0.v20190916-1323,4.13.0.v20190916-1323]
  Cannot satisfy dependency:
    From: Eclipse Platform 4.13.0.v20190916-1323 (org.eclipse.platform.feature.group 4.13.0.v20190916-1323)
    To: org.eclipse.equinox.p2.iu; org.eclipse.ant.core [3.5.500.v20190701-1953,3.5.500.v20190701-1953]
  Cannot satisfy dependency:
    From: Eclipse Platform 4.14.0.v20191014-2022 (org.eclipse.platform.feature.group 4.14.0.v20191014-2022)
    To: org.eclipse.equinox.p2.iu; org.eclipse.ant.core [3.5.600.v20190914-1928,3.5.600.v20190914-1928]


I then attempted to install the nightly via the Oomph installer and selected "Latest 2019-12" as the version. However, this does not work either and simply installs 2019-09 (not even 4.14M1).
Comment 18 Sravan Kumar Lakkimsetti CLA 2019-10-16 00:56:23 EDT
4.14M1 is due this week. new simrel repo should be available by Friday. Please try using new simrel repo
Comment 19 Pierre-Yves Bigourdan CLA 2019-10-17 04:12:36 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #18)
> 4.14M1 is due this week. new simrel repo should be available by Friday.
> Please try using new simrel repo

Do you mean http://download.eclipse.org/releases/2019-12? At the time of writing, this still points to the old 2019-09 packages. I'm guessing that's why the Oomph installation is not working correctly either.
Comment 20 Sravan Kumar Lakkimsetti CLA 2019-10-17 04:49:09 EDT
(In reply to Pierre-Yves B. from comment #19)
> (In reply to Sravan Kumar Lakkimsetti from comment #18)
> > 4.14M1 is due this week. new simrel repo should be available by Friday.
> > Please try using new simrel repo
> 
> Do you mean http://download.eclipse.org/releases/2019-12? At the time of
> writing, this still points to the old 2019-09 packages. I'm guessing that's
> why the Oomph installation is not working correctly either.

2019-12M1 still not yet out. The repo will get built tonight. Here are the steps you need to follow

1. Use 2019-12 repo to upgrade to M1(staging repo should be available tonight and final M1 version will be available tomorrow) URL: https://download.eclipse.org/releases/2019-12/
2. Use 4.14-I-builds repo to move platform to latest version. URL: https://download.eclipse.org/eclipse/updates/4.14-I-builds/
Comment 21 Pierre-Yves Bigourdan CLA 2019-10-21 10:32:42 EDT
I've been running the latest nightly all day. I haven't had any of those "Unhandled event loop exception" errors and haven't noticed anything else odd. Seems like the issue is fixed!
Comment 22 Karsten Thoms CLA 2019-10-21 11:12:40 EDT
Thanks for the feedback. Setting to fixed. If it still can be reproduced, please provide steps and feel free to reopen.
Comment 23 Sravan Kumar Lakkimsetti CLA 2019-11-20 05:30:09 EST
Based on comment 21 marking this as verified
Comment 24 Pierre-Yves Bigourdan CLA 2019-11-20 05:47:08 EST
I've been heavily using the nightly builds lately and unfortunately I'm seeing a lot of these errors again. I'm unsure whether:
* the issue was never actually solved and I was lucky when testing in comment 21.
* a more recent SWT commit broke things again.
* upgrading to Catalina on my macOS has triggered new similar problems.
* something else.

Could we reopen? I'll try to start with a fresh install and come up with steps to reproduce. We may want to consider reverting the patch.
Comment 25 Sravan Kumar Lakkimsetti CLA 2019-11-20 05:53:41 EST
(In reply to Pierre-Yves B. from comment #24)
> I've been heavily using the nightly builds lately and unfortunately I'm
> seeing a lot of these errors again. I'm unsure whether:
> * the issue was never actually solved and I was lucky when testing in
> comment 21.
> * a more recent SWT commit broke things again.
> * upgrading to Catalina on my macOS has triggered new similar problems.
> * something else.
> 
> Could we reopen? I'll try to start with a fresh install and come up with
> steps to reproduce. We may want to consider reverting the patch.

Sure. please let us know how to reproduce and reopen
Comment 26 Pierre-Yves Bigourdan CLA 2019-11-20 06:53:43 EST
Okay, I've got some steps to reproduce.

* plug an external screen into your macOS.
* open the Oomph Installer (I'm using 1.14.0 Build 4222).
* install Latest (2019-12) of the Eclipse IDE for Java Developers version of Eclipse, keeping all other options as defaults.
* open the freshly installed Eclipse in a brand new workspace.
* create a new "test" general project.
* create a new "test" file and leave it open in the editor.
* put Eclipse in the plugged in screen.
* unplug the external screen; Eclipse will jump back to your main macOS screen.
* plug the external screen again; Eclipse should head back there.
* errors should have appeared in the Error Log view.

Note that I don't have Bugzilla rights to reopen this issue, someone else has to take care of that. :)
Comment 27 Pierre-Yves Bigourdan CLA 2019-11-20 12:17:59 EST
Different way to reproduce the issue:

* plug an external screen into your macOS.
* open the Oomph Installer (I'm using 1.14.0 Build 4222).
* install Latest (2019-12) of the Eclipse IDE for Java Developers version of Eclipse, keeping all other options as defaults.
* open the freshly installed Eclipse in a brand new workspace.
* create a new "test" general project.
* create a new "test" file and leave it open in the editor.
* put Eclipse in the plugged in screen.
* put the macOS to sleep.
* log back in.
* errors should have appeared in the Error Log view.

Example stack trace I'm getting:

java.lang.NullPointerException
	at org.eclipse.swt.graphics.Image.internal_new_GC(Image.java:1598)
	at org.eclipse.swt.graphics.GC.<init>(GC.java:262)
	at org.eclipse.swt.graphics.GC.<init>(GC.java:223)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBufferPaint(AnnotationRulerColumn.java:539)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.lambda$1(AnnotationRulerColumn.java:274)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4406)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
	at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1278)
	at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:176)
	at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:776)
	at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:170)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6043)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:5284)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5716)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:97)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3804)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:660)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Comment 28 Sravan Kumar Lakkimsetti CLA 2019-11-22 01:56:41 EST
Reopening based on comment 27
Comment 29 Lakshmi P Shanmugam CLA 2019-11-25 06:04:16 EST
@Sravan, changing target from M3 to 4.14. Please re-target as  required.
Comment 30 Sravan Kumar Lakkimsetti CLA 2019-11-26 05:19:29 EST
The problem described in Comment 27 needs to be investigated. Its too late for 4.14 so moving out
Comment 31 Pierre-Yves Bigourdan CLA 2019-11-27 05:16:28 EST
Note that in addition to the error spamming in the Error Log view, this causes all lines numbers to disappear from open editors.
Comment 32 Matthias Becker CLA 2019-12-23 08:29:36 EST
(In reply to Pierre-Yves B. from comment #27)
> Different way to reproduce the issue:
> 
> * plug an external screen into your macOS.
> * open the Oomph Installer (I'm using 1.14.0 Build 4222).
> * install Latest (2019-12) of the Eclipse IDE for Java Developers version of
> Eclipse, keeping all other options as defaults.
> * open the freshly installed Eclipse in a brand new workspace.
> * create a new "test" general project.
> * create a new "test" file and leave it open in the editor.
> * put Eclipse in the plugged in screen.
> * put the macOS to sleep.
> * log back in.
> * errors should have appeared in the Error Log view.
> 

I did this. With macOS 10.14.6. I don't get the error
Comment 33 Pierre-Yves Bigourdan CLA 2019-12-23 09:15:28 EST
(In reply to Matthias Becker from comment #32)
> (In reply to Pierre-Yves B. from comment #27)
> > Different way to reproduce the issue:
> > 
> > * plug an external screen into your macOS.
> > * open the Oomph Installer (I'm using 1.14.0 Build 4222).
> > * install Latest (2019-12) of the Eclipse IDE for Java Developers version of
> > Eclipse, keeping all other options as defaults.
> > * open the freshly installed Eclipse in a brand new workspace.
> > * create a new "test" general project.
> > * create a new "test" file and leave it open in the editor.
> > * put Eclipse in the plugged in screen.
> > * put the macOS to sleep.
> > * log back in.
> > * errors should have appeared in the Error Log view.
> > 
> 
> I did this. With macOS 10.14.6. I don't get the error

I'm using 10.15.2. the external screen is also rotated (portrait mode), I don't know whether that would have an impact.
Comment 34 Sravan Kumar Lakkimsetti CLA 2020-01-02 04:15:58 EST
(In reply to Pierre-Yves B. from comment #33)
> (In reply to Matthias Becker from comment #32)
> > (In reply to Pierre-Yves B. from comment #27)
> > > Different way to reproduce the issue:
> > > 
> > > * plug an external screen into your macOS.
> > > * open the Oomph Installer (I'm using 1.14.0 Build 4222).
> > > * install Latest (2019-12) of the Eclipse IDE for Java Developers version of
> > > Eclipse, keeping all other options as defaults.
> > > * open the freshly installed Eclipse in a brand new workspace.
> > > * create a new "test" general project.
> > > * create a new "test" file and leave it open in the editor.
> > > * put Eclipse in the plugged in screen.
> > > * put the macOS to sleep.
> > > * log back in.
> > > * errors should have appeared in the Error Log view.
> > > 
> > 
> > I did this. With macOS 10.14.6. I don't get the error
> 
> I'm using 10.15.2. the external screen is also rotated (portrait mode), I
> don't know whether that would have an impact.

I tried on Mac OS 10.15.2, I am not able to reproduce this problem.

Here are my system details
MacBook Pro 15 inch with touch bar with retina display
External Display: ViewSonic VX2475 4K Monitor

I tested this bu running external monitor in both retina mode and non retina mode. I don't see this problem. 

On a side note, I would prefer opening a new bug for this use case as the original usecase is resolved. you can still make them related
Comment 35 Nicolas Falliere CLA 2020-01-04 11:03:52 EST
Confirming seeing this exact stack trace on macOS 10.15.2, 10.15.1, 10.14.5.
Comment 36 Lakshmi P Shanmugam CLA 2020-01-21 01:57:22 EST
I ran into this issue today on macOS 10.15.1 and I20200110-1805. Happens only when eclipse is on the secondary monitor.

Steps to reproduce:
1. Launch eclipse and move it to the secondary monitor.
2. Open a file, such as Text.java
3. Minimize eclipse
4. Open minimized eclipse

Switching between open editors in eclipse also causes the same problem.

The editor doesn't show the line numbers and unhandled event loop exeception occurs with the same stack trace as in comment#0.
Comment 37 Lakshmi P Shanmugam CLA 2020-01-24 00:08:31 EST
*** Bug 559404 has been marked as a duplicate of this bug. ***
Comment 38 Lakshmi P Shanmugam CLA 2020-01-29 00:19:10 EST
*** Bug 548961 has been marked as a duplicate of this bug. ***
Comment 39 Gunnar Wagenknecht CLA 2020-01-29 01:37:05 EST
(In reply to Lakshmi Shanmugam from comment #36)
> I ran into this issue today on macOS 10.15.1 and I20200110-1805. Happens
> only when eclipse is on the secondary monitor.

FWIW, my setup involves a secondary monitor, too. But I only use Eclipse on my primary screen. The secondary I have in portrait mode.

Usually I noticed it happening when I tab-away to a different app (Cmd+tab) and then tab back to Eclipse -> all line numbers and annotations on the left and right side of the Java editor are gone.
Comment 40 Andrey Loskutov CLA 2020-01-29 01:38:17 EST
*** Bug 559628 has been marked as a duplicate of this bug. ***
Comment 41 Sravan Kumar Lakkimsetti CLA 2020-01-29 05:01:23 EST
I am able to reproduce this with the following configuration

1. OS 10.15.2
2. Primary monitor is retina display
3. Secondary monitor is non retina display

This problem is not reproduced if the secondary monitor is also a Retina monitor

The specific call that is failing is NSGraphicsContext.graphicsContextWithBitmapImageRep(imageRep) this returns null

Here is location of the code https://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/bundles/org.eclipse.swt/Eclipse%20SWT/cocoa/org/eclipse/swt/graphics/Image.java#n1636

Any help in to investigate this issue is greatly appreciated
Comment 42 Pierre-Yves Bigourdan CLA 2020-01-29 06:26:21 EST
(In reply to Sravan Kumar Lakkimsetti from comment #41)
> I am able to reproduce this with the following configuration
> 
> 1. OS 10.15.2
> 2. Primary monitor is retina display
> 3. Secondary monitor is non retina display

This is consistent with what I'm observing. My secondary monitors are  standard Hewlett-Packard screens.
Comment 43 Paddy Walsh CLA 2020-01-31 04:13:55 EST
I can reproduce this on macOS 10.14.6 with built in retina display, secondary Apple Thunderbolt display and tertiary Dell display. Eclipse is on the Thunderbolt.
Comment 44 Sravan Kumar Lakkimsetti CLA 2020-02-28 01:34:04 EST
Yest to get a response from Cocoa mailing lists. moving to 4.16
Comment 45 Serano Colameo CLA 2020-02-29 09:38:47 EST
Eclipse 2019-12 / macOS 10.15.3

Dual display macBookPro 13" + LG 34"

====================================

eclipse.buildId=4.14.0.I20191210-0610
java.version=1.8.0_221
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_CH
Framework arguments:  -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product -keyring /Users/serano/.eclipse_keyring
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product -data file:/Users/serano/Development/eclipse/4.14/eclipse-jhipster/ws/ -product org.eclipse.epp.package.java.product -keyring /Users/serano/.eclipse_keyring

---

java.lang.NullPointerException
	at org.eclipse.swt.graphics.Image.internal_new_GC(Image.java:1598)
	at org.eclipse.swt.graphics.GC.<init>(GC.java:262)
	at org.eclipse.swt.graphics.GC.<init>(GC.java:223)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBufferPaint(AnnotationRulerColumn.java:539)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.lambda$1(AnnotationRulerColumn.java:274)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4406)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
	at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1278)
	at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:176)
	at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:776)
	at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:170)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6043)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:5284)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5716)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:97)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3804)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:660)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Comment 46 Nicolas Falliere CLA 2020-03-03 12:19:08 EST
I see this is marked TO BE FIXED for 4.16?

Any possibility to have a fix or at least work-around for the 4.15 on March 18? It seems like tons of users are impacted by this bug :(
Comment 47 Sravan Kumar Lakkimsetti CLA 2020-03-03 22:15:29 EST
This is a problem with Cocoa. The image context does not get created in this specific case. 

Asked on mailing list as suggested by Lakshmi but there is no response. Here is the link
https://www.mail-archive.com/cocoa-dev@lists.apple.com/msg109407.html

I am at loss on how to proceed further. If any one has any information please comment on this bug

Thanks
Comment 48 Lakshmi P Shanmugam CLA 2020-03-03 23:07:48 EST
(In reply to Sravan Kumar Lakkimsetti from comment #47)
> This is a problem with Cocoa. The image context does not get created in this
> specific case. 
> 
> Asked on mailing list as suggested by Lakshmi but there is no response. Here
> is the link
> https://www.mail-archive.com/cocoa-dev@lists.apple.com/msg109407.html
> 
I see no question in the link, it shows only the title.
Comment 49 Sravan Kumar Lakkimsetti CLA 2020-03-03 23:13:42 EST
(In reply to Lakshmi Shanmugam from comment #48)
> (In reply to Sravan Kumar Lakkimsetti from comment #47)
> > This is a problem with Cocoa. The image context does not get created in this
> > specific case. 
> > 
> > Asked on mailing list as suggested by Lakshmi but there is no response. Here
> > is the link
> > https://www.mail-archive.com/cocoa-dev@lists.apple.com/msg109407.html
> > 
> I see no question in the link, it shows only the title.

I forwarded the mail again. Please check if I made any mistake
Comment 50 Gunnar Wagenknecht CLA 2020-03-04 01:07:34 EST
(In reply to Sravan Kumar Lakkimsetti from comment #49)
> > I see no question in the link, it shows only the title.
> 
> I forwarded the mail again. Please check if I made any mistake

Same issue with the last email. It's empty:
https://www.mail-archive.com/cocoa-dev@lists.apple.com/msg109459.html
Comment 51 Gunnar Wagenknecht CLA 2020-03-04 01:13:30 EST
(In reply to Gunnar Wagenknecht from comment #50)
> (In reply to Sravan Kumar Lakkimsetti from comment #49)
> > > I see no question in the link, it shows only the title.
> > 
> > I forwarded the mail again. Please check if I made any mistake
> 
> Same issue with the last email. It's empty:
> https://www.mail-archive.com/cocoa-dev@lists.apple.com/msg109459.html

BTW, it's also empty in the Apple Mailing List archive:
https://lists.apple.com/archives/cocoa-dev/2020/Mar/msg00011.html

Can this be an issue with how the mail is formatted before sending it to the list? Perhaps you can send it as plain text mail to the list?
Comment 52 Sravan Kumar Lakkimsetti CLA 2020-03-04 01:21:32 EST
Finally it went out 

https://lists.apple.com/archives/cocoa-dev/2020/Mar/msg00012.html

Thanks Gunnar
Comment 53 Pierre-Yves Bigourdan CLA 2020-03-04 17:11:07 EST
Your response seems to be empty as well now: https://lists.apple.com/archives/cocoa-dev/2020/Mar/msg00018.html
Comment 54 Dani Megert CLA 2020-03-05 04:28:09 EST
(In reply to Pierre-Yves B. from comment #53)
> Your response seems to be empty as well now:
> https://lists.apple.com/archives/cocoa-dev/2020/Mar/msg00018.html
The links at the bottom lead to the "real" response:
https://lists.apple.com/archives/cocoa-dev/2020/Mar/msg00017.html

Can someone please provide the requested info.
Comment 55 Dawid Pakula CLA 2020-03-08 10:48:26 EDT
I made some tests and looks like its a problem with Image representation cache.

As and workaround in case when  NSGraphicsContext.graphicsContextWithBitmapImageRep(imageRep) return null, Image.getRepresentation() should create new NSBitmapImageRep rather than reuse old from NSImage.representations.
Comment 56 Dawid Pakula CLA 2020-03-09 05:15:31 EDT
This code is strange, maybe someone can explain a reason. Image.getRepresentation is called during destroy and also during redraw (for example LineNumberRulerColumn.doubleBufferPaint).

And on each draw call NSImage.representation call:
1. Iterate over all representations to find correct one
2. If not found: 
2.1. if scale 100: create 100, addRepresentation, release
2.2. if scale 200 but exists 100: mark 100 as retain (prevent invalidation), remove all, re-add previous, create and add new, remove previous, release both
3.2. if scale 200 but not exists 100: create new via ImageUtil.createImageRep and autorelease
3. Remove all representations
4. Add representation

On each focus for annotation rulers, line numbers.
Comment 57 Sravan Kumar Lakkimsetti CLA 2020-03-09 06:50:09 EDT
Here is my response https://lists.apple.com/archives/cocoa-dev/2020/Mar/msg00027.html

Let me explain basic idea. 

In Mac implementation we have NSImage Object and it can contain multiple image representations. It can have multiple representation with 100%, 200% etc

In eclipse we have images created from image files(from png, gif, etc) and another set of images created using drawing api(see GC.java). The drawing api can also use image representation from existing images.

At run time mac selects the representation closer to dpi level of the monitor and uses it for drawing on the monitor.

Now if you want to draw image using drawing api which image representation to use? We don't know which representation Mac will use at the time of displaying to the monitor. So we restricted only one representation in a NSImage object. This way we are forcing mac to use the image representation which we have drawn using drawing api.

But the above approach would cause blurriness in the image if we don't have correctly sized representation in the NSImage object. To solve this we create image representation at the required size while creating a GC object and use it for drawing images.

According to above thread the problem could be in the image representation creation code. The code for that is in here https://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/bundles/org.eclipse.swt/Eclipse%20SWT/cocoa/org/eclipse/swt/internal/graphics/ImageUtil.java#n38
Comment 58 Eclipse Genie CLA 2020-03-11 02:45:12 EDT
New Gerrit change created: https://git.eclipse.org/r/159152
Comment 60 Sravan Kumar Lakkimsetti CLA 2020-03-12 02:53:20 EDT
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=12eef0b919d535751294f0b20bf86883f31e8a30 appears to be working. Resolving now
Comment 61 Sravan Kumar Lakkimsetti CLA 2020-03-13 04:51:11 EDT
From our limited testing we feel this bug is resolved. We would appreciate if some one verifies this in their environment
Comment 62 Andrey Loskutov CLA 2020-03-14 16:22:12 EDT
(In reply to Eclipse Genie from comment #59)
> Gerrit change https://git.eclipse.org/r/159152 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=12eef0b919d535751294f0b20bf86883f31e8a30

See https://download.eclipse.org/eclipse/downloads/drops4/I20200312-1835/testresults/html/org.eclipse.ui.tests_ep416I-unit-mac64-java8_macosx.cocoa.x86_64_8.0.html

I have no Mac so I can't verify, but I guess new test fails above are related.
Comment 64 Lakshmi P Shanmugam CLA 2020-03-17 03:45:28 EDT
With latest I-build (I20200316-1800), the arrows in the breadcrumb view have a white background again - https://bugs.eclipse.org/bugs/attachment.cgi?id=281651
Comment 65 Sravan Kumar Lakkimsetti CLA 2020-03-24 00:10:39 EDT
(In reply to Lakshmi Shanmugam from comment #63)
> This JFace test failure also looks related -
> https://download.eclipse.org/eclipse/downloads/drops4/I20200315-1800/
> testresults/html/org.eclipse.jface.tests_ep416I-unit-mac64-java8_macosx.
> cocoa.x86_64_8.0.html

I don't see any test failure when I run locally on 10.15.3. 

Please note out test machine runs on 10.14
Comment 66 Sravan Kumar Lakkimsetti CLA 2020-03-24 02:55:43 EDT
(In reply to Andrey Loskutov from comment #62)
> (In reply to Eclipse Genie from comment #59)
> > Gerrit change https://git.eclipse.org/r/159152 was merged to [master].
> > Commit:
> > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> > ?id=12eef0b919d535751294f0b20bf86883f31e8a30
> 
> See
> https://download.eclipse.org/eclipse/downloads/drops4/I20200312-1835/
> testresults/html/org.eclipse.ui.tests_ep416I-unit-mac64-java8_macosx.cocoa.
> x86_64_8.0.html
> 
> I have no Mac so I can't verify, but I guess new test fails above are
> related.

I have a 10.15 machine. There are 3 test failures related to working sets other than that there are no other test failures in platform UI. 

It may be related to fact that we run tests on 10.14.
Comment 68 Gunnar Wagenknecht CLA 2020-03-24 05:21:07 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #67)
> this change effectively reverts
> https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/bundles/
> org.eclipse.swt/Eclipse%20SWT/cocoa/org/eclipse/swt/graphics/Image.
> java?id=4bd006be41519b55bc5ecd853136f9118e70859b


If the failures do not occur on 10.15 but only on 10.14 than I don't like to see the fix being reverted unless it doesn't fix the NPE. I'd rather recommend people updating to 10.15.
Comment 69 Sravan Kumar Lakkimsetti CLA 2020-03-24 06:42:10 EDT
(In reply to Gunnar Wagenknecht from comment #68)
> (In reply to Sravan Kumar Lakkimsetti from comment #67)
> > this change effectively reverts
> > https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/bundles/
> > org.eclipse.swt/Eclipse%20SWT/cocoa/org/eclipse/swt/graphics/Image.
> > java?id=4bd006be41519b55bc5ecd853136f9118e70859b
> 
> 
> If the failures do not occur on 10.15 but only on 10.14 than I don't like to
> see the fix being reverted unless it doesn't fix the NPE. I'd rather
> recommend people updating to 10.15.

The current state is we don't have NPE in the master. This fix is risky fix. So there are some regressions identified. test failures in platform UI and Jface UI. which are not reproducible in 10.15 and bug 559705. 

I am not able get any clue on regression yet.
Comment 70 Eric Goff CLA 2020-03-30 18:55:03 EDT
Same for me:

java.lang.NullPointerException
	at org.eclipse.swt.graphics.Image.internal_new_GC(Image.java:1628)
	at org.eclipse.swt.graphics.GC.<init>(GC.java:262)
	at org.eclipse.swt.graphics.GC.<init>(GC.java:223)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBufferPaint(AnnotationRulerColumn.java:539)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.lambda$1(AnnotationRulerColumn.java:274)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4387)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
	at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1266)
	at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:176)
	at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:776)
	at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:170)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6000)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend_bool(Native Method)
	at org.eclipse.swt.internal.cocoa.NSRunLoop.runMode(NSRunLoop.java:40)
	at org.eclipse.swt.widgets.Display.sleep(Display.java:4957)
	at org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(WorkbenchAdvisor.java:360)
	at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.eventLoopIdle(IDEWorkbenchAdvisor.java:949)
	at org.eclipse.ui.internal.Workbench$1.eventLoopIdle(Workbench.java:481)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1165)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
Comment 71 Eric Goff CLA 2020-03-30 18:55:26 EDT
Same for me:

java.lang.NullPointerException
	at org.eclipse.swt.graphics.Image.internal_new_GC(Image.java:1628)
	at org.eclipse.swt.graphics.GC.<init>(GC.java:262)
	at org.eclipse.swt.graphics.GC.<init>(GC.java:223)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBufferPaint(AnnotationRulerColumn.java:539)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.lambda$1(AnnotationRulerColumn.java:274)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4387)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
	at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1266)
	at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:176)
	at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:776)
	at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:170)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6000)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend_bool(Native Method)
	at org.eclipse.swt.internal.cocoa.NSRunLoop.runMode(NSRunLoop.java:40)
	at org.eclipse.swt.widgets.Display.sleep(Display.java:4957)
	at org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(WorkbenchAdvisor.java:360)
	at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.eventLoopIdle(IDEWorkbenchAdvisor.java:949)
	at org.eclipse.ui.internal.Workbench$1.eventLoopIdle(Workbench.java:481)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1165)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
Comment 72 Sravan Kumar Lakkimsetti CLA 2020-03-30 23:34:01 EDT
(In reply to Eric Goff from comment #71)
> Same for me:
> 
> java.lang.NullPointerException
> 	at org.eclipse.swt.graphics.Image.internal_new_GC(Image.java:1628)
> 	at org.eclipse.swt.graphics.GC.<init>(GC.java:262)
> 	at org.eclipse.swt.graphics.GC.<init>(GC.java:223)
> 	at
> org.eclipse.jface.text.source.AnnotationRulerColumn.
> doubleBufferPaint(AnnotationRulerColumn.java:539)
> 	at
> org.eclipse.jface.text.source.AnnotationRulerColumn.
> lambda$1(AnnotationRulerColumn.java:274)
> 	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
> 	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
> 	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4387)
> 	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
> 	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
> 	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
> 	at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1266)
> 	at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:176)
> 	at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:776)
> 	at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:170)
> 	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6000)
> 	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend_bool(Native Method)
> 	at org.eclipse.swt.internal.cocoa.NSRunLoop.runMode(NSRunLoop.java:40)
> 	at org.eclipse.swt.widgets.Display.sleep(Display.java:4957)
> 	at
> org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(WorkbenchAdvisor.
> java:360)
> 	at
> org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.
> eventLoopIdle(IDEWorkbenchAdvisor.java:949)
> 	at org.eclipse.ui.internal.Workbench$1.eventLoopIdle(Workbench.java:481)
> 	at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.
> run(PartRenderingEngine.java:1165)
> 	at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
> 	at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.
> run(PartRenderingEngine.java:1049)
> 	at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.
> java:155)
> 	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
> 	at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
> 	at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
> 	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
> 	at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.
> java:150)
> 	at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:
> 203)
> 	at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.
> runApplication(EclipseAppLauncher.java:137)
> 	at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.
> start(EclipseAppLauncher.java:107)
> 	at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
> 	at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> 	at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.
> invoke(NativeMethodAccessorImpl.java:62)
> 	at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.
> invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> 	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
> 	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
> 	at org.eclipse.equinox.launcher.Main.run(Main.java:1447)

Can you test with latest I-build? I could not reproduce this in latest I-build. You can download I-build from https://download.eclipse.org/eclipse/downloads/
Comment 73 Sravan Kumar Lakkimsetti CLA 2020-04-06 02:24:14 EDT
This change may have caused Bug 561794. I am not able to reproduce on 10.15. Since our tests run on 10.14 it may be reproducible there. Can some one test on 10.14? I don't have access to 10.14 machine
Comment 74 Sravan Kumar Lakkimsetti CLA 2020-04-06 02:48:53 EDT
Looked at Bug 561796 that may have caused by this change. I am not able to reproduce the test failures. Requesting community help in reproducing this issue.
Comment 75 Sravan Kumar Lakkimsetti CLA 2020-04-06 04:54:29 EDT
Retargetting to M3 as we need to work on regressions
Comment 76 Nitin Dahyabhai CLA 2020-04-08 00:19:51 EDT
Bug 561744 might be related. I'm at a loss to understand it otherwise.
Comment 77 Eclipse Genie CLA 2020-04-21 02:27:34 EDT
New Gerrit change created: https://git.eclipse.org/r/161266
Comment 79 Sravan Kumar Lakkimsetti CLA 2020-04-24 03:23:53 EDT
(In reply to Eclipse Genie from comment #78)
> Gerrit change https://git.eclipse.org/r/161266 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=83ded1aeec6e3caca694ff80694eb38c4c380c60

With this change regressions bug 561794 and bug 561796 are resolved. There is still one more pending regression described in comment 64
Comment 80 Eclipse Genie CLA 2020-05-07 05:39:12 EDT
New Gerrit change created: https://git.eclipse.org/r/162632
Comment 82 Sravan Kumar Lakkimsetti CLA 2020-05-07 05:45:41 EDT
(In reply to Eclipse Genie from comment #81)
> Gerrit change https://git.eclipse.org/r/162632 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=a7d0efb586239158f344d81a41927c1a2a4bda8b

All regressions should be fixed with this.
Comment 83 Sravan Kumar Lakkimsetti CLA 2020-05-08 05:15:48 EDT
(In reply to Eclipse Genie from comment #80)
> New Gerrit change created: https://git.eclipse.org/r/162632

The change done here is optimizing getRepresentation if 100% is selected. This was done in image.java. Second change is to draw with trasparency. Not to ignore transparency
Comment 84 Lakshmi P Shanmugam CLA 2020-05-15 07:15:35 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #83)
> (In reply to Eclipse Genie from comment #80)
> > New Gerrit change created: https://git.eclipse.org/r/162632
> 
> The change done here is optimizing getRepresentation if 100% is selected.
> This was done in image.java. Second change is to draw with trasparency. Not
> to ignore transparency

This change has caused Bug 563210. Does removing the optimization fix the problem? If not, may be we should revert the change until we find a fix since next week is M3.
Comment 85 Eclipse Genie CLA 2020-05-18 08:10:09 EDT
New Gerrit change created: https://git.eclipse.org/r/163181
Comment 87 Sravan Kumar Lakkimsetti CLA 2020-05-19 01:59:22 EDT
Verified in 
Eclipse SDK
Version: 2020-06 (4.16)
Build id: I20200518-2220
OS: Mac OS X, v.10.15.4, x86_64 / cocoa
Java version: 1.8.0_231
Comment 88 Eclipse Genie CLA 2020-05-20 04:43:09 EDT
New Gerrit change created: https://git.eclipse.org/r/163299
Comment 89 Matthias Becker CLA 2020-05-20 04:44:21 EDT
(In reply to Eclipse Genie from comment #88)
> New Gerrit change created: https://git.eclipse.org/r/163299

This fixes a copy of the JDT Breadcrumb in platform.debug.