MantisBT - Zandronum
View Issue Details
0001307Zandronum[All Projects] Bugpublic2013-03-25 23:542015-09-06 17:07
Ijon Tichy 
 
highmajoralways
closedno change required 
1.0 
 
0001307: ACS libraries compiled with StrParam use the same string table as BEHAVIOR ACS
This is a weird bug. When StrParam doesn't come into play, ACS libraries have their own string table, and things work fine. However, when StrParam is used and a map with ACS is opened, ACS libraries suddenly decide that using their own string table makes too much sense, and instead, they use the string table that the BEHAVIOR lump is using. This fails miserably. Every single string in the library changes values, and this ends up leading to a crash with libraries such as stralloc.h (to be attached).
1. Load Zandronum with strparambroken.pk3.
2. "map map01"
3. Hit the switches on the metal textures. The strings for these are provided by BEHAVIOR, and StrParam works as expected. (Should print "StrParam BEHAVIOR" and "Static BEHAVIOR")
4. Hit the switches on the stone textures. The strings for theses are provided by LOADACS... or would be if it didn't break. They print the exact same things the metal switches do (instead of "StrParam LOADACS" and "Static LOADACS").
acs, library, loadacs, strings, strparam
? strparambroken.pk3 (10,206) 2013-03-25 23:54
/tracker/file_download.php?file_id=953&type=bug
? stralloc.h (5,113) 2013-03-25 23:55
/tracker/file_download.php?file_id=954&type=bug
Issue History
2013-03-25 23:54Ijon TichyNew Issue
2013-03-25 23:54Ijon TichyFile Added: strparambroken.pk3
2013-03-25 23:55Ijon TichyFile Added: stralloc.h
2013-03-25 23:58Ijon TichyNote Added: 0006173
2013-05-15 22:39Ijon TichyNote Added: 0006338
2014-06-13 18:00WatermelonNote Added: 0009238
2014-06-13 18:00WatermelonStatusnew => feedback
2015-09-05 18:20DuskNote Added: 0013427
2015-09-05 18:20DuskStatusfeedback => acknowledged
2015-09-05 18:20DuskResolutionopen => waiting for zdoom
2015-09-06 17:07DuskNote Added: 0013440
2015-09-06 17:07DuskStatusacknowledged => closed
2015-09-06 17:07DuskResolutionwaiting for zdoom => no change required

Notes
(0006173)
Ijon Tichy   
2013-03-25 23:58   
Ignore commonFuncs.h. That's just something automatically linked into all projects I create.
(0006338)
Ijon Tichy   
2013-05-15 22:39   
So it seems a #library line was forgotton, which fixes it... in this example. Hangman still breaks entirely when the game ACS is loaded as a library in a map with ACS.
(0009238)
Watermelon   
2014-06-13 18:00   
Does this still happen in 2.0?
(0013427)
Dusk   
2015-09-05 18:20   
'http://forum.zdoom.org/viewtopic.php?f=2&p=858018 [^]'
(0013440)
Dusk   
2015-09-06 17:07   
Quote from "Graf Zahl"

A missing #library statement is a user error. A library without this will inevitably have problems with string references.
And that's exactly what's missing in the linked code.