NPE when unable to get java info, reports incorrect OS version, and issues with 32-bit Windows.

Status
Not open for further replies.

TheSandwichMakr

New Member
Jul 29, 2019
582
0
0
When starting the launcher it appears to try to read all the installed versions of java, I do not use the java installer; I just keep the executables in folders. Therefore, there is nothing to be read, so it throws a npe and crashes. Previous versions of the launcher worked without this issue. It is nice that you added this feature :), but the launcher should work even when the java info isn't available.
It also seems to report that I am running "x86 Windows 8 6.2", when using 64-bit Windows 8.1, and running 32-bit java. Using 64-bit java correctly reports amd64. I also feel like it should say whether the version of java running is 32 or 64 bit when it says what version java is.

There also seems to be issues starting the game when using 32-bit java, numerous threads have been posted about this issue in tech support.
It's very strange, I can take the individual mods and add them myself to a 1.6.4 profile in the default Minecraft launcher, and it'll run just fine. It only seems to crash Java when done through the FTB Launcher.
The Minecraft Log had just two lines in it:
"Error occurred during initialization of VM
Could not reserve enough space for object heap
"

Not having enough space is extra strange, because I was playing the 1.6.4 packs just earlier today.
I am unable to test this as the launcher is working for me, not sure if this is an issue on other oses, or when using 32-bit java on 64-bit windows.


Launcher console output and issues:
AnalyticsBackgroundThread started
FTBLaunch starting up (version 1.3.2)
Java version: 1.7.0_45 -- 32 bit or 64 bit?
Java vendor: Oracle Corporation
Java home: D:\Programs\java32
Java specification: Java Virtual Machine Specification version: 1.7 by Oracle Corporation
Java vm: Java HotSpot(TM) Client VM version: 24.45-b08 by Oracle Corporation
OS: x86 Windows 8 6.2 -- should be amd64, not java's version
[i18n] Checking for updates ...
[i18n] enUS English language file loaded!
[i18n] remoteVer = 10
[i18n] localVer = 10
[i18n] Files are up to date
[i18n] Fallback enUS loaded
The FTB Launcher has found the following Java versions installed:
From Console: Exception in thread "AWT-EventQueue-0" -- shouldn't crash :p
From Console: java.lang.NullPointerException
From Console: at net.ftb.util.winreg.JavaFinder.parseWinJavaVersion(JavaFinder.java:159)
From Console: at net.ftb.gui.panes.OptionsPane.<init>(OptionsPane.java:132)
From Console: at net.ftb.gui.LaunchFrame.<init>(LaunchFrame.java:504)
From Console: at net.ftb.gui.LaunchFrame$1.run(LaunchFrame.java:274)
From Console: at java.awt.event.InvocationEvent.dispatch(Unknown Source)
From Console: at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
From Console: at java.awt.EventQueue.access$200(Unknown Source)
From Console: at java.awt.EventQueue$3.run(Unknown Source)
From Console: at java.awt.EventQueue$3.run(Unknown Source)
From Console: at java.security.AccessController.doPrivileged(Native Method)
From Console: at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
From Console: at java.awt.EventQueue.dispatchEvent(Unknown Source)
From Console: at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
From Console: at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
From Console: at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
From Console: at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
From Console: at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
From Console: at java.awt.EventDispatchThread.run(Unknown Source)

Launcher console output differences when using 64-bit java:
AnalyticsBackgroundThread started
FTBLaunch starting up (version 1.3.2)
Java version: 1.7.0_45
Java vendor: Oracle Corporation
Java home: D:\Programs\java
Java specification: Java Virtual Machine Specification version: 1.7 by Oracle Corporation
Java vm: Java HotSpot(TM) 64-Bit Server VM version: 24.45-b08 by Oracle Corporation
OS: amd64 Windows 8 6.2 -- notice it now says amd64
[i18n] Checking for updates ...
[i18n] enUS English language file loaded!
[i18n] remoteVer = 10
[i18n] localVer = 10
[i18n] Files are up to date
[i18n] Fallback enUS loaded
The FTB Launcher has found the following Java versions installed:
From Console: Dec 21, 2013 12:38:42 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.
-- With 64-bit java, Console sends a message
From Console: Exception in thread "AWT-EventQueue-0"
From Console: java.lang.NullPointerException
From Console: at net.ftb.util.winreg.JavaFinder.parseWinJavaVersion(JavaFinder.java:159)
From Console: at net.ftb.gui.panes.OptionsPane.<init>(OptionsPane.java:132)
From Console: at net.ftb.gui.LaunchFrame.<init>(LaunchFrame.java:504)
From Console: at net.ftb.gui.LaunchFrame$1.run(LaunchFrame.java:274)
From Console: at java.awt.event.InvocationEvent.dispatch(Unknown Source)
From Console: at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
From Console: at java.awt.EventQueue.access$200(Unknown Source)
From Console: at java.awt.EventQueue$3.run(Unknown Source)
From Console: at java.awt.EventQueue$3.run(Unknown Source)
From Console: at java.security.AccessController.doPrivileged(Native Method)
From Console: at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
From Console: at java.awt.EventQueue.dispatchEvent(Unknown Source)
From Console: at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
From Console: at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
From Console: at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
From Console: at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
From Console: at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
From Console: at java.awt.EventDispatchThread.run(Unknown Source)

Output from command prompt:
D:\Windows\sammich>D:\Programs\java32\bin\java.exe -jar "D:\Programs\Games\Minec
raft\Feed the Beast.jar"
[00:20:28] [INFO] LaunchFrame.main:188: FTBLaunch starting up (version 1.3.2)
[00:20:28] [INFO] JGoogleAnalyticsTracker$2.run:483: AnalyticsBackgroundThread s
tarted
[00:20:28] [INFO] LaunchFrame.main:189: Java version: 1.7.0_45
[00:20:28] [INFO] LaunchFrame.main:190: Java vendor: Oracle Corporation
[00:20:28] [INFO] LaunchFrame.main:191: Java home: D:\Programs\java32
[00:20:28] [INFO] LaunchFrame.main:192: Java specification: Java Virtual Machine
Specification version: 1.7 by Oracle Corporation
[00:20:28] [INFO] LaunchFrame.main:194: Java vm: Java HotSpot(TM) Client VM vers
ion: 24.45-b08 by Oracle Corporation
[00:20:28] [INFO] LaunchFrame.main:195: OS: x86 Windows 8 6.2
[00:20:28] [INFO] LocaleUpdater.run:67: [i18n] Checking for updates ...
[00:20:28] [INFO] I18N.setLocale:142: [i18n] enUS English language file loaded!
[00:20:28] [INFO] LocaleUpdater.run:80: [i18n] remoteVer = 10
[00:20:28] [INFO] LocaleUpdater.run:93: [i18n] localVer = 10
[00:20:28] [INFO] LocaleUpdater.run:98: [i18n] Files are up to date
[00:20:28] [INFO] I18N.addFiles:118: [i18n] Fallback enUS loaded
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at net.ftb.util.winreg.JavaFinder.parseWinJavaVersion(JavaFinder.java:15
9)
at net.ftb.gui.panes.OptionsPane.<init>(OptionsPane.java:132)
at net.ftb.gui.LaunchFrame.<init>(LaunchFrame.java:504)
at net.ftb.gui.LaunchFrame$1.run(LaunchFrame.java:274)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

The differences with 64-bit java are the same for both the command prompt and launcher console output.


Hope this helps :)
 

Nerixel

New Member
Jul 29, 2019
1,239
0
0
I believe there is no way for a Java program to detect whether the computer is 32 or 64 bit, and the only way to detect that is whether the program is using 32 or 64 bit Java.
This is just me guessing, of course, but I've never seen a Java program accurately detect the bit type of the computer and it makes sense that programs would do it if possible.

Is there a specific reason you need more than one version of Java installed, in particular why you need both 32 and 64 bit versions installed? I believe I've heard people successfully use a 64-bit Java with a 32-bit browser.
 

TheSandwichMakr

New Member
Jul 29, 2019
582
0
0
I believe there is no way for a Java program to detect whether the computer is 32 or 64 bit, and the only way to detect that is whether the program is using 32 or 64 bit Java.
This is just me guessing, of course, but I've never seen a Java program accurately detect the bit type of the computer and it makes sense that programs would do it if possible.

Is there a specific reason you need more than one version of Java installed, in particular why you need both 32 and 64 bit versions installed? I believe I've heard people successfully use a 64-bit Java with a 32-bit browser.
I wasn't sure if it was able to tell; if it's not able to though, then they should put x86 or amd64 by the java version instead of by the os version because this can cause confusion. Although if they do intend to check (and I beleive this would be beneficial), they could see if the WOW64 folder exists as I believe it is only present on 64-bit systems.
I have 32 and 64 bit java installed for troubleshooting issues on the forums, and whatever other reason I might need 32-bit for. I never use java in my browser as I never really need it, and it has so many vulnerabilities.
 

Nerixel

New Member
Jul 29, 2019
1,239
0
0
I wasn't sure if it was able to tell; if it's not able to though, then they should put x86 or amd64 by the java version instead of by the os version because this can cause confusion. Although if they do intend to check (and I beleive this would be beneficial), they could see if the WOW64 folder exists as I believe it is only present on 64-bit systems.
I have 32 and 64 bit java installed for troubleshooting issues on the forums, and whatever other reason I might need 32-bit for. I never use java in my browser as I never really need it, and it has so many vulnerabilities.
Checking the existence of a folder is a little dodgy. I wouldn't code a check for the bit type based on the existence of a folder into any program, let alone a professional one.

And I agree, it would make more sense to put the Java type next to Java, not the OS. I can see why it wouldn't be possible though. The launcher may be using a built-in Java function to get the OS, which contains the Java type. As the type can change length and position, it can't reliably be filtered out and put somewhere else.
But anyway, it doesn't actually matter where it is all that much, because anyone who knows how to read a console log knows that's not actually the OS bit type, it's the Java bit type.
 
Status
Not open for further replies.