View Issue Details

IDProjectCategoryView StatusLast Update
0002958FSSCPgameplaypublic2013-11-26 19:36
ReporterMacfie Assigned ToGoober5000  
PriorityhighSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
PlatformWindowsOSwindows 7 
Product Version3.7.1 
Target Version3.7.2Fixed in Version3.7.1 
Summary0002958: Alt-T causes crash
Description I was playing the updated Derelict Campaign and was in mission d4-m8. I selected alt-T to turnoff targeting and the game froze and crashed to desk top. I was using Nightly (Windows): 16 Nov 2013 - Revision 10092. I restarted and tried it again and it did it again. I went to the BP build based off Nightly (Windows): 14 Nov 2013 - Revision 10060, did the same thing and it worked fine. Ran FSOpen with no mods and got the same behavior. Does not happen in the debug build.
Steps To ReproduceRun mission hit Alt-T.
Additional InformationIt doesn't even have to be targeted on a ship, I did it in the final cutscene of Derelict and it crashed. I tried the Nightly (Windows): 18 Nov 2013 - Revision 10111 build and it had the same problem.
TagsNo tags attached.

Activities

Goober5000

2013-11-20 01:58

administrator   ~0015429

Last edited: 2013-11-20 01:59

I started up a release build with no mods, created a new pilot, started the first non-training mission of the main FS2 campaign, targeted something, hit Alt-T, and there was no crash.

Try the same thing with your build and see if you get the same result.

If the same sequence of events doesn't crash in either build, then we have a mission-specific or mod-specific bug. If it crashes in your build but not mine, then it's either a compiler error or it's something that's already been fixed in SVN.

For the latter case, you can test the next nightly build against the builds I'm using, which are based on the latest SVN:
http://staff.hard-light.net/goober5000/temp/Mantis2958.zip

Macfie

2013-11-20 04:19

reporter   ~0015430

Last edited: 2013-11-20 04:26

I tried the Nightly (Windows): 14 Nov 2013 - Revision 10060 and did not get a crash.
I started up Nightly (Windows): 16 Nov 2013 - Revision 10092 with no mods, created a new pilot, started the first non-training mission of the main FS2 campaign, targeted something, hit Alt-T, and it crashed.
I started up Nightly (Windows): 19 Nov 2013 - Revision 10125 with no mods, created a new pilot, started the first non-training mission of the main FS2 campaign, targeted something, hit Alt-T, and it crashed.
When I used the build you were using based on the latest SVN I did not get a crash. Are You using an SSE2 build? Except for the BP build I've been using the SSE2 version of the release build.

niffiwan

2013-11-20 06:26

developer   ~0015431

I wonder if the version of visual studio used to compile FSO is also a factor. IIRC Goober uses VS2005, but the nightlies have moved to 2012/2013 recently.

Macfie

2013-11-20 12:05

reporter   ~0015435

How recently? What was the first version of the nightlies to use the 2012/2013 version of visual studio?

Goober5000

2013-11-21 00:54

administrator   ~0015436

That's what I meant by compiler error.

This reminds me of the long running Mantis 0000001 (which actually dates back to when we used BugZilla, and had to migrate over to Mantis). Whenever you hit 'Y' to target something, the game would crash, and nobody knew why. And it only crashed in release, not debug.

It turned out to be a bug in a particular optimization that VC6 used, so we turned that off. It's possible you've stumbled on a new bug in VC2012/2013. You'd have to ask chief when the nightlies switched over.

The next step will be to have chief1983 compile incremental nightly builds for every revision between 10060 and 10092.

chief1983

2013-11-21 01:38

administrator   ~0015437

I installed 2012 and 2013 but nightlies are still 2008. So there's nothing built right now between 10060 and 10092?

Goober5000

2013-11-21 02:30

administrator   ~0015438

There were a lot of minor revisions in one 24-hour period.

Macfie

2013-11-21 03:58

reporter   ~0015440

I started up Nightly (Windows): 20 Nov 2013 - Revision 10129 with no mods, created a new pilot, started the first non-training mission of the main FS2 campaign, targeted something, hit Alt-T, and it crashed. So the problem is there with the latest build.

chief1983

2013-11-21 04:03

administrator   ~0015441

10082 broke it. Just did some split testing.

chief1983

2013-11-21 04:19

administrator   ~0015444

Fixed in r10132, sorry, goofed on the Mantis # in the commit message.

Goober5000

2013-11-21 06:51

administrator   ~0015448

Not that simple. :p Reopening.

Chief and I have confirmed that it's the removal of the two fields in ship_weapon which trigger the bug:

    size_t primary_bank_pattern_index[MAX_SHIP_PRIMARY_BANKS];
    size_t secondary_bank_pattern_index[MAX_SHIP_SECONDARY_BANKS];

This indicates that it's something to do with the size of ship_weapon, not anything specific about the substitute pattern feature. Perhaps something is reading or writing where it's not supposed to.

Goober5000

2013-11-21 07:01

administrator   ~0015449

I've committed several off-by-one fixes that I found by hunting around for potential causes to this problem. Chief: Try updating to latest SVN, removing the extra fields in ship_weapon, and testing again.

chief1983

2013-11-21 16:43

administrator   ~0015450

Fix committed to trunk@10144.

Related Changesets

fs2open: trunk r10132

2013-11-20 23:42

chief1983


Ported: N/A

Details Diff
Fix 0002959 by reverting r10082. I can probably talk zookeeper into converting the troublesome SCP_vectors into static variables so this isn't causing memset issues. Affected Issues
0002958
mod - /trunk/fs2_open/code/ship/ship.h Diff File
mod - /trunk/fs2_open/code/weapon/weapon.h Diff File
mod - /trunk/fs2_open/code/weapon/weapons.cpp Diff File

fs2open: trunk r10139

2013-11-21 02:23

Goober5000


Ported: N/A

Details Diff
fix Echelon9's fix >:(
also add a judicious Assert for Mantis 0002958
Affected Issues
0002958
mod - /trunk/fs2_open/code/hud/hudlock.cpp Diff File

fs2open: trunk r10141

2013-11-21 02:26

Goober5000


Ported: N/A

Details Diff
re-commit r10082, except for ship.h, because it's the size of the ship_weapon struct that's causing the mysterious crashes (Mantis 0002958) Affected Issues
0002958
mod - /trunk/fs2_open/code/weapon/weapon.h Diff File
mod - /trunk/fs2_open/code/weapon/weapons.cpp Diff File

fs2open: trunk r10144

2013-11-21 12:11

chief1983


Ported: N/A

Details Diff
Recommit the ship.h part of 10082 as the OBO fixes seem to have fixed 0002958. Affected Issues
0002958
mod - /trunk/fs2_open/code/ship/ship.h Diff File

Issue History

Date Modified Username Field Change
2013-11-20 00:59 Macfie New Issue
2013-11-20 01:55 Goober5000 Assigned To => Goober5000
2013-11-20 01:55 Goober5000 Status new => assigned
2013-11-20 01:58 Goober5000 Note Added: 0015429
2013-11-20 01:59 Goober5000 Note Edited: 0015429
2013-11-20 01:59 Goober5000 Note Edited: 0015429
2013-11-20 04:19 Macfie Note Added: 0015430
2013-11-20 04:26 Macfie Note Edited: 0015430
2013-11-20 06:26 niffiwan Note Added: 0015431
2013-11-20 12:05 Macfie Note Added: 0015435
2013-11-21 00:54 Goober5000 Note Added: 0015436
2013-11-21 01:38 chief1983 Note Added: 0015437
2013-11-21 02:30 Goober5000 Note Added: 0015438
2013-11-21 03:58 Macfie Note Added: 0015440
2013-11-21 04:03 chief1983 Note Added: 0015441
2013-11-21 04:19 chief1983 Note Added: 0015444
2013-11-21 04:19 chief1983 Status assigned => resolved
2013-11-21 04:19 chief1983 Resolution open => fixed
2013-11-21 04:19 chief1983 Fixed in Version => 3.7.1
2013-11-21 04:19 chief1983 Target Version => 3.7.2
2013-11-21 06:51 Goober5000 Note Added: 0015448
2013-11-21 06:51 Goober5000 Status resolved => confirmed
2013-11-21 06:56 Goober5000 Changeset attached => fs2open trunk r10139
2013-11-21 06:58 Goober5000 Changeset attached => fs2open trunk r10141
2013-11-21 07:01 Goober5000 Note Added: 0015449
2013-11-21 16:43 chief1983 Changeset attached => fs2open trunk r10144
2013-11-21 16:43 chief1983 Note Added: 0015450
2013-11-21 16:43 chief1983 Status confirmed => resolved
2013-11-26 19:36 Goober5000 Changeset attached => fs2open trunk r10132