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

Launcher crashes if user has java opt less than 5 characters #291

Closed
seldonPlan opened this issue Dec 29, 2016 · 1 comment
Closed

Launcher crashes if user has java opt less than 5 characters #291

seldonPlan opened this issue Dec 29, 2016 · 1 comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs.

Comments

@seldonPlan
Copy link

I previously had a java opt of -d64 in my Java parameters (yes, I know it is a useless option, and has now been removed). This caused the launcher process to fail with

java.lang.StringIndexOutOfBoundsException: String index out of range: 5
    at java.lang.String.substring(Unknown Source)
    at com.atlauncher.mclauncher.MCLauncher.launch(MCLauncher.java:176)
    at com.atlauncher.data.Instance$2.run(Instance.java:1204)

The issue can be traced to this line. Any java option that is not long enough for the call to arg.substring(0, 5) will cause it to fail in the same way.

RyanTheAllmighty added a commit that referenced this issue Dec 29, 2016
Fix NPE with short Java options in MCLauncher classes, fixes #291
@RyanTheAllmighty RyanTheAllmighty added the bug Confirmed bugs or reports that are very likely to be bugs. label Dec 29, 2016
@RyanTheAllmighty
Copy link
Member

Fixed with release 3.2.3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs.
Development

No branches or pull requests

2 participants