Page 1 of 1

The "Mushbug" - is fixed!

Posted: Fri Apr 24, 2015 9:36 am
by Kevsoft
So what I mean with "Mushbug" is the bug where Powerups hit a Lava-Block and SMBX sometimes crashes. (Subscript out of range (Error 9))

And yes: IT IS FINALLY FIXED.
It will be released as a part of the next LunaLua update.

But you guys will question now: "How could this happen? And why only sometimes?"
There where a lot of myths about it. Some say it is because of too many NPCs, others think it is because of too many Effects in the level.

Here is the actual error:
The SMBX code mismatched the block-index with the npc-index in a small code segment. The code checks for npc settings with a block index, though it shouldn't do it, as it is a block-index. When checking the npc settings for an element in the array it uses the block-index. So if you have a block with the index 6104 you're reaching the maximum of the NPC-Array. (I hope it is understandable).
So in other words:
If you have less than 5000 blocks in your level, you won't encounter that bug.

So Rednaxela and me investigated that error and patched some code and now it is working ;D.

Re: The "Mushbug" - is fixed!

Posted: Fri Apr 24, 2015 9:46 pm
by 4matsy
LOL, of course, it was the obscure reason no one suspected. :p

Nice job finding and squishing that bug for good. :D

Re: The "Mushbug" - is fixed!

Posted: Sat Apr 25, 2015 8:48 am
by Squishy Rex
Kevsoft wrote: If you have less than 5000 blocks in your level, you won't encounter that bug.
That must be the reason why I've never encountered this bug before. It's good to know that it is practically fixed though now.

Re: The "Mushbug" - is fixed!

Posted: Sat Apr 25, 2015 9:05 pm
by HenryRichard
Huh, I always figured the game didn't know what player was supposed to get the powerup so it gave up and crashed.
Good to know it's been fixed!