MantisBT - Zandronum
View Issue Details
0002741Zandronum[All Projects] Bugpublic2016-05-26 00:572018-09-30 21:43
Catastrophe 
Dusk 
normalcrashalways
closedfixed 
MicrosoftWindowsXP/Vista/7
2.1 
3.03.0 
0002741: Database mod crash
Load up these files on ctf in order

'http://static.allfearthesentinel.net/wads/idl201x_b.pk3 [^]'
'http://gam.thewaitingroom.org/be_wads/fnf-stats-test.pk3 [^]'

join server

crash!
No tags attached.
Issue History
2016-05-26 00:57CatastropheNew Issue
2016-05-26 00:59CatastropheNote Added: 0014984
2016-05-26 01:01CatastropheNote Edited: 0014984bug_revision_view_page.php?bugnote_id=14984#r9038
2016-05-26 04:58CatastropheNote Added: 0014985
2016-06-04 19:45DuskAssigned To => Dusk
2016-06-04 19:45DuskStatusnew => assigned
2016-06-04 20:37DuskNote Added: 0015013
2016-06-04 20:37DuskStatusassigned => needs review
2016-06-04 20:38DuskView Statusprivate => public
2017-05-30 23:33CatastropheNote Added: 0017791
2017-06-04 08:45Torr SamahoNote Added: 0017793
2017-06-04 08:53Torr SamahoNote Added: 0017795
2017-06-04 08:53Torr SamahoStatusneeds review => needs testing
2017-06-10 04:50Ru5tK1ngNote Added: 0017812
2017-06-10 04:50Ru5tK1ngDescription Updatedbug_revision_view_page.php?rev_id=10678#r10678
2017-06-18 19:14Ru5tK1ngNote Added: 0017838
2017-06-18 19:14Ru5tK1ngStatusneeds testing => resolved
2017-06-18 19:14Ru5tK1ngResolutionopen => fixed
2017-06-18 19:14Ru5tK1ngFixed in Version => 3.0
2017-06-18 19:14Ru5tK1ngTarget Version => 3.0
2018-09-30 21:43Blzut3Statusresolved => closed

Notes
(0014984)
Catastrophe   
2016-05-26 00:59   
(edited on: 2016-05-26 01:01)
this is the script that is causing it.'http://hastebin.com/basomihura.vhdl [^]'

(0014985)
Catastrophe   
2016-05-26 04:58   
After more testing, I've figured it out, it is this line.

key = strParam(s:FNF_LONGESTFRAGSTREAK_NAME_, d:i);
setDBEntryString(FNF_SERVER_TOTALS, key, 0);

It appears doing setDBEntryString with an integer, such as 0, causes Zandronum to crash. Since you're only supposed to put strings in here, perhaps the ACS compiler should give an error if it isn't?
(0015013)
Dusk   
2016-06-04 20:37   
The crash appears to happen when the const char *-type string pointers get nulled as a result of this.

If I change the database code to use FStrings, the crashing goes away.

Is this a good approach?
(0017791)
Catastrophe   
2017-05-30 23:33   
Is this being fixed? Ran into it again and I daresay it'll drive people insane trying to debug their mods.
(0017793)
Torr Samaho   
2017-06-04 08:45   
Should definitely be fixed, but I'm not sure that we should change the database code from const char * to FString for this. A few sanity checks on the pointers should be enough. I'll have a look.
(0017795)
Torr Samaho   
2017-06-04 08:53   
Can you check if this fixes the problem?
(0017812)
Ru5tK1ng   
2017-06-10 04:50   
-Updated the example wad links-

That build seemed to fix the issue, the server didn't crash.
(0017838)
Ru5tK1ng   
2017-06-18 19:14   
Pulled the latest changes and I didn't get any crash online.