Bug 571476

Summary: Unable to run from 'development' environment on MacOS BigSur
Product: [Technology] STEM Reporter: Harsha Krishnareddy <c0mpiler>
Component: UIAssignee: Harsha Krishnareddy <c0mpiler>
Status: RESOLVED FIXED QA Contact: Harsha Krishnareddy <c0mpiler>
Severity: normal    
Priority: P1 CC: apillai, c0mpiler, jhkauf
Version: 4.0.x   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Patch for bug 571476 none

Description Harsha Krishnareddy CLA 2021-02-24 14:27:39 EST
OS version: MacOs bigSur 11.2
Java: jdk1.8.0_281.jdk (as required)
Eclipse: 2020-12 (4.18.0)


I am not able to run STEM in my OS environment. I tried setting up the development environment to investigate what's causing the issue. 

I have the `JAVA_HOME` environment variable setup - pointing to `jdk1.8` both globally and also in my STEM application's info.plist file, to make sure STEM is referring to java v1.8


I see a lot of `NPE error when initialize GLCanvas object` exceptions (bug 570649) on my console. A completely blank STEM UI loads up - some icons seem to be loading up intermittently, but the whole UI is un-responsive. 

Unhandled exception in the UI thread.
java.lang.NullPointerException
 	at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:763)
 	at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:170)
 	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6037)
 	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
 	at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:5317)
 	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5710)
 	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
 	at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:92)
 	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3833)
 	at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
 	at org.eclipse.jface.window.Window.open(Window.java:799)
 	at com.google.gapid.Main$UI.show(Main.java:136)
 	at com.google.gapid.Main.main(Main.java:80)
Comment 1 James Kaufman CLA 2021-02-24 14:51:03 EST
Harsha, 
Thank you very much for reporting this. We will apply and test the fix(es) as P1.
Comment 2 Harsha Krishnareddy CLA 2021-02-24 15:28:42 EST
Created attachment 285658 [details]
Patch for bug 571476

I managed to fix my problem and get stem to work properly on my Mac - bigSur. 

1. It seems like the dependencies defined as part of the stem4.target are fairly old.

2. A lot of the exceptions and problems seem to have been fixed either as part of the eclipse SDK or other packages. 

3. I update the target platform plugins/features to the latest versions and made a switch to use Java 11. 

This solved my troubles getting STEM to run in my environment. I created a patch with my changes for review.
Comment 3 Harsha Krishnareddy CLA 2021-02-24 16:54:26 EST
After I made the changes to the target platform I had to cleanup my runitime-stem4.product outside my eclipse workspce -- just to make sure there are no plugin version mixups or dangling jar files in there!
Comment 4 James Kaufman CLA 2021-03-25 14:08:49 EDT
Fixed