jurchik / project6014

Automatically exported from code.google.com/p/project6014
0 stars 0 forks source link

Game crashes infrequently at Spathi moon orbit in hires4x. #56

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hanging around spathi moon orbit sometimes crashes the game. Sometimes it does 
it after visiting the planet and watching the planet revolve for some time.

My system tracks the error to line 341 of function RenderPlanetSphere, but I 
couldn't yet figure out what's wrong. Benjamin, do you have any ideas?

Original issue reported on code.google.com by Jaakko.M...@gmail.com on 11 Dec 2011 at 5:00

GoogleCodeExporter commented 8 years ago
This happens at least in optimized release build, hires4x.

Original comment by Jaakko.M...@gmail.com on 11 Dec 2011 at 5:01

GoogleCodeExporter commented 8 years ago
Hmm. Changed some variable types and now it doesn't seem to crash... but maybe 
I'm just lucky. Will test further.

Original comment by Jaakko.M...@gmail.com on 11 Dec 2011 at 6:45

GoogleCodeExporter commented 8 years ago
Yup, was just lucky. Damn!

Original comment by Jaakko.M...@gmail.com on 11 Dec 2011 at 7:04

GoogleCodeExporter commented 8 years ago
Function RenderPlanetSphere goes from line 710 to 851 of plangen.c
Is there a typo in the report ?

Original comment by benjamin...@free.fr on 11 Dec 2011 at 10:49

GoogleCodeExporter commented 8 years ago
Wow. So it seems. But no typo - line 341 is what my error reporting tool gave 
me. Oh, the mysteries :-s

Original comment by Jaakko.M...@gmail.com on 11 Dec 2011 at 11:08

GoogleCodeExporter commented 8 years ago
Hmm. Maybe now that I slowed down the planet rotation rate it won't crash? 
(Again I just might be lucky).

Original comment by Jaakko.M...@gmail.com on 12 Dec 2011 at 8:39

GoogleCodeExporter commented 8 years ago
Still crashes on Win XP as of r1984.
I need to learn how to use a debugger.

Original comment by benjamin...@free.fr on 12 Dec 2011 at 11:22

GoogleCodeExporter commented 8 years ago
Gosh darn it. I found out what that strange line 341 was: 
I was running a release build. It seems the crash report is able to figure out 
which function crashed but not anymore its line number. When crashing a debug 
build, the line number is displayed correctly. I'll try making a debug build & 
crashing it and see what's the outcome.

Original comment by Jaakko.M...@gmail.com on 12 Dec 2011 at 12:24

GoogleCodeExporter commented 8 years ago
Too bad. Either the debug build is bulletproof or the OSX version is 
bulletproof. It won't crash!

Original comment by Jaakko.M...@gmail.com on 12 Dec 2011 at 12:37

GoogleCodeExporter commented 8 years ago
I am pleased to report we still get a crash. :)  I am going to investigate a 
bit but it's possible I'll need to hand over to the experts.

Revision r2269 debug build for Windows, running in MSVC 10.  In orbit around 
the Spathi moon (i.e. looking at the scan menu).

Access violation in plangen.c:696.

Original comment by ejrh00@gmail.com on 21 Jan 2012 at 9:41

GoogleCodeExporter commented 8 years ago
Possibly fixed in r2271; I'll leave it open a few days so you can check whether 
it still exists / I've broken anything.  I kind of think I should have fixed it 
more obviously by not allow aa pixels that are out of range.  But this check 
seemed to already be the apropriate one, just not quite strict enough.

If it does come up again, some details about the crashes.

When it crashes in get_map_pixel, the params are:
x = 165
y = 330 (maximum valid row is 329)
width = 1074
spherespanx = 330

Called by RenderPlanetSphere, when params are:
pt.x = 181
pt.y = 325

Original comment by ejrh00@gmail.com on 21 Jan 2012 at 11:27