I'm trying to get started with LWJGL 3, but it doesn't even run the sample program. It just crashes the JVM (error code 134, SIGABRT, JVM tries to access memory at address 0).
I've reinstalled Gradle, made sure it uses the right Java version and re-downloaded the LWJGL script, but to no avail.
EDIT: I updated Java to the latest version, but it still doesn't work...
I used the default Java app Gradle config and the sample program (linked above).
The expected behaviour is the app running, opening a window, etc., but instead Java crashes.
Execution failed for task ':run'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/java'' finished with non-zero exit value 134
The sample program uses GWT (Java GUI - graphic interface). It requires xorg server running on Linux (if you are on Linux). See the answer JVM error: Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
I have had this same issue (exit value 134) before, but maybe in a slightly different context: in Android Studio running on a Ubuntu machine. When this happened, I also saw an error log file produced under the ./app folder, named “hs_err_pid[a number].log”. This log file provided more info about the error. However, I still couldn’t figure out a solution by reading the log file.
Since this error does not always happen to me, I’ve tried 2 brute-force methods:
Method #1. Remove the ./build folder
Method #2. In Android Studio, → File → Invalidate Cashes / Restart…
It appears that the error can be avoided by using one of, or a combination of, these 2 methods.
Not sure if its relevant but I faced the same issue while trying to run some introductory code on my Mac. For me the issue seemed to be around library version configurations. I was earlier using these:
project.ext.lwjglVersion = "3.2.3"
project.ext.jomlVersion = "1.10.4"
And later changed it to this (As per the LWJGL library customisation page)
project.ext.lwjglVersion = "3.3.1"
project.ext.jomlVersion = "1.10.4"
Further, I also added the VM option: -XstartOnFirstThread
But that was for a different error only as far as I understand.
Related
When I click the "Run" button or the F11 key to start a program execution it takes around 8-10 seconds to start the actual execution.
So considering the following same code
public class Demo {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
After clicking the "Run" button or the F11 key it prints "Hello World" after 8-10 seconds. For bigger programs once the execution has started it runs fairly quick. But the initial starting is the only issue
I am using "Eclipse IDE for Java Developers"
Version: 2020-03 (4.15.0)
Have only a minimal set of plugins and infact tried disabling the Mylyn plugin as well but to no avail
This is probably not caused by Eclipse, which can be seen by whether the delay also occurs when running on the command line what you get with the Show Command Line button of the run configuration.
On Windows, it can be caused by the Windows Defender. Excluding the Java installation folder as described here (which will probably be the main reason for you, since Windows Defender scans the entire Java system library on access) and excluding the folders containing the dependencies (e.g. Maven repository) should eliminate the delay. But keep in mind that this also comes with a security risk, especially the exclusion of a Maven repository, where you usually don't pay attention attention to what you download into it.
Startup time can be further reduced by using newer Java VMs or/and using an Eclipse OpenJ9 Java VM with shared classes cache (for me Eclipse and other Java applications start with OpenJ9 in about two thirds of the time than with the HotSpot VM).
Found the issue. It was Dynatrace agent that was causing the problem.
Thanks to #howlger for directing to execute via the "Show Command Line" on the command line, which established the fact that the issue was not caused by Eclipse.
Running the java command with -verbose flag showed the following 3 jars getting loaded
[Opened
C:/PROGRA~2/DYNATR~1/oneagent/agent/bin/1.175.224.20190905-115725/any/oneagentjava.jar]
[Opened
C:/PROGRA~2/DYNATR~1/oneagent/agent/bin/1.175.224.20190905-115725/any/oneagentjava.rmi.jar]
[Opened
C:/PROGRA~2/DYNATR~1/oneagent/agent/bin/1.175.224.20190905-115725/any/oneagentjava.sql.jar]
And then uninstalling the Dynatrace Agent did the trick
Now the program execution starts immediately from command prompt as well as Eclipse
I am using openjdk11 + javafx11 on intellij
Every time I try running a code that requires javafx, I get this error. After some googling around, it seems like it has to do with the display server (xorg, using archlinux kde 5). But I can't find anything that helps me fix the problem.
If anyone could provide some insight to the solution, that would be delightful.
Here's the output I get when I run it:
/usr/lib/jvm/jdk-11.0.1/bin/java -Djava.library.path=/usr/lib/jvm/javafx-sdk-11.0.1/lib --module-path /usr/lib/jvm/javafx-sdk-11.0.1/lib --add-modules=javafx.controls,javafx.fxml -javaagent:/home/rurudu/Intellij/idea-IC-182.4892.20/lib/idea_rt.jar=45449:/home/rurudu/Intellij/idea-IC-182.4892.20/bin -Dfile.encoding=UTF-8 -classpath /home/rurudu/IdeaProjects/HelloFX/out/production/HelloFX:/usr/lib/jvm/javafx-sdk-11.0.1/lib/src.zip:/usr/lib/jvm/javafx-sdk-11.0.1/lib/javafx-swt.jar:/usr/lib/jvm/javafx-sdk-11.0.1/lib/javafx.web.jar:/usr/lib/jvm/javafx-sdk-11.0.1/lib/javafx.base.jar:/usr/lib/jvm/javafx-sdk-11.0.1/lib/javafx.fxml.jar:/usr/lib/jvm/javafx-sdk-11.0.1/lib/javafx.media.jar:/usr/lib/jvm/javafx-sdk-11.0.1/lib/javafx.swing.jar:/usr/lib/jvm/javafx-sdk-11.0.1/lib/javafx.controls.jar:/usr/lib/jvm/javafx-sdk-11.0.1/lib/javafx.graphics.jar sample.Main
(java:16177): Gdk-CRITICAL **: 14:11:28.282: gdk_x11_display_set_window_scale: assertion 'GDK_IS_X11_DISPLAY (display)' failed
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
I was able to solve this by forcing jfx to run using GTK2 by adding this arg to the run command: -Djdk.gtk.version=2
Background: I ran into the exact same error while trying to run the Hello World example for OpenJFX on Fedora running Xwayland and after a bit of searching found an issue logged against openjdk-jfx that describes the same problem. In the comments it suggests forcing jfx to run with gtk2:
We tested it locally and can reproduce a crash (at a different place than you reported), and it looks like it's related to running using GTK3. The default backend was GTK2 for FX in JDK 10 and is GTK3 in FX 11. As a workaround, you can force GTK 2 by running:
java -Djdk.gtk.version=2 ...
Also, you can pass -Djdk.gtk.verbose=true to see what is being used. I also note that we can make JDK 10 crash as well on Wayland by forcing GTK 3.
Is anyone having a problem running a Windows Service with JavaExe, and is there a solution?
The JavaExe examples all work except for the Service examples, Example3, Example5, and Example23.
In each case, the Windows Service gets created, but any attempt to start the service brings a popup error message:
"The system cannot find the file specified."
There is a registry entry for the serivce which contains the following:
Name: ImagePath
Type: REG_EXPAND_SZ
Data: "\JavaExe\JavaExe\doc\examples\3 - Service\Example3.exe" __RunService__
If I run Example3.exe from a command line with the argument __RunService__, then a Java process starts and runs briefly before crashing.
The examples are all self-contained in the JavaExe download, so it's hard to see how there could be missing libraries.
Background: JavaExe (http://devwizard.free.fr/html/en/JavaExe.html) appears to implement a sound approach to allowing a Java application program to be invoked from another Java program running as a service. Windows prevents services from accessing the desktop, so JavaExe sets up a socket connection between the service and the application Java program, each running as a User process, as outlined here:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms683502(v=vs.85).aspx
Windows 7 x64 (but it fails in the same way on XP [SEE UPDATE BELOW])
Java version 1.7.0_45
--
UPDATE:
The developer replied to my email and advised that 32-bit and 64-bit Java versions were being confused.
I straightened this out. The Example3 Service, run from the .exe and .jar files obtained from the
JavaExe .zip download (which are all 32 bit by default), now run correctly on WinXP (x86).
For x64 machines, it is necessary to recompile the jar files using the package's compilx64.bat script.
(And to use the x64 versions of JaveExe.exe as stated in the documentation.)
I did these things but the Example3 service still fails to start, with the error,
"The system cannot find the file specified."
The .jar files built from compilx64.bat are mostly identical to the x86 versions, but a few
contain .class files that are a few bytes larger. I assume that the code must therefore be referring to native libraries? And maybe some are not found? But which ones?
When I type sc qc Example3 I get:
TYPE: : 10 WIN32_OWN_PROCESS
START_TYPE: 2 AUTO_START
ERROR_CONTROL: 1 NORMAL
BINARY_PATH_NAME : "[...filepath...]\JavaExe\JavaExe\doc\examples\3 - Service\Example3.exe" __RunService__
LOAD_ORDER_GROUP: 0
DISPLAY_NAME: JavaExe : Example3
DEPENDENCIES: eventlog
SERVICE_START_NAME: LocalSystem
Answer:
The filepath to the Example3.exe was on a network drive.
To get a Windows Service to run from a network drive is either impossible or requires considerable contortions. See for example,
Map a network drive to be used by a service
When I moved everything to the local C: drive, it worked.
Thank you to bb67 for providing the hints that led to figuring this out.
Eclipse froze on me earlier today, so I typed "top" into the command prompt and killed it. Now when I try to run a java application, I get this error:
eclipse\plugins\org.eclipse.jdt.debug_3.7.0.v20110509
That's all that shows up under details.
None of my previously working programs run, and I have no clue what this is. I have Eclipse 1.5.0 running 1.6 and 1.7 Java, depending on what program. Thanks for any help.
It is possible that you killed part of the process but not all of it. It is possible that a java process is running with a reference to this job. I would try restarting your computer to see if it will stop whatever process is referencing that jar.
Aside from a restart, then another option would be to use (in linux) pstree, filtered for your user to see if any other jobs are referencing that jar and/or java.
EDIT:
Another path is to look at log files. On linux they are in /var/log. Here's a link in that direction: http://docs.oracle.com/javase/7/docs/webnotes/tsg/TSG-Desktop/html/felog.html
Good afternoon,
I've been trying for some time now to get the Android source to build. I have followed the instructions here:
http://source.android.com/source/building.html
The configuration step I have chosen is: "full-eng". The machine is Ubuntu 11.10, 32-bit, AMD x6 1090T processor, 4 GB of RAM running inside VirtualBox on a Windows 7 64-bit host.
I am able to get through the build process (or so it seems), with the last status lines reading:
...
target Dex: android.core.tests.libcore.package.com.no-core-tests-res
target Dex: android.core.tests.libcore.package.dalvik.no-core-tests-res
target Dex: android.core.tests.libcore.package.libcore.no-core-tests-res
target Dex: android.core.tests.libcore.package.org.no-core-tests-res
make: *** [out/target/common/obj/APPS/android.core.tests.libcore.package.com.no-core-tests-res_intermediates/noproguard.classes-with-local.dex] Killed
make: *** Waiting for unfinished jobs....
sean#sean-VirtualBox:~/src/android$
When I try to run the emulator (per the seemingly oversimplified instructions from the page above), I get this:
sean#sean-VirtualBox:~/src/android$ emulator
emulator: ERROR: No initial system image for this configuration!
I've had pretty good luck using the emulator from my local Windows environment, but I'd like to get the Android source built so I can start learning more about it. In absence of a clear answer, I would take any alternative instructions for getting the source to build and run on the emulator.
I also have a G2x, G2 and G1 at my disposal if I got real desperate and needed to use a physical device, but I'd really like to get the emulator to work first. I also imagine that I'll need to know where the output image files went if I were to flash a device. (Googles instructions dubiously omitted elaboration on where the output went and what files are used when flashing or running the emulator)
Thanks!
-Sean
The basic steps are:
$ cd <path/to/android/source>
$ . build/envsetup.sh
$ lunch full-eng
$ make # should finish without errors
$ ./out/host/linux-x86/bin/emulator
and your emulator should start. Notice that running the emulator inside a VM would be really slow.