[hard to reproduce] some q3map2 crashes on long builds with bounce enabled
I just got that on an insane long build (hours) with crazy options (See the whole build log):
--- Radiosity (bounce 2 of 5) --- 0...1...2...3...4...5...6...7...8...9... (1) 32596 diffuse surfaces 94754 total lights 14144 culled lights --- BounceGrid --- 0...1...2...3...4...5...6...7...8...9... (374) --- IlluminateRawLightmap --- 0************ ERROR ************ Light of undefined type! Error: command failed: 'q3map2' '-light' '-fs_pakpath' '/home/illwieckz/dev/mapping/InterstellarOasis/src/map-arachnid2_src.dpkdir' '-fs_pakpath' '/home/illwieckz/dev/mapping/InterstellarOasis/src' '-fs_pakpath' '/home/illwieckz/dev/mapping/UnvanquishedAssets/src' '-srffile' '/mnt/tmpfs/tmp_0tzrifv_q3map2.srf' '-bspfile' '/mnt/tmpfs/tmp99kdwblu_arachnid2.bsp_transient.dir/maps/arachnid2.bsp' '-lightmapdir' '/mnt/tmpfs/tmp99kdwblu_arachnid2.bsp_transient.dir/maps/arachnid2' '-game' 'unvanquished' '-lightsubdiv' '100' '-fastallocate' '-shade' '-dirty' '-patchshadows' '-samples' '3' '-samplesize' '8' '-bouncegrid' '-bounce' '5' '-deluxe' '-lightmapsize' '1024' '-external' '/home/illwieckz/dev/mapping/InterstellarOasis/src/map-arachnid2_src.dpkdir/maps/arachnid2.map'
I got a similar crash yesterday, but instead of having q3map2 printing an error message and returning, it just crashed silently. See the whole build log. I got this in
[80340.766566] traps: q3map2 general protection ip:7371c65ec sp:7f28ce9127d0 error:0 in q3map2[73716a000+f0000]
In both cases it happened on second bounce pass (the already produced files are fine).
It looks like to be a memory error.
I got it again with this build command:
'q3map2' '-light' '-fs_pakpath' '/home/illwieckz/dev/mapping/InterstellarOasis/src/map-arachnid2_src.dpkdir' '-fs_pakpath' '/home/illwieckz/dev/mapping/InterstellarOasis/src' '-fs_pakpath' '/home/illwieckz/dev/mapping/UnvanquishedAssets/src' '-srffile' '/mnt/tmpfs/tmpbo41m_fo_q3map2.srf' '-bspfile' '/mnt/tmpfs/tmpfmk8tzea_arachnid2.bsp_transient.dir/maps/arachnid2.bsp' '-lightmapdir' '/mnt/tmpfs/tmpfmk8tzea_arachnid2.bsp_transient.dir/maps/arachnid2' '-game' 'unvanquished' '-fastallocate' '-fast' '-fastbounce' '-shade' '-dirty' '-patchshadows' '-samples' '3' '-samplesize' '4' '-bouncegrid' '-bounce' '1' '-deluxe' '-lightmapsize' '1024' '-lightanglehl' '1' '-external' '/home/illwieckz/dev/mapping/InterstellarOasis/src/map-arachnid2_src.dpkdir/maps/arachnid2.map'
It lasted 12 minutes then it crashed. At the same time, the Dæmon engine that was running in the bakground raised a popup saying “out of memory”. There is 32GB of memory on that system, so I guess there is something wrong (I already did more craziest build before, this one only used samplesize 4 and 1 bounce (I already build larger maps with samplesize 2 and 5 bounce with larger maps, so I know my memory is enough).
Well no, it just crashed again after 7 min, q3map2 was only eating 2GB of memory. There was still more than 26GB or memory available at this time… Also, the last time, the swap file was not touched at all, so it really does not looks like the whole memory was filled up. Well, it looks like the Dæmon crash at the almost same time was just unrelated.
Well well well, will do a memtest, it happens too many wrong things on my side.
[Edit: the memtest ran fine…]
U no, it can be anything, even stack overflow, caused by low lightsubdivide + bawnce (recursive calls there)
Or one of those brand new destabilizing commits (mimizip certainly looked like memery corrutioner)
And nonfast mode was not that much tested, -fast is industry standard kinda-)
Suggestions: try stable build; try address sanitizer