Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: [0.8a RC17] Game does not launch at all - JRE issue(?)  (Read 4959 times)

CharonX

  • Ensign
  • *
  • Posts: 5
    • View Profile
[0.8a RC17] Game does not launch at all - JRE issue(?)
« on: April 20, 2017, 04:59:25 PM »

As posted in the title it is probably a JRE issue with the provided JRE. Still, I think it might be worth looking into, in case I'm not the only one that encountered it.

OS: Windows 10 64-bit
GPU: NVIDIA GTX 1060 with (reasonably) up-to-date drivers

Tried to launch the new version via shortcut and directly via starsector.exe. Game did not launch.
Looked into \Starsector\starsector-core\ directory for logfile, but no logfile was found.
Executed starsector.bat manually via command prompt and received the following error:
Code
..\jre\bin\java.exe -Djava.library.path=native\windows -Xms1024m -Xmx1024m -Xss1024k -Dcom.fs.starfarer.settings.paths.logs=. -Dcom.fs.starfarer.settings.paths.saves=../saves -Dcom.fs.starfarer.settings.paths.screenshots=../screenshots -Dcom.fs.starfarer.settings.paths.mods=../mods -classpath janino.jar;commons-compiler.jar;commons-compiler-jdk.jar;starfarer.res.jar;starfarer.api.jar;starfarer_obf.jar;jogg-0.0.7.jar;jorbis-0.0.15.jar;json.jar;lwjgl.jar;lwjgl_util_applet.jar;jinput.jar;lwjgl_test.jar;log4j-1.2.9.jar;lwjgl_util.jar;fs.sound_obf.jar;fs.common_obf.jar;xstream-1.4.2.jar com.fs.starfarer.StarfarerLauncher
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Verified version of provided JRE:
Code
..\jre\bin\java.exe -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) Client VM (build 24.45-b08, mixed mode)

Modified starsector.bat to execute game via the java version installed on my system (and changed settings.json to permit other java versions).
Code
java.exe -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

java.exe -Djava.library.path=native\windows -Xms1024m -Xmx1024m -Xss1024k -Dcom.fs.starfarer.settings.paths.logs=. -Dcom.fs.starfarer.settings.paths.saves=../saves -Dcom.fs.starfarer.settings.paths.screenshots=../screenshots -Dcom.fs.starfarer.settings.paths.mods=../mods -classpath janino.jar;commons-compiler.jar;commons-compiler-jdk.jar;starfarer.res.jar;starfarer.api.jar;starfarer_obf.jar;jogg-0.0.7.jar;jorbis-0.0.15.jar;json.jar;lwjgl.jar;lwjgl_util_applet.jar;jinput.jar;lwjgl_test.jar;log4j-1.2.9.jar;lwjgl_util.jar;fs.sound_obf.jar;fs.common_obf.jar;xstream-1.4.2.jar com.fs.starfarer.StarfarerLauncher
0    [main] INFO  com.fs.starfarer.StarfarerLauncher  - Starting Starsector 0.8a-RC17 launcher
0    [main] INFO  com.fs.starfarer.StarfarerLauncher  - Running in D:\Games\Starsector\starsector-core
0    [main] INFO  com.fs.starfarer.StarfarerLauncher  - OS: Windows 10 10.0
0    [main] INFO  com.fs.starfarer.StarfarerLauncher  - Java version: 1.8.0_131 (64-bit)
Apr 21, 2017 1:35:24 AM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
31   [main] INFO  com.fs.starfarer.settings.StarfarerSettings  - Loading settings
31   [main] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [ABSOLUTE_AND_CWD: null (data/config/settings.json)]
172  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 640x480, 60Hz, 32bpp
<snip>

This way starsector launched properly and Starsector.log was created.
However - as the application itself warns - there are many potential incompatibilities, so I'd prefer to launch the game via the intended version. Does anyone have an idea why the provided JRE doesn't work properly on my system or has encountered the same issue?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: [0.8a RC17] Game does not launch at all - JRE issue(?)
« Reply #1 on: April 20, 2017, 05:08:18 PM »

Sorry about the trouble! Do you happen to have JAVA_OPTS or _JAVA_OPTS in your environment variables? That's a likely cause of this problem - this variable being set could tell the game to allocate more memory than it can with a 32-bit JRE.
Logged

CharonX

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: [0.8a RC17] Game does not launch at all - JRE issue(?)
« Reply #2 on: April 21, 2017, 02:18:28 AM »

Hi Alex,

no need to apologize. :)
I've checked my system variables but unfortunately neither JAVA_OPTS nor _JAVA_OPTS (nor any other Java related things) are set.
Physical memory should not be an issue - I've got 16GB installed (and Windows can use the swap file in a pinch).

I'll try to get my hands on the JRE package for 1.7.0_45-b18 32-bit, and install it on my system (replacing my 1.8.0_131-b11 64-bit java installation). If the JRE version is the culprit (for whatever reason) the issue should then also occur when launching starsector with my OS' Java (since it then would be the same version of the JRE). I hope.
Logged

NinjaPirate

  • Lieutenant
  • **
  • Posts: 78
    • View Profile
    • Mr. G Plays
Re: [0.8a RC17] Game does not launch at all - JRE issue(?)
« Reply #3 on: May 01, 2017, 09:41:38 PM »

How did you modify your bat file?  I'm having the same issue but I think it's related to my Nvidia drivers.  I reinstalled them then it started happening it was fine before.
Logged
Feel free to make fun of my bad gameplay here at Mr. G Plays
http://www.youtube.com/c/MrGPlays

Midnight Kitsune

  • Admiral
  • *****
  • Posts: 2846
  • Your Friendly Forum Friend
    • View Profile
Re: [0.8a RC17] Game does not launch at all - JRE issue(?)
« Reply #4 on: May 02, 2017, 02:25:06 PM »

How did you modify your bat file?  I'm having the same issue but I think it's related to my Nvidia drivers.  I reinstalled them then it started happening it was fine before.
You can right click and use notepad to edit it
Logged
Help out MesoTroniK, a modder in need

2021 is 2020 won
2022 is 2020 too

Thana

  • Captain
  • ****
  • Posts: 289
    • View Profile
Re: [0.8a RC17] Game does not launch at all - JRE issue(?)
« Reply #5 on: May 04, 2017, 05:31:07 AM »

Sorry about the trouble! Do you happen to have JAVA_OPTS or _JAVA_OPTS in your environment variables? That's a likely cause of this problem - this variable being set could tell the game to allocate more memory than it can with a 32-bit JRE.

0.8a doesn't work for me, either, and with the same symptoms as the original poster.

What values would be good to set if I add those environment variables manually? (I'm on an 8GB machine.)
Logged

TJJ

  • Admiral
  • *****
  • Posts: 1905
    • View Profile
Re: [0.8a RC17] Game does not launch at all - JRE issue(?)
« Reply #6 on: May 04, 2017, 05:50:22 AM »

Sorry about the trouble! Do you happen to have JAVA_OPTS or _JAVA_OPTS in your environment variables? That's a likely cause of this problem - this variable being set could tell the game to allocate more memory than it can with a 32-bit JRE.

0.8a doesn't work for me, either, and with the same symptoms as the original poster.

What values would be good to set if I add those environment variables manually? (I'm on an 8GB machine.)

They shouldn't be defined at all, as they override the settings specified by SS. (and thus cause problems)
Logged

Thana

  • Captain
  • ****
  • Posts: 289
    • View Profile
Re: [0.8a RC17] Game does not launch at all - JRE issue(?)
« Reply #7 on: May 04, 2017, 08:33:27 AM »

They shouldn't be defined at all, as they override the settings specified by SS. (and thus cause problems)

Well, that's not the problem, then.

I'm leery of installing Java because
a) I understand it's not very safe anymore
and
b) I don't need it for anything else
as well as
c) If the game faces potential incompatibility issues from using a different version, it'd seem like just putting off the point of trouble, since the game comes with an integrated JRE.
Logged

TJJ

  • Admiral
  • *****
  • Posts: 1905
    • View Profile
Re: [0.8a RC17] Game does not launch at all - JRE issue(?)
« Reply #8 on: May 04, 2017, 09:00:15 AM »

This is just a theory, but have you (and the OP) modified your page file size? perhaps even disabled it?

Doing this might cause problems for Java's rather unique use-case of its heap needing to be 1 contiguous memory allocation.

The logic being, that a system with little or no page file space, will be more prone to having its physical memory highly fragmented, and thus less able to achieve large contiguous memory allocations.
« Last Edit: May 04, 2017, 09:07:51 AM by TJJ »
Logged

Mr. Sterling

  • Ensign
  • *
  • Posts: 28
    • View Profile
Re: [0.8a RC17] Game does not launch at all - JRE issue(?)
« Reply #9 on: May 04, 2017, 10:13:31 AM »

have you tried [0.8a RC19]?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: [0.8a RC17] Game does not launch at all - JRE issue(?)
« Reply #10 on: May 04, 2017, 10:34:37 AM »

@Thana: if you install jre 7, 64-bit, per the instructions here, that should be fine. The game will ship with it for the next release (0.8.1a), so an alternative is to wait for that.
« Last Edit: May 04, 2017, 11:11:51 AM by Alex »
Logged

Thana

  • Captain
  • ****
  • Posts: 289
    • View Profile
Re: [0.8a RC17] Game does not launch at all - JRE issue(?)
« Reply #11 on: May 04, 2017, 11:04:34 AM »

This is just a theory, but have you (and the OP) modified your page file size? perhaps even disabled it?

Doing this might cause problems for Java's rather unique use-case of its heap needing to be 1 contiguous memory allocation.

The logic being, that a system with little or no page file space, will be more prone to having its physical memory highly fragmented, and thus less able to achieve large contiguous memory allocations.

I haven't touched it, no. That said, I've never had a problem with Starsector - or Starfarer, way back then - before.

have you tried [0.8a RC19]?

Yep. It began with 0.8a.


@Alex: Okay, good to know! I'll try that.

Edited to add: Yep, that did it, the game starts again! :)
« Last Edit: May 04, 2017, 11:27:00 AM by Thana »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: [0.8a RC17] Game does not launch at all - JRE issue(?)
« Reply #12 on: May 04, 2017, 07:04:26 PM »

Excellent :)
Logged