3

I am experiencing an error that prevents repast simphony from running when prompted from Eclipse. Instead of running a model when prompted, the window disappears and an error message appears within Eclipse.

The steps I've followed to this point on my Mac (for repast simphony setup) are:

1) Download a Java 8 JDK from Adopt Open JDK (since I need Java 8 to use repast 3D later). Copy the package to /Library/Java/JavaVirtualMachines.

2) Download Eclipse IDE for Eclipse Committers 2019-06 and put in Applications folder.

3) Install Groovy Eclipse 3.4.0 from the update site (https://dist.springsource.org/release/GRECLIPSE/3.4.0/e4.12), and install the Eclipse Groovy development tools and the Groovy compiler 2.4 from this link in Eclipse.

4) Install repast simphony 2.7.0 from https://repocafe.cels.anl.gov/repos/repast in Eclipse.

5) Set Groovy compiler to 2.4.17 in Eclipse.

6) Import repast examples

7) Select a demonstration model (e.g., GeoZombies) and try to run.

Once I complete step 7 above, I get several console warning messages:

WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/Applications/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.runtime_2.7.0/lib/xstream-1.4.7.jar) to field java.util.TreeMap.comparator WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

The Java window for repast simphony opens even though this error has appeared in the Eclipse console. However, when I click the button to "Start Run" in the Java window for GeoZombies, the Java window shuts with no warning, and the Eclipse console produces the following error:

2019-12-03 11:03:46.637 java[63571:533520] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!' * First throw call stack: ( 0 CoreFoundation 0x00007fff3bab6acd __exceptionPreprocess + 256 1 libobjc.A.dylib 0x00007fff66193a17 objc_exception_throw + 48 2 CoreFoundation 0x00007fff3bad0629 -[NSException raise] + 9 3 AppKit 0x00007fff390765ca -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 317 4 AppKit 0x00007fff390739f7 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1479 5 AppKit 0x00007fff3907342a -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45 6 libnativewindow_macosx.jnilib 0x0000000136bfdf9e Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398 7 ??? 0x000000011e0f5c90 0x0 + 4799290512 ) libc++abi.dylib: terminating with uncaught exception of type NSException

I would appreciate any assistance someone can provide about how to resolve this error and get repast simphony working. Thank you.

Leo W.
  • 55
  • 2
  • 1
    Can you provide your macOS version details? – J. Ozik Dec 03 '19 at 18:44
  • I'm using Mojave, Version 10.14.6. – Leo W. Dec 03 '19 at 19:08
  • 1
    Can you try to install Repast Simphony using the installer instead? https://github.com/Repast/repast.simphony/releases/download/v2.7.0/RepastSimphony-2.7.0.dmg We haven't been able to recreate what you're seeing in our setups. – J. Ozik Dec 03 '19 at 19:29
  • I tried setup with the installer you linked to; this time (in addition to the NSException error appearing in the Eclipse console and the repast window closing), a separate window appeared saying that RepastMain quit unexpectedly. Unfortunately, that appears to be the only difference. – Leo W. Dec 03 '19 at 19:48
  • Did you use a separate workspace for the second test or the same workspace from before? If you used the same one, I'd suggest trying with a new workspace. – J. Ozik Dec 03 '19 at 19:56
  • Can you provide the exact version of java 8? – Nick Collier Dec 03 '19 at 19:59
  • I tried it with a new workspace with a different name. Just to list out steps to make sure I'm doing everything correctly: I uncompressed the .dmg file, added to Applications folder when prompted, opened Eclipse link in repast-simphony folder, made a new workspace when prompted, went to import repast examples from the 'File' menu, and imported all. I then went to the run button to open GeoZombies, and made it to the same point in the repast window (clicking initialize button) before the same error occurred. – Leo W. Dec 03 '19 at 20:09
  • I downloaded openJDK 8 directly from https://adoptopenjdk.net/. Does that answer your question? – Leo W. Dec 03 '19 at 20:11
  • I wonder if it has to do with how you're installing Java. Can you try to use this approach: https://adoptopenjdk.net/installation.html#macos-pkg It may be useful to remove the old installation. – J. Ozik Dec 03 '19 at 20:39
  • I tried both the GUI approach & Terminal approach. I downloaded the .pkg file for macOS from https://adoptopenjdk.net/releases.html for JDK. In both cases the Java folder was created in the Library folder for the Macintosh HD. I used sudo commands per https://www.java.com/en/download/help/mac_uninstall_java.xml to uninstall Java beforehand. However, the same error occurs when I try to start within the repast window that appears after running GeoZombies in Eclipse. – Leo W. Dec 03 '19 at 21:34
  • This is really mysterious. If you go to Preferences -> Java -> Installed JREs do you see your expected Java version highlighted? – J. Ozik Dec 03 '19 at 22:22
  • The expected Java version was not highlighted in installed JREs, so I changed it to AdoptOpenJDK 8. When running after that change, it gave me a new error message about not working for compiler compliance level of 12. After reviewing forums, I also needed to change the Java compiler in Preferences from a default of 12 to something else (in this case, I chose 1.7 as the compiler compliance level). Now, repast appears to be working correctly. Thanks for your help! – Leo W. Dec 04 '19 at 14:36
  • Great, I'll compile this discussion in an answer for posterity, and it would be helpful if you could accept it as resolving your issue. I would make the compliance level at least 1.8, but I have it set at 10. – J. Ozik Dec 04 '19 at 17:10
  • I accepted your answer - very helpful. Thanks again! – Leo W. Dec 05 '19 at 18:48

1 Answers1

1

This appeared to be an issue with letting Eclipse know which JRE to use. Navigating to Preferences -> Java -> Installed JREs, should show which JRE Eclipse is using and you can adjust to the appropriate version there. Currently Java 8 and Java 11 can be used. For more information on software requirements for Repast Simphony, see this page: https://repast.github.io/requirements.html

J. Ozik
  • 1,083
  • 5
  • 6