Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Crashing due to out of memory error #175

Open
nighto opened this issue Jan 17, 2024 · 3 comments
Open

Windows: Crashing due to out of memory error #175

nighto opened this issue Jan 17, 2024 · 3 comments

Comments

@nighto
Copy link

nighto commented Jan 17, 2024

On Windows 11, with JRE 32-bit installed, trying to run the command stated on readme does not work, either from regular cmd, PowerShell or git bash:

$ java --add-opens java.desktop/javax.swing.plaf.basic=ALL-UNNAMED -jar gps-overlay-on-video.jar
Unrecognized option: --add-opens
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

What is the Windows way to run those params?

@peregin
Copy link
Owner

peregin commented Jan 18, 2024

hi @nighto ,
based on the link you are running it with jre8, the flags are there because of the assumption was that is running with jre 11.
could you try please running it without the flags?
java -jar gps-overlay-on-video.jar

@ronan-deshays
Copy link

On Windows 11, with the same JRE 32-bit (jre-8u401-windows-i586.exe) as @nighto, tested with telemetry-on-video v1.2.12 and telemetry-on-video v1.2.9, it runs fine for me (cmd below).

C:\Users\ronan\Downloads>java -jar gps-overlay-on-video.jar
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
Executed analyze GPS data in 11 millis
Executed load telemetry in 154 millis
Executed load sample gps data in 156 millis
Executed analyze GPS data in 23 millis
Executed load telemetry in 56 millis
Executed load sample gps data in 57 millis
Executed analyze GPS data in 3 millis
Executed load telemetry in 20 millis
Executed load sample gps data in 20 millis
Executed analyze GPS data in 1 millis
Executed load telemetry in 19 millis
Executed load sample gps data in 19 millis

@nighto
Copy link
Author

nighto commented Feb 16, 2024

Sorry for the lack of replies folks.

Indeed it runs only with java -jar file.jar. I loaded a 5 minute video file with the corresponding gpx file and it seemed to appear fine the video and the map.

However when trying to play the video, it crashed with

Uncaught error from thread [gpv-akka.actor.default-dispatcher-5]: Java heap space, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[gpv]
java.lang.OutOfMemoryError: Java heap space
[ERROR] [SECURITY][02/16/2024 17:35:58.996] [gpv-akka.actor.default-dispatcher-5] [akka.actor.ActorSystemImpl(gpv)] Uncaught error from thread [gpv-akka.actor.default-dispatcher-5]: Java heap space, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[gpv]
java.lang.OutOfMemoryError: Java heap space

So maybe it needs some flag to set the max heap space such as -Xmx[NUMBER]g? Though as it is a 32-bit JRE it can only be assigned 2GB? Tried with -Xmx2g and it says

$ java -Xmx2g -jar gps-overlay-on-video.jar
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

While with 4GB it says

$ java -Xmx4g -jar gps-overlay-on-video.jar
Invalid maximum heap size: -Xmx4g
The specified size exceeds the maximum representable size.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

so I am not really sure if it is feasible at all on a Windows host.

@nighto nighto changed the title Windows: Unrecognized option: --add-opens Windows: Crashing due to out of memory error Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants