Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: General Battuta on October 03, 2010, 03:18:28 pm

Title: Fix the FRED2 Right-Click Crash`
Post by: General Battuta on October 03, 2010, 03:18:28 pm
This bug has wasted so many hours of my productivity.

Right click on an event in FRED. Randomly, infrequently, you'll cause the program to lock up.

Why? How? Is it fixable? Anyone have any clue on when it tends to happen? Frequency seems to have decreased, but it's still there.
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: Mobius on October 03, 2010, 03:39:46 pm
Yeah, it's quite disturbing. Fortunately, what I lost more than 3 events only a handful of times (I tend to save the mission file very frequently).

This "bug" was supposed to be fixed quite a while ago, I don't really understand why it's still there.  :sigh:
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: FUBAR-BDHR on October 03, 2010, 03:42:17 pm
Has anyone filed a mantis report with exact steps to reproduce?
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: General Battuta on October 03, 2010, 03:42:49 pm
Has anyone filed a mantis report with exact steps to reproduce?

That's the problem. Beyond 'it happens when I right click on an event', I can't figure out any way to repro.
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: karajorma on October 03, 2010, 05:45:02 pm
Which means the problem basically becomes "Wait for a coder to be using debug FRED and have it happen to them"

I will try to use FRED via the debugger more often now that I have time for coding/FREDding again.
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: Dilmah G on October 04, 2010, 01:36:47 am
Oh man, I used to hate this so much. Like Mobius, I got into the habit of saving the mission file very frequently.
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: FUBAR-BDHR on October 04, 2010, 01:57:13 am
I'm amazed I don't run into this one and I'm in debug FRED 99% of the time.  Now I do occasionally get the reordering events crash.  Possible your accidentally dragging it a bit when this happens?  If you cad drag when right clicked.  I'll have to try that.  


Nope can't move it when right clicked.  I wonder since I'm in debug and don't see it if this is something that only happens in release builds.
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: General Battuta on October 04, 2010, 07:12:00 am
Oh man, I used to hate this so much. Like Mobius, I got into the habit of saving the mission file very frequently.

Look I think everybody saves the mission file very frequently, but if you're setting up an event with concatenated when-arguments and it uses like 80 manually entered arguments, it's insane to have to save multiple times during the construction of one event.
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: Rodo on October 04, 2010, 08:30:13 am
There's a mantis entry for the bug that happens when you move events around, maybe using that mission file for tests would help.
I'm thinking moving the event and then trying to rename it might work.

I would test it myself but my pc is still dead, sorry.
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: Goober5000 on October 05, 2010, 01:23:01 am
Look I think everybody saves the mission file very frequently, but if you're setting up an event with concatenated when-arguments and it uses like 80 manually entered arguments, it's insane to have to save multiple times during the construction of one event.
Protip: if you're adding 80 manually-entered arguments, it's much easier to type them all in using your favorite text editor. ;)
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: General Battuta on October 05, 2010, 07:09:58 am
Look I think everybody saves the mission file very frequently, but if you're setting up an event with concatenated when-arguments and it uses like 80 manually entered arguments, it's insane to have to save multiple times during the construction of one event.
Protip: if you're adding 80 manually-entered arguments, it's much easier to type them all in using your favorite text editor. ;)

Not always. I use a text editor to copy or merge argument lists, but in terms of adding new arguments, sometimes it's just as quick to get it done in FRED.
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: karajorma on October 05, 2010, 07:14:18 am
If the arguments are ship or weapon names it's a hell of lot quicker (and much less error prone) to just select them off the list than to try to enter them in notepad. :D
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: General Battuta on October 05, 2010, 07:18:01 am
If the arguments are ship or weapon names it's a hell of lot quicker (and much less error prone) to just select them off the list than to try to enter them in notepad. :D

Well to be fair that's not gonna work in a when-argument.
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: karajorma on October 05, 2010, 07:23:15 am
Which is why you set up the list in another SEXP and then copy it. Even using notepad for that would be quicker than typing all the names in using notepad alone. :)
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: General Battuta on October 05, 2010, 07:32:15 am
Which is why you set up the list in another SEXP and then copy it. Even using notepad for that would be quicker than typing all the names in using notepad alone. :)

This is what I usually do, but there are times when your arguments are not already in the mission (i.e. a list of names for ships created by ship-create).
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: Mobius on October 05, 2010, 11:30:06 am
Excuse me, but... why are the arguments an issue? You can add them in FRED, save the mission, then right-click on the event's name and proceed. If FRED crashes at that point, you don't lose anything.
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: General Battuta on October 05, 2010, 11:39:34 am
Excuse me, but... why are the arguments an issue? You can add them in FRED, save the mission, then right-click on the event's name and proceed. If FRED crashes at that point, you don't lose anything.

Thanks for the tips, Lieutenant General Obvious. We can stop the thread if you'd like to get off.

The issue here is not about when the **** to save. The issue is that FRED should not be randomly crashing, period, no matter whether I'm losing an hour's work or if I just have to reboot and pick up where I left off. Unfortunately this bug is hard as heck to track down.

One thing I'll say is that the frequency seems to have decreased markedly since 3.6.10. It used to happen in long chains.
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: Iss Mneur on October 05, 2010, 03:13:16 pm
Are we talking about a crash to desktop or just FRED becomes unresponsive and never comes back? If it is a hang, how long have you waited to see if it comes back?
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: General Battuta on October 05, 2010, 03:34:02 pm
Are we talking about a crash to desktop or just FRED becomes unresponsive and never comes back? If it is a hang, how long have you waited to see if it comes back?

The latter. I've definitely waited three or four minutes, but...it's never looked promising. I can't be totally positive, but I'm pretty sure I've left it going for a couple hours as well with no luck.
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: karajorma on October 05, 2010, 08:31:26 pm
How frequent was it in 3.6.10? Could you reproduce it there?

If there is a reproducible error in 3.6.10 I might check out an old version of the code to see if the cause is still the same and other fixes merely made it harder to run into it.
Title: Re: Fix the FRED2 Right-Click Crash`
Post by: sigtau on October 05, 2010, 09:16:49 pm
This bug has been present since 3.6.9, if not retail... it's been there as long as I can remember (and I rolled around right at the release of 3.6.9 but didn't register until .10 RC1).