Opened 10 years ago

Closed 9 years ago

Last modified 2 years ago

#2368 closed defect (fixed)

Crash in TerrainOverlay

Reported by: sanderd17 Owned by: sanderd17
Priority: Should Have Milestone: Alpha 16
Component: Core engine Keywords:
Cc: Patch:

Description

When some terrain overlay gets activated, It crashes with the following stack trace

AME STARTED, ALL INIT COMPLETE
pyrogenesis: brw_eu_emit.c:211: validate_reg: Assertion `execsize >= width' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb55ecb40 (LWP 18017)]
0xb7fdd424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fdd424 in __kernel_vsyscall ()
#1  0xb7316496 in raise () from /usr/lib/libc.so.6
#2  0xb7317c23 in abort () from /usr/lib/libc.so.6
#3  0xb730f737 in __assert_fail_base () from /usr/lib/libc.so.6
#4  0xb730f7e7 in __assert_fail () from /usr/lib/libc.so.6
#5  0xa3d8f225 in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
#6  0xa3d8f8a8 in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
#7  0xa3d907bd in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
#8  0xa3d8379e in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
#9  0xa3d7ce8a in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
#10 0xa3de61ad in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
#11 0xa3d8c26f in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
#12 0xa3bd6e34 in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
#13 0xa3bbeacc in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
#14 0xa3bd3fff in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
#15 0xa3b11b9c in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
#16 0xa3b12200 in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
#17 0x082d5420 in TerrainOverlay::RenderBeforeWater (this=0x95e313d0) at ../../../source/renderer/TerrainOverlay.cpp:173
#18 0x082d5efd in ITerrainOverlay::RenderOverlaysBeforeWater () at ../../../source/renderer/TerrainOverlay.cpp:94
#19 0x082b91bc in CRenderer::RenderSubmissions (this=this@entry=0xa4020538) at ../../../source/renderer/Renderer.cpp:1532
#20 0x082b9a9c in CRenderer::RenderScene (this=0xa4020538, scene=...) at ../../../source/renderer/Renderer.cpp:1785
#21 0x08245eba in CGameView::Render (this=0x98730680) at ../../../source/graphics/GameView.cpp:498
#22 0x081ec593 in Render () at ../../../source/ps/GameSetup/GameSetup.cpp:216
#23 0x083368da in AtlasViewGame::Render (this=0x958f0948) at ../../../source/tools/atlas/GameInterface/View.cpp:257
#24 0x0833420b in RunEngine (data=0xbffff6ac) at ../../../source/tools/atlas/GameInterface/GameLoop.cpp:229
#25 0xb7745f10 in start_thread () from /usr/lib/libpthread.so.0
#26 0xb73d3dce in clone () from /usr/lib/libc.so.6

After some testing, it gets fixed by commenting out two lines, as in the patch. I don't know what those lines are supposed to do, it works perfectly without.

Attachments (1)

gl_offset_line.diff (855 bytes ) - added by sanderd17 10 years ago.

Download all attachments as: .zip

Change History (6)

by sanderd17, 10 years ago

Attachment: gl_offset_line.diff added

comment:1 by sanderd17, 10 years ago

Owner: set to sanderd17
Resolution: fixed
Status: newclosed

In 14563:

Disabling the OFFSET_LINE doesn't change any functionality as far as seen, while it fixes #2368.

comment:2 by historic_bruno, 10 years ago

Resolution: fixed
Status: closedreopened

Reopening this since the explanation is a bit lacking and it would be good to confirm why that code existed in the first place and understand things that might have broken as a result. (Also it seems 99% certain that it's a driver bug, and commenting out arbitrary GL code for that reason would surely be bad practice...)

Last edited 10 years ago by historic_bruno (previous) (diff)

comment:3 by sanderd17, 10 years ago

It's basically just used to draw the grid on top of the fill colour: http://www.felixgers.de/teaching/jogl/polygonOffset.html

All pages I've seen about that code invite you to "experiment" a bit with the parameters.

Also, because it's only used in Atlas, and for the developer overlay. I'd like to not invest too much time in it. Disabling that GL code can't cause more errors, it can only cause some graphical glitches on the grid drawing, which isn't too bad for stuff you don't see in regular games.

comment:4 by historic_bruno, 9 years ago

Milestone: BacklogAlpha 16
Resolution: fixed
Status: reopenedclosed

At any rate the terrain overlays are broken in GLSL mode (#2073), so they probably need a new implementation that fixes all these bugs. I'll re-close this ticket, because the other is more serious than this minor cosmetic issue.

comment:5 by Vladislav Belov, 2 years ago

In 26495:

Adds depth bias to PipelineState and its management to CDeviceCommandContext.

Refs #2368

Note: See TracTickets for help on using tickets.