If you call a member function of the return value of a function that returns a string, it'll cause an assertion failure.
(I'm using an x64 build this time, btw.)
[ZScript] Assertion failure with strings
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.
- phantombeta
- Posts: 2084
- Joined: Thu May 02, 2013 1:27 am
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
[ZScript] Assertion failure with strings
- Attachments
-
- StringAssertionFailure.pk3
- (339 Bytes) Downloaded 20 times
- Marisa the Magician
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
- Contact:
Re: [ZScript] Assertion failure with strings
FYI this is a known issue already, and it seems to be msvc-only, since it's not happening here on Linux.
Re: [ZScript] Assertion failure with strings
This is well known problem with ZScript VM caused by inability to get address of temporary object. I cannot find the first report thought.
At the moment the limitation can be solved with intermediate variable.
The problem however is not platform specific. I guess it's not happening on Linux because you never tried to reproduce it with Debug configuration.
At the moment the limitation can be solved with intermediate variable.
The problem however is not platform specific. I guess it's not happening on Linux because you never tried to reproduce it with Debug configuration.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [ZScript] Assertion failure with strings
Actually, this particular case can be solved. Generally it is correct that temporary objects can not be used as a self pointer for member function calls but for strings an exception can be made.