Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Has anyone else seen this bug?

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
FnrrfYgmSchnish
Probably the Grand Poobah or something




Joined: 19 Jul 2003
Posts: 88
Location: Not here

PostPosted: Wed Jun 24, 2009 8:00 pm    Post subject: Has anyone else seen this bug? Reply with quote

While I was working on Okédoké (particularly in Wrongside, but I noticed it cropping up again on one of the maps in Chapter 3), I ended up bumping into a really nasty bug that ranges from "mildly annoying" to "instantly crashes Custom," depending on just what it decides to do.

From what I've seen, it only happens when I'm editing big maps (Wrongside is 105 x 70 or something up in that range, and the Haunted House map in Chapter 3 is pretty big as well; it only happened once or twice on smaller maps), especially when I resize the map to fit more stuff and then do a bunch of map editing immediately afterward.

Basically what it does is scramble the NPC data; sometimes just one NPC, and sometimes as many as three or four at a time. I've seen it change just about everything about NPCs that can be changed:

    * the NPC's picture (a chest randomly became a Border Ranger)
    * their tags (a chest that wouldn't appear unless "Tag 2378" was on)
    * their textbox (an unused NPC got a "There were 12 pesos in this chest!" message)
    * their vehicle setting (a Mexican guy who became a vehicle that doesn't exist, with a blank name... talking to him made your characters disappear and made it impossible to move)
    * their item (a ghost that gave you a nonexistent blank item when you talked to it)
    * their script (an unused NPC that runs Script 3275 or something like that)


Thanks to the "find broken script triggers" feature, I have a screenshot of one result of the bug...

Yeesh. Is it even possible to have that many scripts?? Thankfully, the NPC that this got slapped onto was a shop owner who you're never able to actually talk to (since he's behind the counter), but it's still a pretty scary bug.

I've even had a few that made Custom crash--I'm really not sure what the bug did to those, but whatever it was, Custom just instantly closed every time I tried to edit them!

The first time I ever noticed this bug was in Xocolatl+2; I tried a nightly version (June 5th's nightly, I think) to see if that fixed it, but then it happened again.

I looked through Bugzilla and I don't think I saw anything that sounded similar (though I could've just overlooked it, since it was 3 in the morning)... kind of surprising, since you'd think something like this would get noticed pretty quick (or maybe most people are just using small enough maps that it never happens?)
Back to top
View user's profile Send private message Send e-mail
Baconlabs
PURPLE IS MANLY




Joined: 15 Mar 2009
Posts: 335
Location: Tennessee

PostPosted: Thu Jun 25, 2009 2:00 am    Post subject: Reply with quote

This needs to go in the HELP! forum.

My two bits:
1) Save often.
2) Never seen this happen before.
Back to top
View user's profile Send private message
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Thu Jun 25, 2009 7:37 am    Post subject: Reply with quote

Sounds like memory corruption.

The fact that it happens after resizing the map is good information.

Based on your description, I am going to guess that the map resizing has a bug that causes some memory areas to overlap, and when you edit *something* right after a resize, the data for whatever you are editing (tilemap? wallmap? doors?) is overwriting the NPC data.

If you can figure out exactly what you do after resizing that triggers this, so I can reproduce it the same way, this should be easier to fix.

You might also want to try this nightly build: http://hamsterrepublic.com/ohrrpgce/nightly/ohrrpgce-wip-fb-sdl-debug-exx.zip

It has extra error checking that might be able to catch the memory corruption as soon as it happens. If so, it means that custom will suddenly close, but knowing the precise moment when custom suddenly closes will help narrow down where the problem is.

Also, the crashes that you are sometimes seeing when trying to edit the data of corrupted NPCs is probably a different bug caused by insufficient error checking in the NPC data editor. If you can mail me a copy of okedoke.rpg with corrupted NPCs that crash custom, I should be able to add more error checking for whichever data is causing the crash.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
FnrrfYgmSchnish
Probably the Grand Poobah or something




Joined: 19 Jul 2003
Posts: 88
Location: Not here

PostPosted: Thu Jun 25, 2009 9:25 am    Post subject: Reply with quote

Quote:
This needs to go in the HELP! forum.


Yeah, I figured this might be in the wrong place... but the forum restructuring confused me a little so I wasn't 100% sure where it was supposed to go.

Quote:
The fact that it happens after resizing the map is good information.

Based on your description, I am going to guess that the map resizing has a bug that causes some memory areas to overlap, and when you edit *something* right after a resize, the data for whatever you are editing (tilemap? wallmap? doors?) is overwriting the NPC data.

If you can figure out exactly what you do after resizing that triggers this, so I can reproduce it the same way, this should be easier to fix.


As far as I can remember, I was always doing a bunch of tilemap editing right before the bug happened. I'm using default wallmaps for almost everything and I usually don't place doors or NPCs until I'm finished with the tiles, so the tilemap seems like the most likely thing.

Quote:
You might also want to try this nightly build: http://hamsterrepublic.com/ohrrpgce/nightly/ohrrpgce-wip-fb-sdl-debug-exx.zip

It has extra error checking that might be able to catch the memory corruption as soon as it happens. If so, it means that custom will suddenly close, but knowing the precise moment when custom suddenly closes will help narrow down where the problem is.


I'll try that out. I'm suspecting that it's tilemapping after resizing, since it always happened when I was either expanding an old map to put more stuff in it or working on a new map that I had to resize a few times to fit everything I wanted on there; I'll edit this post once I download this and find out exactly when it's happening.

EDIT: I couldn't get the bug to trigger with that nightly version you posted; I tried resizing, then doing a bunch of map editing (first in a new RPG file with two maptiles, and then on the Wrongside and Haunted House maps in a copy of Okédoké) but Custom never crashed and none of the NPCs ever got scrambled up. Not sure what's going on here...

Quote:
Also, the crashes that you are sometimes seeing when trying to edit the data of corrupted NPCs is probably a different bug caused by insufficient error checking in the NPC data editor. If you can mail me a copy of okedoke.rpg with corrupted NPCs that crash custom, I should be able to add more error checking for whichever data is causing the crash.


The Okédoké file I submitted for the contest has a few of the screwed-up NPCs in it, so if you have that version lying around you should check out NPCs 12 and 21 on the Wrongside map and NPC 1 on the Frogbucket map. All three of them crash Custom.
Back to top
View user's profile Send private message Send e-mail
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Thu Jun 25, 2009 11:04 am    Post subject: Reply with quote

I have added extra error checking for the NPC editor. None of your corrupted NPCs should crash custom anymore with the nightly builds, and you will be able to see which data is corrupted.

I am eager to track down where the corruption starts next :)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
FnrrfYgmSchnish
Probably the Grand Poobah or something




Joined: 19 Jul 2003
Posts: 88
Location: Not here

PostPosted: Thu Jun 25, 2009 7:56 pm    Post subject: Reply with quote

Just tried out the June 25th nightly, and the NPCs no longer crash Custom the second I touch them!

It's actually kinda funny to see that all those crashes were because of... invalid pushability types, of all things. I never would've guessed that.

Still not sure about the cause of the NPC corruption in the first place; I did a little more testing (this time actually making a map bigger like I'd do if I was enlarging the map normally, instead of just spewing random tiles onto the blank space or making little "rooms" off to the side of the real map like I had been doing earlier), but I still wasn't able to trigger the bug intentionally. Hopefully somebody'll be able to figure it out, since it's an annoying bug even without the crashes.
Back to top
View user's profile Send private message Send e-mail
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Fri Jun 26, 2009 7:48 am    Post subject: Reply with quote

I have made a note of this bug here: http://rpg.hamsterrepublic.com/bugzilla/show_bug.cgi?id=738
Back to top
View user's profile Send private message Send e-mail Visit poster's website
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat Jun 27, 2009 6:06 am    Post subject: Reply with quote

After investigation, I discovered that Ctrl+R - replace tile - has a memory corruption bug that should cause a pattern of damage just like you saw. Did you ever use this? If not, then there's probably yet another bug; I've also found another non memory corrupting bug.

Edit: actually, you didn't enable the third layer on either of Frogbucket or Wrongside, which means that, since layer 2 exists whether you use it or not, it would have caught all out of bounds accesses from Ctrl+R on layer 0 or 1, and Ctrl+R couldn't have overwritten any NPC data. Oh well.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
FnrrfYgmSchnish
Probably the Grand Poobah or something




Joined: 19 Jul 2003
Posts: 88
Location: Not here

PostPosted: Sat Jun 27, 2009 8:49 am    Post subject: Reply with quote

I did use the paintbucket-fill tool (CTRL+P) and "select the tile you're on" (CAPS LOCK) quite a bit, but I never used CTRL+R... actually, up until just now, I didn't even know it existed. Ha ha ha!

I have seen CTRL+P crash Custom once or twice (when using it on a huge empty area), so maybe that's the one that's doing it?

EDIT: The bug strikes again...


While working on one of the last maps before I'm done with Chapter 3, I managed to trigger the bug again (for the first time since I downloaded the June 25th nightly.) And this time I kept track of exactly what I did before it happened:

1: Edited some maptiles
2: Opened up a blank map I had made earlier
3: Did some tilemapping (only Layer 0, used CAPS LOCK but no other special buttons)
4: Left the map editor, edited some maptiles
5: Placed some of those new tiles on the map
6: Placed a door on the map
7: Looked at NPCs; NPC 0 was corrupted.

Hopefully this might help narrow it down a little.
Back to top
View user's profile Send private message Send e-mail
Baconlabs
PURPLE IS MANLY




Joined: 15 Mar 2009
Posts: 335
Location: Tennessee

PostPosted: Sat Jun 27, 2009 2:11 pm    Post subject: Reply with quote

I just got this bug. Tags seem to be easily corrupted; one of my NPCs suddenly had "Appear if Tag 18,654* = ON" which should be impossible since the max tag number is 999.

* - Not exact, just a 5-digit number.
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat Jun 27, 2009 9:14 pm    Post subject: Reply with quote

Quote:
I have seen CTRL+P crash Custom once or twice (when using it on a huge empty area), so maybe that's the one that's doing it?

Ah, good spotting: attempting to fill an area of more than about 14000 tiles can overflow the stack. However, this definitely isn't to blame for the corruption. Another two map editor bugs found!

Baconlabs, can you remember what you were doing? Specifically, what you were doing in the map editor - bugs in other editors are highly unlikely to be to blame.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Baconlabs
PURPLE IS MANLY




Joined: 15 Mar 2009
Posts: 335
Location: Tennessee

PostPosted: Sat Jun 27, 2009 9:42 pm    Post subject: Reply with quote

Okay I'll be honest, my problems may have absolutely nothing to do with the editor.
See, I've got these extra buttons on my laptop that change the volume, which causes weird things to happen sometimes. Acts like I'm constantly holding the 6 key down even though I ain't, so I have to restart the program. That's probably not a bug though.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group