Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: sausage on January 28, 2010, 05:20:49 am

Title: Should set-object-position crash in multiplayer?
Post by: sausage on January 28, 2010, 05:20:49 am
Only just realising that the following SEXP is fine in single player, but crashes in multiplayer:

Code: [Select]
when
    <
      distance
            Alpha 1
            GTF Hercules
      50
   
   set-object-position
      "GTF Hercules 1"
      99999
      99999
      99999
   
I created a misson, multiplayer, nothing but two ships and the above event. Using version 3.6.10. Is this the same everyone else?
Title: Re: Should set-object-position crash in multiplayer?
Post by: sausage on January 28, 2010, 05:25:26 am
I should add that in this discussion (http://www.hard-light.net/forums/index.php?topic=50806.0), Fubar was attempting this (without getting the crash), and it seemed to be about multiplayer game.
Title: Re: Should set-object-position crash in multiplayer?
Post by: The E on January 28, 2010, 07:50:55 am
If you want an objet moved away and invisible to the player, there are other sexps you should use. Moving it that far away invites trouble.
Title: Re: Should set-object-position crash in multiplayer?
Post by: karajorma on January 28, 2010, 12:05:35 pm
Nope, you should be able to move it that far away at least. But on a hunch try 32,000 and 50,000 instead.
Title: Re: Should set-object-position crash in multiplayer?
Post by: FUBAR-BDHR on January 28, 2010, 03:12:39 pm
If this is 3.6.10 then he might be hitting the old crash due to ship being destroyed in a distance check bug.  Try it in 3.6.11 and see if it still crashed. 
Title: Re: Should set-object-position crash in multiplayer?
Post by: sausage on January 28, 2010, 03:37:30 pm
This is with the standard 3.6.10 release. However last night I tried it on the nightly 3.6.11 windows build and the problem still exists there.

Also tried it this morning on the laptop. Same problem.

As suggested, Karajorma, I tried the 32000 value and no difference. Also tried a simple co-ordinate of 0,0,0. Same crash.

In a way, its a relief that this is not the expected behaviour (a bug) and that the results are reproducable each time. Is there's a chance for a fix in an upcoming build?

I would image all multiplayer games using 3.6.10 or above must be crashing if that SEXP is used.
Title: Re: Should set-object-position crash in multiplayer?
Post by: FUBAR-BDHR on January 28, 2010, 03:57:25 pm
File a report in Mantis with a simple mission using retail data that reproduces the problem. 
Title: Re: Should set-object-position crash in multiplayer?
Post by: sausage on January 28, 2010, 04:44:28 pm
Bug reported + example file. Thank you all.
Title: Re: Should set-object-position crash in multiplayer?
Post by: FUBAR-BDHR on January 28, 2010, 06:08:44 pm
Confirmed that there is a bug there. 

For future reference you should run a debug build and clean up any warnings you can before submitting a mission.  There were a few non-retail ships and weapons in that mission and it was using non-dogfight weapons which is bad and crashes the game (now I have to report that bug)
Title: Re: Should set-object-position crash in multiplayer?
Post by: sausage on January 28, 2010, 06:17:11 pm
Yes, I just downloaded your corrected version of my example and realised I left in my own custom ships. My apologies, that was a bit scrappy of me. I totally forgot about that.

I'll use the debug build to test for messages next time. Thanks.
Title: Re: Should set-object-position crash in multiplayer?
Post by: The E on January 28, 2010, 06:28:31 pm
For reference, if regular builds are crashing, your first action should be to recreate the circumstances (and hopefully the crash) using a debug build.
Title: Re: Should set-object-position crash in multiplayer?
Post by: sausage on March 01, 2010, 03:03:23 am
Just wanted to report back on this thread that this issue is resolved in 3.6.12 RC1 http://www.hard-light.net/forums/index.php?topic=68190.0

Major thank yous to FUBAR-BDHR for reporting it up and fixing the example and karajorma for spending the time coding the fix.

I'm a happy bunny.

And the debug build is a delight. The debug messages are actually helpful. :)

Thanks again.
Title: Re: Should set-object-position crash in multiplayer?
Post by: karajorma on March 01, 2010, 03:59:13 am
I didn't spend much time fixing it. FUBAR actually found the cause and proposed the solution.