View Issue Details

IDProjectCategoryView StatusLast Update
0002077FSSCPgameplaypublic2010-01-04 11:23
ReporterFury Assigned ToWanderer  
PrioritynormalSeverityminorReproducibilityrandom
Status resolvedResolutionfixed 
Product Version3.6.11 
Summary0002077: Unnecessary CTD on debug builds
DescriptionThis is a random error encountered sometimes on debug builds:
Int3(): From d:\scp\builds\trunk\code\mission\missionlog.cpp at line 346

The error itself is not particularly useful and certainly should't cause a CTD, only warning or error to the log. It's a separate issue, but it'd be awesome if someone could actually make some sense out of this error. In its current form its nearly impossible to track down what exactly causes it.
TagsNo tags attached.

Activities

KeldorKatarn

2009-12-22 22:39

reporter   ~0011459

This is not the only point where a simple INt3() is fired without any further comment. Sadly those are quite common.

taylor

2009-12-22 23:47

administrator   ~0011460

I had added a cmdline option to my Xt code to not let Int3()'s error out, just log the error and move on. Then if I were debugging Int3()'s I would just change the cmdline option and let the breakpoint get triggered so that the source of the problem could be found.

Maybe something like that is what we need here, having it log but not exit unless a cmdline option is in use (so only devs would get it). Int3()'s are very helpful when running a debugger so it just makes things harder when they are removed or replaced with a simple warning.

Fury

2009-12-25 16:05

reporter   ~0011469

It would seem that use of sexp ship-vanish may in some circumstances trigger this Int3().

Wanderer

2009-12-25 17:36

developer   ~0011470

I think this is caused when a ship belonging to a wing is destroyed while the rest of the wing vanishes (disappears from the mission neither via departing nor by being destroyed). Then when the code in missionlog.cpp checks the data it finds 'missing ships'. I have been unable to reproduce the issue but that might be the cause.

Proposed fix, missionlog.cpp, line 333:
- if ( Wings[index].total_destroyed == Wings[index].total_arrived_count ){
+ if ( (Wings[index].total_destroyed + Wings[index].total_vanished) == Wings[index].total_arrived_count ){

I'm not that familiar with mission scripts that i would be certain that this will fix the issue, so some one else please check the proposed change.

Wanderer

2010-01-04 11:23

developer   ~0011486

Fixored, i hope. Please report if this causes issues.

Issue History

Date Modified Username Field Change
2009-12-22 17:58 Fury New Issue
2009-12-22 22:39 KeldorKatarn Note Added: 0011459
2009-12-22 23:47 taylor Note Added: 0011460
2009-12-25 16:05 Fury Note Added: 0011469
2009-12-25 17:36 Wanderer Note Added: 0011470
2010-01-04 11:21 Wanderer Status new => assigned
2010-01-04 11:21 Wanderer Assigned To => Wanderer
2010-01-04 11:23 Wanderer Note Added: 0011486
2010-01-04 11:23 Wanderer Status assigned => resolved
2010-01-04 11:23 Wanderer Resolution open => fixed