Opened 11 years ago

Closed 10 years ago

#2050 closed defect (worksforme)

Atlas crashes when modifying terrain elevation

Reported by: michael Owned by:
Priority: Must Have Milestone:
Component: Atlas editor Keywords: Atlas
Cc: Patch:

Description

Atlas will freeze, then crash if I use the modify terrain elevation tool to change the terrain height on a map. This prevents me from modifying and creating maps.

Attachments (2)

mainlog.html (32.0 KB ) - added by michael 11 years ago.
system_info.txt (13.3 KB ) - added by michael 11 years ago.

Download all attachments as: .zip

Change History (21)

by michael, 11 years ago

Attachment: mainlog.html added

by michael, 11 years ago

Attachment: system_info.txt added

comment:1 by michael, 11 years ago

Unfortunately, the Atlas crash does not create a crashlog.

comment:2 by historic_bruno, 11 years ago

Not reproducible here, on XP with integrated (non-shader) Intel graphics. If you start with a blank map in Atlas, it crashes as soon as you use the terrain elevation tools? Do the crashes go away if you remove the fancy graphics settings from your local.cfg? What is displayed when Atlas crashes, any error dialog?

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

comment:3 by michael, 11 years ago

No error dialog, sadly. Atlas stops working, the UI goes blank, I see the "Not Responding" text at the top, I have to 'X' out multiple times before the Windows crash dialog appears ("pyrogenesis.exe has stopped working...").

Luckily, this time the mainlog generated a slew of warnings at the bottom:

Info when linking program 'shaders/glsl/model_common.vs'+'shaders/glsl/solid_tex.fs': Vertex info ----------- 0(115) : warning C7050: "cosVec.w" might be used before being initialized

Info when linking program 'shaders/glsl/model_common.vs'+'shaders/glsl/model_common.fs': Vertex info ----------- 0(115) : warning C7050: "cosVec.w" might be used before being initialized

Oddly enough, the game did not find these warnings to be interesting enough to add to the interestinglog.

Removing everything from local.cfg does not fix the problem.

Last edited 11 years ago by michael (previous) (diff)

comment:4 by michael, 11 years ago

Running Windows debugger I get this:

http://pastebin.com/Lt1y0tSx

comment:6 by historic_bruno, 11 years ago

Was discussed on IRC 2013-08-06 from 19:44. May be heap corruption based on the call stacks, if someone else can test Atlas on Windows 8 that would be good, and running valgrind's memcheck on Atlas might uncover something.

comment:7 by michael, 11 years ago

Crash occurs when editing the terrain textures as well.

Debug output for this crash here:

http://pastebin.com/xvFtd9eY

comment:8 by historic_bruno, 11 years ago

Michael, can you check if you have the latest graphics drivers?

Also test if it helps to put novbo=true in your local.cfg.

comment:9 by historic_bruno, 11 years ago

Others are reporting a crash in Atlas related to terrain modification, see IRC logs from 2013-08-19 starting at 15:35 (independent of r13714 which is a fix for another crash). I still cannot reproduce an Atlas crash and valgrind is telling me nothing.

comment:10 by michael, 11 years ago

novbo=true Seems to help for now. I'll report back if I get another crash.

comment:11 by michael, 11 years ago

novbo=true Gives bad artifacts with sheep, Cretan Date Palms, Mauryan civ center, and other meshes. However, it does seem to help prevent Atlas crashes so far.

Last edited 11 years ago by michael (previous) (diff)

comment:12 by historic_bruno, 11 years ago

Yeah, it's only meant for testing purposes :) But now we know there's a workaround for your crash - and more importantly, it's related to vertex buffers.

As for the artifacts you're seeing with novbo, Philip has found the likely cause of that (incorrect range being passed to glDrawRangeElements in model rendering, for more details see IRC logs 2013-08-21 from ~19:02), so we'll fix that first. It might solve your original crash, if not, at least you'll have a workaround for using Atlas until it does get fixed.

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

comment:13 by philip, 11 years ago

In 13734:

Fix rendering artifacts with novbo=true gentangents=true

glDrawRangeElements needs to know the range of vertexs that are used
by the index array. With VBOs it doesn't really matter if the range
is wrong (all the vertexes are in GPU memory anyway), but with CPU
vertex arrays the driver has to memcpy the given range of data, so
incorrect bounds will result in garbage data being rendered.

With gentangents, the rendered mesh can have more vertexes than the
original CModelDef, but was rendered with the CModelDef's vertex count.

Use the correct vertex count instead.

Refs #2050.

comment:14 by historic_bruno, 11 years ago

Ok, the latest autobuild has Philip's fix. Can you try Atlas without novbo=true to see if it still crashes?

comment:15 by michael, 11 years ago

novbo=false gives a crash within minutes of elevating the terrain. Crash happens as I am modifying/elevating the terrain and moving the camera (the camera bit may be superfluous).

novbo=true still seems to prevent any crash.

comment:16 by historic_bruno, 11 years ago

Ok, we may need to do more in depth debugging of this after A14 release. It's probably not worth blocking the release for Atlas, and it's not an easy problem to reproduce :(

comment:17 by historic_bruno, 11 years ago

Milestone: Alpha 14Alpha 15
Priority: Release BlockerMust Have

This and #2081 are so far only reported by Michael.

comment:18 by wraitii, 10 years ago

Milestone: Alpha 15Alpha 16

I'd venture and say it's probably linked to drivers...

comment:19 by historic_bruno, 10 years ago

Milestone: Alpha 16
Resolution: worksforme
Status: newclosed

Reported by Michael in IRC that Atlas doesn't crash now, and is fairly stable. So I will close the ticket as "works for me". If the problem comes back, please reopen.

Note: See TracTickets for help on using tickets.