svn built with VC++ 2K5, access violation

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
Tc27
Trader
Trader
Posts: 22
Joined: Thu Jan 31, 2008 7:06 pm

svn built with VC++ 2K5, access violation

Post by Tc27 »

I'm posting this here because I'm not sure if the problem is the code or the build environment.

Besides the minor glitch fixed by r11784, all revisions after r11773 compile fine for me with VC++ 2k5, but bomb at runtime:

Code: Select all

Unhandled exception at 0x003487b4 in vegastrikeR.exe: 0xC0000005: Access violation reading location 0x0000034c.
The crash happens immediately if clicking Load Game from the main menu, or about halfway through the load screens if clicking Campaign (at some point before dynamic universe generation begins). The same exception also showed when compiling with VC++ 2k3.

The line that's doing it appears to be line 325 of gfx/hud.cpp, in TextPlane::Draw():

Code: Select all

float shadowlen=(float)glutStrokeWidth(fnt,myc)/scalex;
r11773 builds and plays fine (WinXP, VS compiled in Release mode).

I haven't had much experience with using the VC++ debugger, but if someone can tell me what info would help, I'll do a debug build and post. Thanks.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

Hmm so it's not just happening in Linux.

It's related to the new textbox code (to shade the background to make sure the text readable).

Thanks for narrowing down the line.

I'll commit a fix as soon as I can
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Post by shenle »

I can confirm the same crash in revision 11786

Code: Select all

Unhandled exception at 0x003487b4 in vegastrikeRVC7.exe: 0xC0000005: Access violation reading location 0x000006dc
and line

Code: Select all

		     float shadowlen=(float)glutStrokeWidth(fnt,myc)/scalex;
Above compiled in VC++ 2003 using the Intel compiler v.9.1
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

Okay I have fixed the bug in 11787.
Tc27
Trader
Trader
Posts: 22
Joined: Thu Jan 31, 2008 7:06 pm

Post by Tc27 »

11787 confirmed as fixing the crash here, though it looks like somewhere along the line the in-flight mission objectives indicator on the right of screen stopped marking completed objectives in a different colour.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

Hey yeah you're right!
All of the colors are now plain white or green or whatever is the base color.

I might have broken that when I changed my other code.
It probably is still reading the "#abcdef" color codes but is not using them, or else we would be seeing a bunch of pound symbols and color codes all over the place.
Tc27
Trader
Trader
Posts: 22
Joined: Thu Jan 31, 2008 7:06 pm

Post by Tc27 »

Thanks for the fix in 11791. :)
Post Reply