Dialogue error message
-
- Rainbow AllStar
- Posts: 4548
- Joined: Fri Dec 26, 2008 4:56 pm
Dialogue error message
Last edited by Emerald141 on Thu Sep 01, 2022 12:44 pm, edited 1 time in total.
-
- Rainbow AllStar
- Posts: 4548
- Joined: Fri Dec 26, 2008 4:56 pm
1. Of course you can convert dialog filesNobody wrote:You can't convert dialogues, and will never need to. (yet)
Besides, in levels, they don't crash UNLESS they have been converted.
2. If a dialog crashes because it hasn't been converted, the editor MAVs.
"Array Index out of Bounds"... weird. I got that error once when I clicked somewhere in the editor. Maybe in this case it's the same thing?

Skype wrote:[7:23:42 AM] Darx: Click here to give me an internet!
[7:23:57 AM] 'a'a: *clicks here*
Actually, you're wrong, it's a very obviously logical error.Qloof234 wrote:Whenever the level's width/height is at 101, if you click on the size indicators to expand it, the game gives an Array index error.
It's nowhere near as common as an MAV, but it's bizarre as heck either way.
Skype wrote:[7:23:42 AM] Darx: Click here to give me an internet!
[7:23:57 AM] 'a'a: *clicks here*
What?Qloof234 wrote:I feel dumb now...![]()
Mind explaining? I can't see any reason for it TBH.
Array Index out of Bounds. It really is self-eplanatory. It just means that the level size has gone out of bounds, that is, is greater or less than it's allowed to be.
Skype wrote:[7:23:42 AM] Darx: Click here to give me an internet!
[7:23:57 AM] 'a'a: *clicks here*
I'm surprised it didn't just MAV right away (the few MOFI levels I've tried to load in the Editor just MAVs right away before it finishes loading, although now that I think of it, maybe that's due to the objects rather than the level size).AJQZC wrote:Well, there was once when I placed an adventure from MoFI directly into the Editor, the "Height" (or Width) was -999.
When I tried to adjust it, it gave me an error message about something out of bounds.
The reason for what you're seeing is because the MOFI levels added 4 extra bytes at the beginning where the level width used to be, so the editor mistakens those extra bytes as the width and ends up with totally bogus numbers like -999.
I hope you're not trying to get at me.Qloof234 wrote:Ummm... How is that obvious?
There's no indicator anywhere in the guides or anything that 101 is the size limit. The only way to find out is extending it (well, trying to) beyond 101.
Besides, it doesn't explain why the Dialog would randomly give off the same error.

Well, I think it's pretty obvious anyway...
Skype wrote:[7:23:42 AM] Darx: Click here to give me an internet!
[7:23:57 AM] 'a'a: *clicks here*
Implied in my statement is the fact that you should keep a copy of any files created through normal (ie. no hacking or hexing) means that you find to consistently crash the Editor, like that dialogue file you deleted. That way you can actually PM the problem file to Patrick and have a chance for him to maybe fix a possible bug in the Editor.cbloopy wrote:Since you deleted the file, I don't have any clue what happened
No, I'm not trying to get at you or anything.mqdar wrote:I hope you're not trying to get at me.Qloof234 wrote:Ummm... How is that obvious?
There's no indicator anywhere in the guides or anything that 101 is the size limit. The only way to find out is extending it (well, trying to) beyond 101.
Besides, it doesn't explain why the Dialog would randomly give off the same error.When did I say that it's obvious that 101 is the size limit, and when did I say that it explained why that happened with the dialog?
Well, I think it's pretty obvious anyway...
What I was talking about though was this quote:
I'm obviously not that good at understand things at 2:00 in the morning, so I thought you were saying that it was obvious that the level limit was 101.mqdar wrote:Actually, you're wrong, it's a very obviously logical error.
As for the dialog, isn't that what this topic is about? Or just the Array Index error?

Except Emerald141 claims he re-made the dialog and yet it didn't crash again. Also, it doesn't make sense since if it crashes right after you exceed some limits, then you wouldn't have had a chance to save the file with the data that are out of bounds, yet in Emerald141's case the problem data was saved with the file since he got the crash to happen again when he re-loads the dialog file after the crash.mqdar wrote:When did I say that it's obvious that 101 is the size limit, and when did I say that it explained why that happened with the dialog?
Well, I think it's pretty obvious anyway...
I also recall now that dlcs18 ran into a similar issue when he was working on WA:TRC, and he also had to redo the dialog file starting from a backup copy (from one of the demos he released). So it sounds like there might really be a bug in the dialog Editor, and if people can keep the files that cause the crash and send them Patrick's way (or even my way), it would go a great step towards actually getting the problem fixed (or at least understanding why it happens so people can avoid the problem and avoid losing their work).
Ok, I understand.Qloof234 wrote:No, I'm not trying to get at you or anything.mqdar wrote:I hope you're not trying to get at me.Qloof234 wrote:Ummm... How is that obvious?
There's no indicator anywhere in the guides or anything that 101 is the size limit. The only way to find out is extending it (well, trying to) beyond 101.
Besides, it doesn't explain why the Dialog would randomly give off the same error.When did I say that it's obvious that 101 is the size limit, and when did I say that it explained why that happened with the dialog?
Well, I think it's pretty obvious anyway...
What I was talking about though was this quote:I'm obviously not that good at understand things at 2:00 in the morning, so I thought you were saying that it was obvious that the level limit was 101.mqdar wrote:Actually, you're wrong, it's a very obviously logical error.
As for the dialog, isn't that what this topic is about? Or just the Array Index error?
Skype wrote:[7:23:42 AM] Darx: Click here to give me an internet!
[7:23:57 AM] 'a'a: *clicks here*
Off Topic:Array Index Out Of Bounds > AIOOB
Click here to go to WA:The Dark Abysm topic (Postponed until Wonderland Fangame is made).
Serlan wrote:Off Topic:Array Index Out Of Bounds > AIOOB

Click here to go to WA:The Dark Abysm topic (Postponed until Wonderland Fangame is made).
If this fact helps, the dialog became broken in the first place when I placed some text into interchange 99 and saved the dialog.cbloopy wrote:I also recall now that dlcs18 ran into a similar issue when he was working on WA:TRC, and he also had to redo the dialog file starting from a backup copy (from one of the demos he released). So it sounds like there might really be a bug in the dialog Editor, and if people can keep the files that cause the crash and send them Patrick's way (or even my way), it would go a great step towards actually getting the problem fixed (or at least understanding why it happens so people can avoid the problem and avoid losing their work).
dlcs18
Ah, I think I understand now. Maybe 99 is out-of-bounds.dlcs18 wrote:If this fact helps, the dialog became broken in the first place when I placed some text into interchange 99 and saved the dialog.cbloopy wrote:I also recall now that dlcs18 ran into a similar issue when he was working on WA:TRC, and he also had to redo the dialog file starting from a backup copy (from one of the demos he released). So it sounds like there might really be a bug in the dialog Editor, and if people can keep the files that cause the crash and send them Patrick's way (or even my way), it would go a great step towards actually getting the problem fixed (or at least understanding why it happens so people can avoid the problem and avoid losing their work).

Skype wrote:[7:23:42 AM] Darx: Click here to give me an internet!
[7:23:57 AM] 'a'a: *clicks here*
Thanks, that helps a bit, although it still took over an hour of testing before I hunt down the real culprit. I think I understand the bug a little better now, but it's going to be hard to avoid. I'll let Patrick know right away as it is pretty bad.dlcs18 wrote:If this fact helps, the dialog became broken in the first place when I placed some text into interchange 99 and saved the dialog.
Without going into details (since there's still quite a bit I don't quite understand yet myself), there is a count of something that's stored in the dialog file (it's the first byte in fact). When that count goes above 101, the AIOOB error occurs. I'm not sure what exactly it counts (could be number of interchanges, interchanges + answers, I don't know), but due to the bug, it isn't even counting correctly!
Here's the bug: right now, every time you save the dialog, the count is incremented by one no matter what. So if you merely open a dialog and then immediately save it without actually making changes, the count still goes up by one. Here's a test I did:
1) create a new dialog, put some text for interchange 0, and then for answer 0 and answer 1. Save the dialog. Open the dialog file in a hex editor and see the value of the first byte. It's 02.
2) Now, create another dialog with the same content, except you save each time you add some text (so save after entering the text for interchange 0, then save again after answer 0, and again after answer 1). If you open the dialog file in a hex editor now, the value of the first byte is not 02, but 04!
3) Now the kicker: re-open the dialog from step #2 in WA Editor, and then save it again without actually changing anything. Open the dialog file in the hex editor again. The value of the first byte changes to 05! Even though you didn't make a single change in the dialog editor!
So basically, the more number of times you save the dialog, the worse the mis-count becomes, until it eventually goes above 102 and kill your dialog file with it. This also explains why Emerald141 didn't encounter the problem when he re-created the dialog--when he creates it again from sctatch a 2nd time, the number of times the file was saved would be a lot less than the 1st time.
Obvious this is very evil. Patrick needs to fix this serious issue.
In an absolute emergency, there is a way to recover the dialog file shall you hit this problem, but it'll be a little tedious and you'll need a hex editor:
1) make a backup copy of the "damaged" dialog file.
2) open up the dialog file in the hex editor, and look at the value of the first byte. It's probably 66 (which is 102 in decimal).
3) decrease the value of that byte by some sizable amount, say to 46 hex (which is 70). Save.
4) open up the dialog file in WA Editor. It should now load, but don't get happy just yet. Try saving it now and see what happens.
5) It may still crash. If that's the case, this means you need to decrease the byte by a larger amount. Repeat steps 2-4 again lowering the byte more (to say 36 hex or something).
6) If it doens't crash, then congratulations, you dialog's back. But you may lose a little of your work as a result. Open up the dialog again in WA Editor and see what gets discarded as a result (it'll cut off starting from the highest interchange, so start there).
If the amount lost is too much, you have the option to restore from the backup copy, and repeat steps 2-4 decreasing the first byte by a smaller amount, in hopes that you can lose less work while still avoiding the crash.
-------------
I'm going to try and see if Patrick can describe the format of the dialog file to me, so that maybe I can try to write a program that does a better job of doing the recovery described above.
-
- Rainbow AllStar
- Posts: 4548
- Joined: Fri Dec 26, 2008 4:56 pm
Possibly. Definitely avoid high interchange numbers for now. As explained in my post, you will still run into the problem eventually, after your dialog file has been saved many many times, but at least the lower the interchange number, the longer it'll take before you hit the crash.Emerald141 wrote:I just remembered that I did hold the Interchange# down until it got to 100. Might that have something to do with it?