Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#3638 closed defect (fixed)

Crash in ShaderProgram.cpp

Reported by: elexis Owned by:
Priority: Release Blocker Milestone: Alpha 22
Component: Core engine Keywords:
Cc: Patch:

Description (last modified by elexis)

The following crash occured on r17298 on a water map:

ShaderProgram.cpp(891): Assertion failed: "(m_StreamFlags & ~m_ValidStreams) == 0"
Assertion failed: "(m_StreamFlags & ~m_ValidStreams) == 0"
Location: ShaderProgram.cpp:891 (AssertPointersBound)

Call stack:

(0x9988bb) ./pyrogenesis() [0x9988bb]
(0x940b81) ./pyrogenesis() [0x940b81]
(0x9423ea) ./pyrogenesis() [0x9423ea]
(0x730307) ./pyrogenesis() [0x730307]
(0x7ee174) ./pyrogenesis() [0x7ee174]
(0x7d41a2) ./pyrogenesis() [0x7d41a2]
(0x7d7d8b) ./pyrogenesis() [0x7d7d8b]
(0x7d911c) ./pyrogenesis() [0x7d911c]
(0x6aa8e9) ./pyrogenesis() [0x6aa8e9]
(0x433cf2) ./pyrogenesis() [0x433cf2]
(0x421bc7) ./pyrogenesis() [0x421bc7]
(0x7fe9ae12ba40) /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7fe9ae12ba40]
(0x431b59) ./pyrogenesis() [0x431b59]

errno = 0 (No error reported here)
OS error = ?

Not sure if I can recover the crashdump...

Attachments (3)

crashlog.txt (29.6 KB ) - added by elexis 8 years ago.
Notice I'm using 1280x1024 and not 1024x768 as mentioned in the file.
commands.txt (671.6 KB ) - added by elexis 8 years ago.
Replay file, crash occured on the last turn obviously. I was a spectator and the only one to crash.
useless_crashlogs.7z (1.0 MB ) - added by elexis 8 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 by elexis, 8 years ago

The core file is lost -.-

By executing gdb pyrogenesis and then typing info symbol (address) I could translate the addresses into the following stack:

debug_DumpStack(wchar_t*, unsigned long, void*, wchar_t const*) + 27 in section .text
debug_BuildErrorMessage(wchar_t const*, wchar_t const*, int, char const*, void*, wchar_t const*, ErrorMessageMem*) + 305 in section .text
debug_OnAssertionFailure(wchar_t const*, long volatile*, wchar_t const*, int, char const*) + 538 in section .text
CShaderProgram::AssertPointersBound() + 55 in section .text
ShaderModelRenderer::Render(std::shared_ptr<RenderModifier> const&, CShaderDefines const&, int, int) + 8948 in section .text
CRenderer::RenderModels(CShaderDefines const&, int) + 482 in section .text
CRenderer::RenderSubmissions(CBoundingBoxAligned const&) + 1323 in section .text
CRenderer::RenderScene(Scene&) + 1820 in section .text
Render() + 1209 in section .text
RunGameOrAtlas(int, char const**) + 6130 in section .text
main + 55 in section .text
_start + 41 in section .text

by elexis, 8 years ago

Attachment: crashlog.txt added

Notice I'm using 1280x1024 and not 1024x768 as mentioned in the file.

by elexis, 8 years ago

Attachment: commands.txt added

Replay file, crash occured on the last turn obviously. I was a spectator and the only one to crash.

comment:2 by historic_bruno, 8 years ago

Do you remember what you were viewing when the crash occurred?

in reply to:  2 comment:3 by elexis, 8 years ago

Replying to historic_bruno:

Do you remember what you were viewing when the crash occurred?

I zoomed out so far that I could see the whole map. (Notice I edited my config to zoomout further). When doing a visual replay with a similar zoom the issue doesn't occur.

We probably have to hope that the issue occurs again :L

comment:4 by elexis, 8 years ago

It occured again. For any reason no core dump was generated.

ShaderProgram.cpp(891): Assertion failed: "(m_StreamFlags & ~m_ValidStreams) == 0"
Assertion failed: "(m_StreamFlags & ~m_ValidStreams) == 0"
Location: ShaderProgram.cpp:891 (AssertPointersBound)

Call stack:

(0x96da1b) ./pyrogenesis() [0x96da1b]
(0x915bf1) ./pyrogenesis() [0x915bf1]
(0x91745a) ./pyrogenesis() [0x91745a]
(0x705237) ./pyrogenesis() [0x705237]
(0x7c30a4) ./pyrogenesis() [0x7c30a4]
(0x7a90d2) ./pyrogenesis() [0x7a90d2]
(0x7accbb) ./pyrogenesis() [0x7accbb]
(0x7ae04c) ./pyrogenesis() [0x7ae04c]
(0x676239) ./pyrogenesis() [0x676239]
(0x433d32) ./pyrogenesis() [0x433d32]
(0x421b37) ./pyrogenesis() [0x421b37]
(0x7f493b613a40) /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f493b613a40]
(0x431569) ./pyrogenesis() [0x431569]

errno = 0 (Try again later)
OS error = ?

Aborted (core dumped)

Which translates to:

os_cpu_SetThreadAffinityMask(unsigned long) + 283 in section .text
debug_WriteCrashlog(wchar_t const*) + 609 in section .text
_ZNSs4_Rep10_M_disposeERKSaIcE.part.6 + 74 in section .text
CTextureManagerImpl::CreateTexture(CTextureProperties const&) + 5335 in section .text
ShaderModelRenderer::Render(std::shared_ptr<RenderModifier> const&, CShaderDefines const&, int, int) + 10964 in section .text
CRenderer::RenderReflections(CShaderDefines const&, CBoundingBoxAligned const&) + 386 in section .text
CRenderer::RenderSubmissions(CBoundingBoxAligned const&) + 3051 in section .text
CRenderer::~CRenderer() + 1308 in section .text
Render() + 665 in section .text
RunGameOrAtlas(int, char const**) + 8066 in section .text
_GLOBAL__sub_I__ZNK20CSrvHandshakeMessage19GetSerializedLengthEv + 71 in section .text
CProfiler2::RecordAttribute(char const*, ...) [clone .constprop.65] + 169 in section .text

by elexis, 8 years ago

Attachment: useless_crashlogs.7z added

comment:5 by elexis, 7 years ago

Still occurs in alpha 21 with the same callstack and line numbers.

comment:6 by Vladislav Belov, 7 years ago

Looks like some data was missed, until it's true for a crash in the #4383. Need to catch which model was missed.

Last edited 7 years ago by Vladislav Belov (previous) (diff)

comment:7 by elexis, 7 years ago

Milestone: BacklogAlpha 22
Priority: Must HaveRelease Blocker

Doesn't have to stay a release blocker inevitably, but killed too many games to go unconsidered.

comment:8 by elexis, 7 years ago

Reproduce: Try to make a good map for 0 A.D., open atlas editor and switch to the actor viewer, browse all the actor entities to find those that fit to the map you imagine until you stumble upon fortress_props.xml.

The file had three revisions of which the last one broke it: svn update -r 12183 ./binaries/data/mods/public/art/actors/props/structures/hellenes/fortress_props.xml

r13739 | enrique | 2013-08-22 16:56:11 +0200 (Do, 22 Aug 2013) | 1 line
r12183 | quantumstate | 2012-07-24 00:49:46 +0200 (Di, 24 Jul 2012) | 1 line
r8776 | michael | 2010-12-03 15:42:19 +0100 (Fr, 03 Dez 2010) | 1 line

The important part would be finding a way to translate the weird error into a more debuggable one, would be awesome if the crash message would show the filename of the broken model, so that if another revision or other model has that error too, we don't have to wait 19 months again to accidentally find what caused it.

comment:9 by elexis, 7 years ago

Priority: Release BlockerMust Have

Model fixed in r19280. Enrique explained:

The issue was that the hellenic factions fortresses were using the old version props in their death variation (while being destructed), those didn't have AO UV coordinates and I'm almost 100% certain that was causing the issue, although on my tests they didn't throw any errors, but the props appeared on a different place than they should and with weird texturing since they didn't have UV coordinates for the AO.

Since they were only used in the death variation it was difficult for people to notice, faulty actor only appearing for the duration of the building while being destructed.

Even better than only showing the filename of the file causing a crash, adding a test loading all files and testing for this specific crash would be ideal.

Last edited 7 years ago by elexis (previous) (diff)

comment:10 by elexis, 7 years ago

Description: modified (diff)
Priority: Must HaveRelease Blocker
Resolution: fixed
Status: newclosed

Calling this fixed by r19280. A unit test validating all models is a much broader task.

comment:11 by elexis, 7 years ago

Error message displaying at https://code.wildfiregames.com/D433

Note: See TracTickets for help on using tickets.