MantisBT - Zandronum
View Issue Details
0002736Zandronum[All Projects] Bugpublic2016-05-17 10:152018-09-30 22:00
WaTaKiD 
Edward-san 
normalcrashalways
closedfixed 
MicrosoftWindowsXP/Vista/7
3.0-beta 
3.03.0 
0002736: crash when exiting demo as idx 1
does not crash when demo was recorded by a player with idx 0
does not crash in zan 2.1.2 or gzdoom 1.8.6
this commit is the culprit:'https://bitbucket.org/Torr_Samaho/zandronum/commits/4a7ea43b28eeeec226d44e93d8ee6834cc7d84fe [^]'
crash report using 3.0-r160510-1827 and example demo are attached
either play the attached demo (only doom2.wad is used) and exit it or:

host server: zandronum -iwad doom2 -host
connect client to use idx 0: zandronum -iwad doom2 -connect localhost
connect client to use idx 1 and record a demo: zandronum -iwad doom2 -connect localhost -record democrash.cld
wait a few seconds then exit and play the demo: zandronum -iwad doom2 -playdemo democrash.cld
exit the demo
crash
No tags attached.
? democrash.cld (6,026) 2016-05-17 10:15
/tracker/file_download.php?file_id=1810&type=bug
zip CrashReport-democrash.zip (23,074) 2016-05-17 10:15
/tracker/file_download.php?file_id=1811&type=bug
Issue History
2016-05-17 10:15WaTaKiDNew Issue
2016-05-17 10:15WaTaKiDFile Added: democrash.cld
2016-05-17 10:15WaTaKiDFile Added: CrashReport-democrash.zip
2016-05-17 19:48Torr SamahoTarget Version => 3.0
2016-06-12 18:33Edward-sanNote Added: 0015075
2016-06-12 18:33Edward-sanAssigned To => Edward-san
2016-06-12 18:33Edward-sanStatusnew => assigned
2016-06-12 18:35Edward-sanNote Added: 0015076
2016-06-12 18:35Edward-sanStatusassigned => feedback
2016-06-13 00:28WaTaKiDNote Added: 0015077
2016-06-13 00:28WaTaKiDStatusfeedback => assigned
2016-06-18 21:56Edward-sanNote Added: 0015096
2016-06-18 21:57Edward-sanStatusassigned => needs review
2016-06-18 23:07Edward-sanNote Edited: 0015096bug_revision_view_page.php?bugnote_id=15096#r9161
2016-06-20 19:12Edward-sanNote Added: 0015102
2016-06-20 19:12Edward-sanStatusneeds review => needs testing
2016-07-02 17:16WaTaKiDNote Added: 0015186
2016-07-02 17:17WaTaKiDStatusneeds testing => assigned
2016-07-02 17:38WaTaKiDNote Edited: 0015186bug_revision_view_page.php?bugnote_id=15186#r9205
2016-07-02 18:48WaTaKiDNote Added: 0015191
2016-07-03 15:37Torr SamahoNote Added: 0015206
2016-07-03 16:47WaTaKiDNote Added: 0015209
2016-08-10 09:58Edward-sanNote Added: 0015424
2016-08-10 09:58Edward-sanStatusassigned => needs testing
2016-08-18 00:56Ru5tK1ngNote Added: 0015467
2016-08-18 09:07Edward-sanNote Added: 0015476
2016-08-18 14:58Ru5tK1ngNote Added: 0015489
2016-08-18 14:58Ru5tK1ngStatusneeds testing => resolved
2016-08-18 14:58Ru5tK1ngResolutionopen => fixed
2016-08-18 14:58Ru5tK1ngFixed in Version => 3.0
2018-09-30 22:00Blzut3Statusresolved => closed

Notes
(0015075)
Edward-san   
2016-06-12 18:33   
I finally found the problem:


    // In a client demo, don't lose the userinfo we gave to our console player.
    if ( CLIENTDEMO_IsPlaying( ))
        memcpy( &players[lConsolePlayer].userinfo, &players[consoleplayer].userinfo, sizeof( userinfo_t ));
(0015076)
Edward-san   
2016-06-12 18:35   
Please check that'https://bitbucket.org/zandronum/zandronum-sandbox/commits/28f0abbdc9e6a66515c25d9ae091e19ef5841bc8 [^]' fixes the issue and the demo doesn't break with it.
(0015077)
WaTaKiD   
2016-06-13 00:28   
this 3.0 build contains the above commit:'https://www.dropbox.com/s/vtbk4k2ddvnadjc/zandronum-3.0-r160612-1819-28f0abb-windows.zip?dl=0 [^]'

following the steps to reproduce, i was unable to crash

i also recorded a demo as idx 0 and exited before and after a client with idx 1 connected, just in case, and no crash

i even watched the demo (a quick playthrough of doom2 map01) and didnt notice anything wrong
(0015096)
Edward-san   
2016-06-18 21:56   
(edited on: 2016-06-18 23:07)
I had to transplant the changes to latest upstream, because of code conflicts:'https://bitbucket.org/Torr_Samaho/zandronum/pull-requests/109/non-0-idx-demo-crash-fix/diff [^]' .

[edit] if you want to test this, you need to create a new demo, because of the net protocol changes.

(0015102)
Edward-san   
2016-06-20 19:12   
Added in zandronum 3.0 upstream with this changeset:'https://bitbucket.org/Torr_Samaho/zandronum/commits/73b0376a61cb [^]' .
(0015186)
WaTaKiD   
2016-07-02 17:16   
(edited on: 2016-07-02 17:38)
using'https://www.dropbox.com/s/47tfog9di3lorlg/zandronum-3.0-r160702-1232-b244a48-windows.zip?dl=0 [^]' seems to be worse

when i try to play a demo created by the client with idx 1, it errors with "svcc_authenticate: unknown map: 1"

when i try to play a demo created by a client with idx 0, its fine up until my 2nd client connects, then i get the same error

note that these are newly recorded demos using this build

edit: oops, this is not caused by'https://bitbucket.org/Torr_Samaho/zandronum/commits/73b0376a61cb46715ef817f82f8223eb50c7b8fe [^]'

ill make a new note once i find the commit responsible

(0015191)
WaTaKiD   
2016-07-02 18:48   
ive found this commit to be the cause:'https://bitbucket.org/Torr_Samaho/zandronum/commits/b6a26f4055d644c2bb2c00343059cdab8b7be391 [^]'
(0015206)
Torr Samaho   
2016-07-03 15:37   
The new issue should be fixed now.
(0015209)
WaTaKiD   
2016-07-03 16:47   
using'https://www.dropbox.com/s/m41j6cif9hbee2k/zandronum-3.0-r160703-1614-e8e72e3-windows.zip?dl=0 [^]' i no longer get any crashes or errors when exiting demos, regardless if recorded by idx 0 or 1
(0015424)
Edward-san   
2016-08-10 09:58   
It has been added to 3.0 upstream for some time:'https://bitbucket.org/Torr_Samaho/zandronum/commits/73b0376a61cb [^]'
(0015467)
Ru5tK1ng   
2016-08-18 00:56   
Is this fix in 3.0-160814? If so, Zandro crashed when I tried playing the test demo.
(0015476)
Edward-san   
2016-08-18 09:07   
Try recording a new demo and play that one.
(0015489)
Ru5tK1ng   
2016-08-18 14:58   
I went ahead and made new demos as both idx 0 and 1. When playing back the demos, there was no crash.