GrangerHub / tremulous

Other
81 stars 18 forks source link

Segfault with the v1.3.0-alpha.0.10 client on Spacetracks-r1 #43

Open dGr8LookinSparky opened 7 years ago

dGr8LookinSparky commented 7 years ago

here is the backtrace:

(gdb) bt
#0  0x00007f17a96b2f31 in GL_BindToTMU (image=0x115, tmu=3)
    at src/renderergl2/tr_backend.cpp:51
#1  0x00007f17a96fffe0 in R_BindAnimatedImageToTMU (bundle=0x7f17abea99d8, 
    tmu=3) at src/renderergl2/tr_shade.cpp:79
#2  0x00007f17a97038c3 in RB_IterateStagesGeneric (input=0x7f17a9ba50c0 <tess>)
    at src/renderergl2/tr_shade.cpp:1292
#3  0x00007f17a9704094 in RB_StageIteratorGeneric ()
    at src/renderergl2/tr_shade.cpp:1528
#4  0x00007f17a9704397 in RB_EndSurface () at src/renderergl2/tr_shade.cpp:1617
#5  0x00007f17a9719b22 in RB_SurfaceVaoMdvMesh (surface=0x7f17abeaa2a8)
    at src/renderergl2/tr_surface.cpp:1296
#6  0x00007f17a96b3cae in RB_RenderDrawSurfList (drawSurfs=0x7f17aa1af048, 
    numDrawSurfs=1559) at src/renderergl2/tr_backend.cpp:599
#7  0x00007f17a96b6000 in RB_DrawSurfs (data=0x7f17aa2e5518)
    at src/renderergl2/tr_backend.cpp:1148
#8  0x00007f17a96b7324 in RB_ExecuteRenderCommands (data=0x7f17aa2e5518)
    at src/renderergl2/tr_backend.cpp:1772
#9  0x00007f17a96c2676 in R_IssueRenderCommands (runPerformanceCounters=true)
    at src/renderergl2/tr_cmds.cpp:104
#10 0x00007f17a96c361c in RE_EndFrame (frontEndMsec=0x0, backEndMsec=0x0)
    at src/renderergl2/tr_cmds.cpp:631
#11 0x0000000000424fe1 in SCR_UpdateScreen () at src/client/cl_scrn.cpp:582
#12 0x000000000041da10 in CL_Frame (msec=12) at src/client/cl_main.cpp:3029
#13 0x00000000004502bb in Com_Frame () at src/qcommon/common.cpp:3064
#14 0x000000000049d56a in main (argc=1, argv=0x7ffec778aa68)
    at src/sys/sys_main.cpp:793

Here is the console log:

PIXELFORMAT: color(24-bits) Z(24-bit) stencil(8-bits)
MODE: -2, 1366 x 768 fullscreen hz:N/A
GAMMA: hardware w/ 1 overbright bits
texturemode: GL_LINEAR_MIPMAP_LINEAR
picmip: 0
texture bits: 32
compiled vertex arrays: disabled
texenv add: disabled
compressed textures: disabled
----- finished R_Init -----
Loading vm file vm/ui.qvm...
File "vm/ui.qvm" found in "/home/Sparky/.tremulous/test7341/vms-test7341-0959.pk3"
...which has vmMagic VM_MAGIC_VER2
Loading 854 jump table targets
VM file ui compiled to 760644 bytes of code
ui loaded in 4903168 bytes on the hunk
Loaded 48 of 48 emoticons (MAX_EMOTICONS is 64)
UI menu file 'ui/menus.txt' loaded in 259 msec
UI menu file 'ui/ingame.txt' loaded in 16 msec
UI menu file 'ui/tremulous.txt' loaded in 8 msec
UI help file 'ui/help.txt' loaded in 1 msec (18 infopanes)
File "ui/" found in "/home/Sparky/.tremulous/test7341/zzzzz-Swirl-Spitfire-0005.pk3"
Loading vm file vm/cgame.qvm...
File "vm/cgame.qvm" found in "/home/Sparky/.tremulous/test7341/vms-test7341-0959.pk3"
...which has vmMagic VM_MAGIC_VER2
Loading 1667 jump table targets
VM file cgame compiled to 1886783 bytes of code
cgame loaded in 35314688 bytes on the hunk
Loaded 48 of 48 emoticons (MAX_EMOTICONS is 64)
UI menu load time = 111 milli seconds
...loading 'scripts/spitfirezap.trail'
...loading 'scripts/lightning_gun.trail'
...loading 'scripts/ab_slime_zunge.trail'
...loading 'scripts/mdriver.trail'
...loading 'scripts/portalgun.trail'
...loading 'scripts/shotgun.trail'
...loading 'scripts/weapons.trail'
...loading 'scripts/buildables.trail'
...loading 'scripts/aw_spitfire.particle'
...loading 'scripts/lightning_gun.particle'
...loading 'scripts/ab_slime_zunge.particle'
...loading 'scripts/buildables.particle'
...loading 'scripts/grenade_launcher.particle'
...loading 'scripts/hgibs.particle'
...loading 'scripts/misc.particle'
...loading 'scripts/portals.particle'
...loading 'scripts/weapons.particle'
...loading 'scripts/uncreation.particle'
...loading 'scripts/tremor.particle'
...loading 'scripts/niveus.particle'
...loading 'scripts/nexus6.particle'
...loading 'scripts/karith.particle'
...loading 'scripts/arachnid2.particle'
...loading 'scripts/jetpack.particle'
...loading 'scripts/atcs.particle'
WARNING: ignoring excess images for 'animMap' (found 10, max is 8) in shader 'textures/spacetracks-r1/screen2'
stitched 8 LoD cracks
...loaded 26958 faces, 3928 meshes, 75 trisurfs, 0 flares
cubemap 43  (1376.000000, -1232.000000, 624.000000) is outside the lightgrid or inside a wall!
cubemap 44  (1612.000000, -1068.000000, 624.000000) is outside the lightgrid or inside a wall!
voice list is empty
CL_InitCGame: 21.05 seconds
38 msec to draw all images
Com_TouchMemory: 3 msec
Vote failed (9% voted yes out of 11 active players)
Acid Tube built by cronnnnn
cronnnnn joined the aliens
tty]Segmentation fault (core dumped)
wtfbbqhax commented 7 years ago

Looks like a pointer wasn't initialized

#0  0x00007f17a96b2f31 in GL_BindToTMU (image=0x115, tmu=3)

image points to an invalid address.

I'll trace this through and see if I can figure out why this happened

dGr8LookinSparky commented 7 years ago

This happened on the map utcsud_13 as well. Some of the memory addresses in the resulting backtrace were identical to the ones in the first back trace.

#0  0x00007f3c21498f31 in GL_BindToTMU (image=0x115, tmu=3)
    at src/renderergl2/tr_backend.cpp:51
#1  0x00007f3c214e5fe0 in R_BindAnimatedImageToTMU (bundle=0x7f3c22f691b8, 
    tmu=3) at src/renderergl2/tr_shade.cpp:79
#2  0x00007f3c214e98c3 in RB_IterateStagesGeneric (input=0x7f3c2198b0c0 <tess>)
    at src/renderergl2/tr_shade.cpp:1292
#3  0x00007f3c214ea094 in RB_StageIteratorGeneric ()
    at src/renderergl2/tr_shade.cpp:1528
#4  0x00007f3c214ea397 in RB_EndSurface () at src/renderergl2/tr_shade.cpp:1617
#5  0x00007f3c214ffb22 in RB_SurfaceVaoMdvMesh (surface=0x7f3c22f69a88)
    at src/renderergl2/tr_surface.cpp:1296
#6  0x00007f3c21499cae in RB_RenderDrawSurfList (drawSurfs=0x7f3c21f99878, 
    numDrawSurfs=373) at src/renderergl2/tr_backend.cpp:599
#7  0x00007f3c2149c000 in RB_DrawSurfs (data=0x7f3c220cc670)
    at src/renderergl2/tr_backend.cpp:1148
#8  0x00007f3c2149d324 in RB_ExecuteRenderCommands (data=0x7f3c220cc670)
    at src/renderergl2/tr_backend.cpp:1772
#9  0x00007f3c214a8676 in R_IssueRenderCommands (runPerformanceCounters=true)
    at src/renderergl2/tr_cmds.cpp:104
#10 0x00007f3c214a961c in RE_EndFrame (frontEndMsec=0x0, backEndMsec=0x0)
    at src/renderergl2/tr_cmds.cpp:631
#11 0x0000000000424fe1 in SCR_UpdateScreen () at src/client/cl_scrn.cpp:582
#12 0x000000000041da10 in CL_Frame (msec=15) at src/client/cl_main.cpp:3029
#13 0x00000000004502bb in Com_Frame () at src/qcommon/common.cpp:3064
#14 0x000000000049d56a in main (argc=1, argv=0x7fff487261d8)
    at src/sys/sys_main.cpp:793
wtfbbqhax commented 7 years ago

Can you try r_deluxeMapping 0 and see if that goes away?

dGr8LookinSparky commented 7 years ago

setting r_deluxeMapping to 0 does look like it prevents the crash. Some other things I discovered:

Here is the backtrace from the scribble crash on commit hash 9ab70920bac34c1e1e1c2d6564577f2f88fbb015:

(gdb) bt
#0  0x00007fb7a5167dca in GL_BindToTMU (image=0x11f, tmu=3)
    at src/renderergl2/tr_backend.c:100
#1  0x00007fb7a51b7487 in R_BindAnimatedImageToTMU (bundle=0x7fb7a6812790, tmu=3)
    at src/renderergl2/tr_shade.c:114
#2  0x00007fb7a51bae63 in RB_IterateStagesGeneric (input=0x7fb7a57339e0 <tess>)
    at src/renderergl2/tr_shade.c:1332

#3  0x00007fb7a51bb72d in RB_StageIteratorGeneric ()
    at src/renderergl2/tr_shade.c:1580
#4  0x00007fb7a51bba09 in RB_EndSurface () at src/renderergl2/tr_shade.c:1664
#5  0x00007fb7a51d0a39 in RB_SurfaceVaoMdvMesh (surface=0x7fb7a6813248)
    at src/renderergl2/tr_surface.c:1668
#6  0x00007fb7a5168d96 in RB_RenderDrawSurfList (drawSurfs=0x7fb7a59011e8,
    numDrawSurfs=238) at src/renderergl2/tr_backend.c:733
#7  0x00007fb7a516aee6 in RB_DrawSurfs (data=0x7fb7a5a396b0)
    at src/renderergl2/tr_backend.c:1277
#8  0x00007fb7a516bf29 in RB_ExecuteRenderCommands (data=0x7fb7a5a396b0)
    at src/renderergl2/tr_backend.c:1762

#9  0x00007fb7a5178a14 in R_IssueRenderCommands (runPerformanceCounters=qtrue)
    at src/renderergl2/tr_cmds.c:104
#10 0x00007fb7a5179925 in RE_EndFrame (frontEndMsec=0x0, backEndMsec=0x0)
    at src/renderergl2/tr_cmds.c:620
#11 0x000000000043b755 in SCR_UpdateScreen () at src/client/cl_scrn.c:562
#12 0x00000000004358f4 in CL_Frame (msec=8) at src/client/cl_main.c:3128
#13 0x000000000045a2b2 in Com_Frame () at src/qcommon/common.c:2981
#14 0x0000000000536e1e in main (argc=19, argv=0x7ffe4c9961c8)
    at src/sys/sys_main.c:605
wtfbbqhax commented 7 years ago

This crash also happened on a scribble client on a local scribble setup on the utcs map (it crashes on utcs on the test7341 server as well) when I fired the riffle. Indicating that it is not from a recent update to the renderer. This also suggests that the issue might be related to a/some new asset(s) recently added (This doesn't seem to be related to the new riffle model that is currently being tested)

Regardless of the assets/QVM combo, the render is clearly not properly initializing deluxemap shader correctly

wtfbbqhax commented 7 years ago

@dGr8LookinSparky can you link me to a download for spacetracks?

Nvm, http://dl.grangerhub.com/files/gh_servers/base/map-spacetracks-r1.pk3

wtfbbqhax commented 7 years ago

@dGr8LookinSparky Can you try reproducing this; @SmileTheory says it works

dGr8LookinSparky commented 7 years ago

Here are all of my renderer specific cvar settings when the crash occurs: r_mergeMultidraws = "1" r_mergeLeafSurfaces = "1" r_smp = "0" r_ext_draw_range_elements = "1" r_ext_multi_draw_arrays = "1" r_primitives = "0" r_ignoreFastPath = "1" r_availableModes = "640x360 720x405 864x486 960x ... x384 640x480 800x600 1024x768" r_sdlDriver = "x11" r_allowSoftwareGL = "0" r_maxpolyverts = "3000" r_maxpolys = "600" r_noportals = "0" r_lockpvs = "0" r_drawBuffer = "GL_BACK" r_offsetunits = "-2" r_offsetfactor = "-1" r_clear = "0" r_shownormals = "0" r_showsky = "0" r_showtris = "0" r_nobind = "0" r_debugSurface = "0" r_logFile = "0" r_verbose = "0" r_speeds = "0" r_showcluster = "0" r_novis = "0" r_nocull = "0" r_ignore = "1" r_drawentities = "1" r_norefresh = "0" r_lodscale = "5" r_measureOverdraw = "0" r_skipBackEnd = "0" r_flareCoeff = "150" r_flareFade = "7" r_flareSize = "40" r_portalOnly = "0" r_lightmap = "0" r_drawworld = "1" r_nocurves = "0" r_saveFontData = "0" r_printShaders = "0" r_debugSort = "0" r_debuglight = "0" r_showImages = "0" r_directedScale = "1" r_ambientScale = "0.6" r_znear = "4" r_singleShader = "0" r_intensity = "1" r_mapOverBrightBits = "2" r_fullbright = "0" r_forceSunAmbientScale = "0.5" r_forceSunLightScale = "1.0" r_forceSun = "0" r_cameraExposure = "0" r_forceAutoExposureMax = "2.0" r_forceAutoExposureMin = "-2.0" r_forceAutoExposure = "0" r_forceToneMapMax = "0.0" r_forceToneMapAvg = "-2.0" r_forceToneMapMin = "-8.0" r_forceToneMap = "0" r_externalGLSL = "0" r_colorMipLevels = "0" r_uiFullScreen = "0" r_centerWindow = "0" r_allowResize = "0" r_marksOnTriangleMeshes = "0" r_anaglyphMode = "0" r_railSegmentLength = "32" r_railCoreWidth = "6" r_railWidth = "16" r_facePlaneCull = "1" r_gamma = "1" r_swapInterval = "0" r_textureMode = "GL_LINEAR_MIPMAP_LINEAR" r_finish = "0" r_dlightBacks = "1" r_dynamiclight = "1" r_drawSun = "1" r_fastsky = "0" r_ignoreGLErrors = "1" r_stereoSeparation = "64" r_zproj = "64" r_flares = "0" r_lodbias = "0" r_lodCurveError = "250" r_greyscale = "0" r_stereoEnabled = "0" r_subdivisions = "4" r_vertexLight = "0" r_simpleMipMaps = "1" r_pixelAspect = "1" r_height = "768" r_width = "1366" r_noborder = "0" r_fullscreen = "0" r_ignorehwgamma = "0" r_overBrightBits = "1" r_ext_multisample = "0" r_depthbits = "24" r_stencilbits = "8" r_colorbits = "32" r_texturebits = "32" r_detailtextures = "1" r_roundImagesDown = "1" r_ext_max_anisotropy = "2" r_ext_texture_filter_anisotropic = "0" r_picmip = "0" r_ext_texture_env_add = "1" r_ext_compiled_vertex_array = "1" r_ext_multitexture = "1" r_ext_compressed_textures = "0" r_allowExtensions = "1" r_inGameVideo = "1" r_alphabits = "1" r_aviMotionJpegQuality = "90" r_screenshotJpegQuality = "90" r_ignoreDstAlpha = "1" r_shadowCascadeZBias = "0" r_shadowCascadeZFar = "1024" r_shadowCascadeZNear = "8" r_shadowMapSize = "1024" r_shadowBlur = "1" r_shadowFilter = "1" r_sunShadows = "1" r_sunlightMode = "2" r_drawSunRays = "1" r_genNormalMaps = "1" r_imageUpsampleType = "1" r_imageUpsampleMaxSize = "1024" r_imageUpsample = "0" r_mergeLightmaps = "1" r_pshadowDist = "128" r_dlightMode = "1" r_glossType = "1" r_baseGloss = "0.3" r_baseSpecular = "0.04" r_baseParallax = "0.05" r_baseNormalY = "1.0" r_baseNormalX = "1.0" r_pbr = "0" r_cubemapSize = "128" r_cubeMapping = "1" r_parallaxMapping = "0" r_deluxeMapping = "1" r_specularMapping = "1" r_normalMapping = "1" r_ssao = "0" r_depthPrepass = "1" r_autoExposure = "1" r_toneMap = "1" r_postProcess = "1" r_floatLightmap = "0" r_hdr = "1" r_mode = "-2" r_ext_direct_state_access = "1" r_arb_vertex_array_object = "1" r_arb_seamless_cube_map = "0" r_ext_framebuffer_multisample = "0" r_ext_texture_float = "1" r_ext_framebuffer_object = "1"