I'm currently attempting to create compatibility with Hellbound Map29 as several ceilings are too low, blocking cyberdemons from teleporting. However, if you set the line parameter to null, the game instantly crashes at a_ceiling.cpp, line 248 due to a null pointer.
CreateFloor, on the other hand, has a safeguard in place in the event it's null. CreateCeiling just assumes it's there.
Note, it doesn't do a VM abort, the game just outright closes out completely, instantly shutting down.
level.CreateCeiling crash
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
- Major Cooke
- Posts: 8209
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: level.CreateCeiling crash
What are you trying to do? You cannot call map thinker functions from the compatibility code. Please post your code.
Re: level.CreateCeiling crash
I guess you need LevelCompatibility.OffsetSectorPlane() method. As for the initial report, correctly used or not, the crash must be to fixed.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: level.CreateCeiling crash
It shouldn't be able to crash there, unless the function was used in a catastrophically wrong way. And therefore I can't fix it without seeing what was done wrong here.
- Major Cooke
- Posts: 8209
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: level.CreateCeiling crash
Code: Select all
double val = 64;
level.CreateCeiling(level.sectors[3044], Ceiling.ceilRaiseByValue, level.lines[28656], val, 0, val);
level.CreateCeiling(level.sectors[245], Ceiling.ceilRaiseByValue, level.lines[28664], val, 0, val);
level.CreateCeiling(level.sectors[990], Ceiling.ceilRaiseByValue, level.lines[28660], val, 0, val);
level.CreateCeiling(level.sectors[3045], Ceiling.ceilRaiseByValue, level.lines[28652], val, 0, val);
level.CreateCeiling(level.sectors[3239], Ceiling.ceilRaiseByValue, level.lines[28327], val, 0, val);
level.CreateCeiling(level.sectors[3251], Ceiling.ceilRaiseByValue, level.lines[28335], val, 0, val);
level.CreateCeiling(level.sectors[3235], Ceiling.ceilRaiseByValue, level.lines[28331], val, 0, val);
level.CreateCeiling(level.sectors[3243], Ceiling.ceilRaiseByValue, level.lines[28323], val, 0, val);
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: level.CreateCeiling crash
You do that from the compatibility handler? No wonder it crashes, at that point the level isn't fully initialized, and adding checks for that to every function imaginable is way too much work. In particular the lines array in the sector is still empty at this time, because line properties can be changed from compatibility handlers, including the sector reference.
These functions are not for raising the ceiling but for creating a ceiling movement thinker.
If I could I'd just block off access to the level there, but that'd render the class useless. Unfortunately that exposes all of Level's functions to the handler, even though most of them would probably crash.
These functions are not for raising the ceiling but for creating a ceiling movement thinker.
If I could I'd just block off access to the level there, but that'd render the class useless. Unfortunately that exposes all of Level's functions to the handler, even though most of them would probably crash.
- Major Cooke
- Posts: 8209
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: level.CreateCeiling crash
What should I do then? Those ceilings in particular need to be adjusted somehow or that map will never allow for 100% kills.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: level.CreateCeiling crash
This. The compatibility handler should only use its own interface._mental_ wrote:I guess you need LevelCompatibility.OffsetSectorPlane() method. As for the initial report, correctly used or not, the crash must be to fixed.