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

FMLSecurityManager IndexOutOfBoundException #3125

Merged
merged 1 commit into from Jul 28, 2016

Conversation

RedRelay
Copy link
Contributor

See http://www.minecraftforge.net/forum/index.php/topic,40907.0.html for more info (Blackout == EyZox == me)

@CLAassistant
Copy link

CLAassistant commented Jul 28, 2016

CLA assistant check
All committers have signed the CLA.

@RedRelay RedRelay changed the title FIX : IndexOutOfBoundException FMLSecurityManager IndexOutOfBoundException Jul 28, 2016
@cpw
Copy link
Contributor

cpw commented Jul 28, 2016

No error log? I've never seen this happen. Hypothetical fixes are not accepted.

@cpw cpw closed this Jul 28, 2016
@RedRelay
Copy link
Contributor Author

RedRelay commented Jul 28, 2016

Well, it is very rare but not hypothetical.
If array.length == 4, array.length > 4 is true but array[4] throws an OutOfBoundException because indexes starts by 0. array.length == 4 means array[0, 1, 2, 3] ...

I'm trying to make a custom JUnit test runner to create automated tests for my mod.
There is my log :

Exception in thread "main" [22:32:28] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: java.lang.ArrayIndexOutOfBoundsException: 5
[22:32:28] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]:  at net.minecraftforge.fml.relauncher.FMLSecurityManager.checkPermission(FMLSecurityManager.java:21)
[22:32:28] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]:  at java.lang.SecurityManager.checkExit(Unknown Source)
[22:32:28] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]:  at java.lang.Runtime.exit(Unknown Source)
[22:32:28] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]:  at java.lang.System.exit(Unknown Source)
[22:32:28] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]:  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)`

@bspkrs
Copy link
Contributor

bspkrs commented Jul 28, 2016

I'm failing to see how this is not a valid thing to fix. If the array length is 4 (> 3), then trying to access index 4 will always fail.

@LexManos
Copy link
Member

Yes we understand that, however we'd prefer a actual usecase that causes the issue so we have some justification beyond theoretical.
So how us it erroring.,

@cpw
Copy link
Contributor

cpw commented Jul 28, 2016

Thanks for the valid example. Sorry, we don't pull in people's hypothetical musings. A new test harness isn't hypothetical. Not sure why it's loading the security manager (I would tend to avoid loading anything unnecessary in a unit test framework myself).

@cpw cpw reopened this Jul 28, 2016
@cpw cpw merged commit b0fd975 into MinecraftForge:1.10.x Jul 28, 2016
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

Successfully merging this pull request may close these issues.

None yet

5 participants