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.
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
Related
I have a large number of files that I run through Karma and Jasmine for testing†. In the middle of the process I get an uncaught error which halts the project. This means that I cannot easily determine which file is causing the fatal error. Is there a way to print out the name of a file as it is being tested or get similar information that I can analyze?
†More specifically, I am running an Angular project using Angular CLI, which employs Karma and Jasmine.
Edit:
I have been asked for screenshots and code, but there's not much to show. When I run karma I get this response:
19 09 2017 00:04:18.279:INFO [karma]: Karma v1.7.0 server started at http://0.0.0.0:9876/
19 09 2017 00:04:18.281:INFO [launcher]: Launching browser Chrome with unlimited concurrency
19 09 2017 00:04:18.285:INFO [launcher]: Starting browser Chrome
19 09 2017 00:04:42.723:INFO [Chrome 61.0.3163 (Mac OS X 10.12.6)]: Connected on socket Ml1MJK4zgJuXwLyxAAAA with id 34080921
................................................................................
................................................................................
................................................................................
.....................................................Chrome 61.0.3163 (Mac OS X 10.12.6) ERROR
Uncaught Error: No component factory found for FooComponent. Did you add it to #NgModule.entryComponents?
at http://localhost:9876/_karma_webpack_/polyfills.bundle.js:8310
Chrome 61.0.3163 (Mac OS X 10.12.6) ERROR
Uncaught Error: No component factory found for FooComponent. Did you add it to #NgModule.entryComponents?
at http://localhost:9876/_karma_webpack_/polyfills.bundle.js:8310
Chrome 61.0.3163 (Mac OS X 10.12.6): Executed 293 of 739 (skipped 44) ERROR (10.515 secs / 1.461 secs)
I am running 739 unit tests and the process halts after 293. I cannot find the file causing the FooComponent error (it's something subtle and cannot be identified with a keyword search). This is why I need to know the name of the file, or the test, or the something that is causing the error.
You could use a custom Karma reporter to view more details on which tests are failing etc.
One option is karma-spec-reporter.
Installation and usage is simple (copied from the github README):
npm install karma-spec-reporter --save-dev
Then add 'spec' to reporters in karma.conf.js, e.g.
reporters: ['spec']
There are also other options for Karma reporters.
Karma-mocha-reporter is one option.
If you're after a bit of a laugh, you could also look at the karma-nyan-reporter for a bit of nyan-cat relief. Perhaps surprisingly, it also seems to give some useful error logging as well.
I am able to decompile the file using "advanced apktool" but when i use apktool alone via command line I get this error:
I: Baksmaling... I: Loading resource table... Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:55) at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:315) at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:50) at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:43) at brut.androlib.Androlib.getResTable(Androlib.java:44) at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148) at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98) at brut.apktool.Main.cmdDecode(Main.java:128) at brut.apktool.Main.main(Main.java:65) Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000 at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48) at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:45) at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:97) at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82) at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48) ... 8 more" My apk does have a res folder i can see it using dexindexor app on my phone and it decompiled using other decompilers (that use apktool) its just apktool doesn't decompile it on its own properly.
Its the same when i try a different comnputers. I'm using winxp 32 jre 1.7, win7 64 jre 1.8.
Why is this happenning and how do I fix it?
I upgraded to Java 8 from Java 6.
As per these instructions, in /Applications/IntelliJ IDEA 13 CE.app/Contents/Info.plist I changed
<key>JVMVersion</key>
<string>1.6*</string>
to
<key>JVMVersion</key>
<string>1.8*</string>
My environment variable JAVA_HOME is set to:
/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home
However, when I run the debugger in IntelliJ, it still wants to use Java 6:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java ...
Connected to the target VM, address: '127.0.0.1:60490', transport: 'socket'
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/my/MainClass : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
What other settings do I need to change in order for IntelliJ to use the Java 8 JRE?
You changed the IDE's setting. Project setting can be changed here: File->ProjectStructure->Project SDK
when I am starting glass fish server through command prompt I am getting an
error. I am using jdk 1.5 and jdk1.6 also. Due to java version am I getting that error or any other reason.
I am using two tomcat server also that port no is 8080 and 8081.
For glass fish-domain purpose I am using 4545 port number.
Error starting domain mydomain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:
FATAL ERROR in native method: processing of -javaagent failed
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:133)
Exception in thread "main"
This is the important bit.
java.lang.UnsupportedClassVersionError: Bad version number in .class file
It means that the class loader does not understand the version number of one of the ".class" files that it is trying to load.
The most likely explanation is that you are trying to load classes that have been compiled on a Java 7 development platform on an earlier (e.g. Java 5 or Java 6) JRE / JVM installation. You either need to upgrade your execution platform to Java 7 (best option), or downgrade your development platform to Java 5 or Java 6 (or whatever you are using).
Note that both Java 5 and Java 6 have reached "end of life", and there will not be any more patch releases available ... unless you take out an Oracle Java support contract.
I built a Mac OS X application which is configured to strip the debug info for Release and create the dSYM files.
(Project is configured as described here: http://bit.ly/tJEQml a cached version of http:/developer.apple.com/tools/xcode/symbolizingcrashdumps.html which does exist anymore)
As expected the generated crash reports for my app don't show line information for the stack trace of my apps internal calls.
When analyzing a crash report I just can't get GDB or atos to give me line information for the stack-trace.
Crash report excerpt:
0 CoreFoundation 0x00007fff920f7286 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff91f74d5e objc_exception_throw + 43
2 CoreFoundation 0x00007fff920f70ba +[NSException raise:format:arguments:] + 106
3 CoreFoundation 0x00007fff920f7044 +[NSException raise:format:] + 116
4 CoreFoundation 0x00007fff920b429b -[__NSCFDictionary setObject:forKey:] + 219
5 AppName 0x00000001015e9c61 AppName + 85089
I tried on GDB by doing the following:
called gdb -arch x86_64
loaded the app using the file command (tried both the AppName.app and Content/MacOS/AppName)
GDB prompts that the symbols where loaded (even tried loading the dSYM with file)
called info line * 0x00000001015e9c61
GDB responds with No line number information available for address 0x1015e9c61
I tried with atos by doing the following:
called atos -arch x86_64 -o AppName.app (also tried to the binary directly and to the dSYM's DWARF file)
typed 0x00000001015e9c61 and hit enter
atos simply repeats 0x00000001015e9c61
What could be wrong?
The symbols seem to load properly (at leasts that's what gdb reports) and I'm certain the crash, dSYM and App bundle all match.
I still haven't figured out how to make the manual symbolizing work but I found a nice script which will do it automatically.
The script can be found at: https://github.com/nikyoudale/symbolicatecrash-mac
I will read through the script's code to figure out what it's doing and answer my own question.