Page 1 of 1
RTC.DrawDungeonView CRASH
Posted: Tue May 30, 2017 7:21 pm
by Saumun
I've hit a problem in my latest dungeon and wonder if anyone can help. It's got me stumped.
I'm getting a crash when a floor object is activated... but only in certain directions. If the party is facing west or north when it is activated, it works fine. East or south and it crashes.
The diagnostic report has a GetTileWallset and a DrawDungeonView error, so clearly it's a graphical issue... I just don't know why!
Re: RTC.DrawDungeonView CRASH
Posted: Wed May 31, 2017 12:52 pm
by Adamski
Probably there is a problem with the object image size. I think the .bmp or .png size is different from what written on the .txt file. This error occurs only when the party faces towards the floor object (east or south)
Re: RTC.DrawDungeonView CRASH
Posted: Wed May 31, 2017 4:46 pm
by Saumun
Thanks Adamski... I'll have a look in the text file for differences.
Re: RTC.DrawDungeonView CRASH
Posted: Wed May 31, 2017 5:41 pm
by Adamski
Saumun, you can use the editor, it's easier. Compare the size of your custom graphic element (Add/Replace Graphics) with the real size of the image.
Re: RTC.DrawDungeonView CRASH
Posted: Wed May 31, 2017 5:44 pm
by Saumun
Damn... Can't find anything wrong.
Also, I should have pointed out the specifics.
It's a flat flooritem that is activated by an object. There are no direction specific bitmaps, as it looks the same from each direction... So it only has 'front' bitmaps.
It starts as invisible and becomes visible when the object is placed on it.
If the object is placed on it from the party facing west or north, it crashes. Placing the object on it from the party facing south or east works fine.
The DrawDungeonView error has some numbers after it, like char 26, 1 and a couple of others... but I don't know what they refer to.
Re: RTC.DrawDungeonView CRASH
Posted: Wed May 31, 2017 6:06 pm
by Adamski
My suggestion: create a new mini dungeon. It could be a simple room that contains only this flooritem and the object you place on. Be sure to use identical parameters and values for triggers and relays. Test it and check if crashes. If you can't solve, send me the mini-dungeon .txt and the graphics of both objects.
Re: RTC.DrawDungeonView CRASH
Posted: Wed May 31, 2017 6:38 pm
by Saumun
Yes... I think doing it in isolation is my only move at the moment, because I can find nothing wrong.
The salient points in the diag report are:
RTC.GetTileWallset(int 8796);
RTC.DrawDungeonView(char 26, char 8, char 26, char 2);
Re: RTC.DrawDungeonView CRASH
Posted: Fri Jun 02, 2017 12:38 am
by Saumun
Made a test dungeon and got the same crash, then tried something I should have tried in the first place... adding a slight delay.
It worked.
But there is still no logical reason that it should be any different with or without delay, since there is no other conflicting mechanic. A strange one, but at least it's working now.
Re: RTC.DrawDungeonView CRASH
Posted: Fri Jun 02, 2017 4:29 pm
by Chaos-Shaman
I have had a similar problem, but did not use a delay to get rid of it. I re-saved the bitmaps and the problem was gone. Sometimes even though the file looks fine, it has other properties that are not shown that happen during the save. This has happened a few times and each time the file had to be re-saved to work properly.
Re: RTC.DrawDungeonView CRASH
Posted: Fri Jun 02, 2017 8:51 pm
by Saumun
I recreated it from scratch and still got the same crash. Even trying the scenario without custom graphics and using stuff already in the editor made it crash.
It's a strange one.
I should have known to try the delay trick earlier though, because it has worked for me before in other situations.