Opened 6 years ago
Last modified 16 months ago
#5059 new defect
Atlas Segfault after generating random map
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Must Have | Milestone: | Backlog |
Component: | Atlas editor | Keywords: | |
Cc: | Patch: |
Description
The "Generate Map" button in Atlas generates a random map. But I get a segfault after pressing it a couple of times.
0x00000000007a1981 in CTerrain::GetTriangulationDir (this=0x7fffa8794000, i=<optimized out>, i@entry=128, j=<optimized out>, j@entry=197) at ../../../source/graphics/Terrain.cpp:486 486 int h00 = m_Heightmap[j*m_MapSize + i]; (gdb) info stack #0 0x00000000007a1981 in CTerrain::GetTriangulationDir (this=0x7fffa8794000, i=<optimized out>, i@entry=128, j=<optimized out>, j@entry=197) at ../../../source/graphics/Terrain.cpp:486 #1 0x00000000007f51cf in TerrainOverlay::RenderTile (this=this@entry=0x7fffa90677f0, color=..., draw_hidden=draw_hidden@entry=false, i=128, j=197) at ../../../source/renderer/TerrainOverlay.cpp:190 #2 0x00000000007f5387 in TerrainOverlay::RenderTile (this=this@entry=0x7fffa90677f0, color=..., draw_hidden=draw_hidden@entry=false) at ../../../source/renderer/TerrainOverlay.cpp:161 #3 0x00000000008e01d2 in BrushTerrainOverlay::ProcessTile (this=0x7fffa90677f0, i=<optimized out>, j=<optimized out>) at ../../../source/tools/atlas/GameInterface/Brushes.cpp:64 #4 0x00000000007f44dd in TerrainOverlay::RenderBeforeWater (this=0x7fffa90677f0) at ../../../source/renderer/TerrainOverlay.cpp:144 #5 0x00000000007f4d89 in ITerrainOverlay::RenderOverlaysBeforeWater () at ../../../source/renderer/TerrainOverlay.cpp:70 #6 0x00000000007dcec1 in CRenderer::RenderSubmissions (this=this@entry=0x7fffa8785cf0, waterScissor=...) at ../../../source/renderer/Renderer.cpp:1544 #7 0x00000000007dd834 in CRenderer::RenderScene (this=0x7fffa8785cf0, scene=...) at ../../../source/renderer/Renderer.cpp:1896 #8 0x0000000000748dd4 in CGameView::Render (this=<optimized out>) at ../../../source/graphics/GameView.cpp:489 #9 0x0000000000632f99 in Render () at ../../../source/ps/GameSetup/GameSetup.cpp:217 #10 0x0000000000628b6a in CGame::ReallyStartGame (this=0x7fff8104f4c0) at ../../../source/ps/Game.cpp:317 #11 0x00000000008bbbba in (anonymous namespace)::StartGame (attrs=..., attrs@entry=...) at ../../../source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp:79 #12 0x00000000008bcb55 in AtlasMessage::fGenerateMap (msg=0x7fffffffb620) at ../../../source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp:107 #13 0x0000000000895df7 in RunEngine (data=<optimized out>) at ../../../source/tools/atlas/GameInterface/GameLoop.cpp:173 #14 0x00007ffff3a656ba in start_thread (arg=0x7fffe4ba1700) at pthread_create.c:333 #15 0x00007ffff379b41d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
I don't know yet if the random map result matters.
Change History (3)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Currently I can only reproduce the crash when I don't want to have it.
I can't really tell yet (maybe I opened the ticket too soon, but on the other hand I get these segfaults quite often and a segfault should really not occur).
Itms patch is about the pathfinder while according to the stacktrace, it can't read from the terrain, so I doubt that it fixes it.
comment:3 by , 16 months ago
Based on the trace error we can see BrushTerrainOverlay::ProcessTile this is used with atlasUI, there was an error when we use terrain tabs and then go to generate random map, the brush tools never reset.
Could you try the @Itms patch: https://code.wildfiregames.com/D946?