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

Index out of bounds when in Intellij debug mode #78

Open
Goby56 opened this issue Dec 26, 2024 · 1 comment
Open

Index out of bounds when in Intellij debug mode #78

Goby56 opened this issue Dec 26, 2024 · 1 comment

Comments

@Goby56
Copy link

Goby56 commented Dec 26, 2024

If you enable debug mode within Intellij and cycle through a list option the game crashes when you reach the last element.

I get no useful crash log or stacktrace but the IDE opens the Preconditions.java file. It seems to refer to a specific part of that file possibly hinting at what went wrong:

@IntrinsicCandidate
public static <X extends RuntimeException>
    int checkIndex(int index, int length,
               BiFunction<String, List<Number>, X> oobef) {
    if (index < 0 || index >= length)
        throw outOfBoundsCheckIndex(oobef, index, length);
    return index;
}

This may not really be a top priority but I thought I would share it as it is quite annoying in the cases when you are actually in debug mode.

@Motschen
Copy link
Member

Thanks for sharing, should be an easy fix.

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

2 participants