View Issue Details

IDProjectCategoryView StatusLast Update
0003006FSSCPFREDpublic2020-04-14 17:30
ReporterGeneralBattuta Assigned To 
PrioritylowSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
PlatformPCOSWindowsOS VersionWindows 7 64 bit
Product Version3.7.1 
Summary0003006: FRED crashes when left open and idle for long periods of time.
DescriptionBy Kara's request -

FRED locks up and stops responding when left idle for long periods of time. This may be tied to OS sleep/hibernation behavior, but it's not clear. While a bunch of people have confirmed encountering this bug and some think it's tied to leaving the events window open, others don't get encounter it at all.

I don't think this issue is a major priority. It's only a serious concern when the FREDder has to leave the computer without saving and can't return for a long time (a pretty rare use case unless, well, you are being dragged away, which is not a bad problem to have but which can really set your missions back!).
Steps To ReproduceWe're working to narrow this down. I'm gonna try leaving FRED on overnight WITHOUT the events window open to see if that alters the outcome.
TagsNo tags attached.

Activities

Echelon9

2014-02-09 13:33

developer   ~0015621

Could be a memory leak of some form.

Goober5000

2014-03-31 15:57

administrator   ~0015695

Has there been any progress on this?

Goober5000

2016-12-30 04:55

administrator  

vector subscript.png (84,171 bytes)   
vector subscript.png (84,171 bytes)   

Goober5000

2016-12-30 04:59

administrator   ~0016841

Attached a screenshot from Brian See, reported in this thread:
http://www.hard-light.net/forums/index.php?topic=92943.0

This makes things more interesting. Just spitballing here - I wonder if the Event Editor is updating some sort of log, tally, or other vector-based structure, and leaving the window open for a long time causes the index to exceed INT_MAX.

Axem

2016-12-31 20:38

reporter  

Clipboard01.png (121,925 bytes)   
Clipboard01.png (121,925 bytes)   

Axem

2016-12-31 20:39

reporter   ~0016842

I managed to reproduce something sorta related. The same error message as Bryan See anyway. I added a bunch of new messages and events in the event editor, let it sit for like 3 hours and when I hit the okay button, I got that error message.

Axem

2016-12-31 20:39

reporter   ~0016843

(Should note I attached a picture of the debugger trying to trace it down, its something messages related)

Axem

2016-12-31 20:45

reporter   ~0016844

Okay, after trying again, this happens all the time with Debug FRED. No idling required. It'll happen all the time if you add a message and then click OK in the event editor.

It may not be the same bug, but it is a bug.

MageKing17

2017-01-01 05:42

developer   ~0016845

Well, I've opened a PR for at least the issue Axem reported (since I could actually reproduce it): https://github.com/scp-fs2open/fs2open.github.com/pull/1123

Goober5000

2017-01-01 22:49

administrator   ~0016846

I was going to look into this today but I see MageKing17 already beat me to it, with the correct identification and solution. :yes:

That doesn't fix the root cause of the idling bug, though, since OnOk only runs when you click Ok.

While looking into this I found another issue, for which I've opened a PR here:
https://github.com/scp-fs2open/fs2open.github.com/pull/1124

MageKing17

2017-01-01 23:09

developer   ~0016847

I wouldn't rule out PR 0001123 fixing the idling bug; given that it was writing past the end of the vector, we were in nasal demon territory. The undefined behavior could very well have meant that, if messages were added and ok was clicked at least once, FRED could've been left in a "ticking time bomb" state that made a future crash inevitable. We won't know for sure until/unless the idling crash happens again in the future.

Goober5000

2020-04-14 17:30

administrator   ~0016979

I ran FRED overnight with a complex mission on the screen and the Event Editor open, and it responded fine in the morning. I'm calling this fixed.

Issue History

Date Modified Username Field Change
2014-02-07 02:12 GeneralBattuta New Issue
2014-02-09 13:33 Echelon9 Note Added: 0015621
2014-03-31 15:57 Goober5000 Note Added: 0015695
2016-12-30 04:54 Goober5000 Status new => confirmed
2016-12-30 04:55 Goober5000 File Added: vector subscript.png
2016-12-30 04:59 Goober5000 Note Added: 0016841
2016-12-31 20:39 Axem File Added: Clipboard01.png
2016-12-31 20:39 Axem Note Added: 0016842
2016-12-31 20:39 Axem Note Added: 0016843
2016-12-31 20:45 Axem Note Added: 0016844
2017-01-01 05:42 MageKing17 Note Added: 0016845
2017-01-01 22:49 Goober5000 Note Added: 0016846
2017-01-01 23:09 MageKing17 Note Added: 0016847
2020-04-14 17:30 Goober5000 Status confirmed => resolved
2020-04-14 17:30 Goober5000 Resolution open => fixed
2020-04-14 17:30 Goober5000 Note Added: 0016979