[ZScript] Assertion failure with strings

Bugs that have been investigated and resolved somehow.

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.
Post Reply
User avatar
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

Post by phantombeta »

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.)
Attachments
StringAssertionFailure.pk3
(339 Bytes) Downloaded 20 times
User avatar
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

Post by Marisa the Magician »

FYI this is a known issue already, and it seems to be msvc-only, since it's not happening here on Linux.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: [ZScript] Assertion failure with strings

Post by _mental_ »

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [ZScript] Assertion failure with strings

Post by Graf Zahl »

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.
Post Reply

Return to “Closed Bugs [GZDoom]”