avetharun / OriginalFur

Origin mod extension to add visual effects to the player's model for each type of origin
The Unlicense
2 stars 0 forks source link

Index Out of Bounds Exception [crash] #5

Closed SopsyHallow closed 8 months ago

SopsyHallow commented 10 months ago

Sometimes the game crashes when i join a server with the mod on, crash seems semi inconsistent (worked fine some times but when it breaks it seems to stay broken, doesnt seem to affect singleplayer, mightve resolved it once by putting the player in different coords but wasnt a consistent fix?)

The crash is java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0

from a bit of research i think it means that an array is being asked for something but the array is empty? maybe it tries to load/get the playermodel or origin before it is loaded, or tries to get its origin?

crash-2023-08-15_05.53.50-client.txt

modlist is already in the crash log further down as quilt wrote them all out

avetharun commented 10 months ago

I think this is an issue with improper MatrixStack.pop calls, try the latest version at Modrinth as I haven't been able to replicate this

avetharun commented 10 months ago

I think this is an issue with improper MatrixStack.pop calls, try the latest version at Modrinth as I haven't been able to replicate this

Edit: No you were correct about the origins part, I forgot about what it was mentioning (because I fixed a matrix stack issue in the release) but I did modify that function slightly so still try it if you can

SopsyHallow commented 10 months ago

i tried the latest version and didnt get the crash (yet) so it might be fixed, although im uncertain since the crash itself was rather inconsistent to get

if i get it again i'll be sure to say

SopsyHallow commented 10 months ago

my partner still crashed with the latest version of the mod on, seems to be same crash of the array index out of bounds

i havent crashed again yet myself, but im really not sure what specifically triggers it, or un-triggers it for that matter

crash-2023-08-25_15.26.32-client.txt

avetharun commented 10 months ago

Oh, this is because the Origin isn't set, or is null. I'll fix this now!

avetharun commented 10 months ago

The way the function works is, it gets all equipped Origins (and if it's an Empty origin, aka on the choosing screen, it should work fine as origins:empty is defined) and returns the first model with the associated orign but I guess in rare cases it's just straight up null. Any non-existing models automatically return the same as origins:empty

avetharun commented 10 months ago

(should be) fixed as of 1.0.5

SopsyHallow commented 10 months ago

i've noticed a bug that from time to time, after relogging into the server, the origin isnt set correctly (if you press the origin button it says you dont have anything) although the actual effects of the origin still apply, maybe that is what "null" would be, im not sure

avetharun commented 10 months ago

Weird, the Origins are usually sent by the server on joining

avetharun commented 8 months ago

This issue should be fixed now, if this continues to occur let me know!