Hard Light Productions Forums

Hosted Projects - FS2 Required => FreeSpace Conversion => Topic started by: Cobra on September 08, 2016, 03:36:13 am

Title: Crashes, but Silent Threat: Reborn-specific
Post by: Cobra on September 08, 2016, 03:36:13 am
Thought I'd post this here for starters, because I'm unsure if it's actually something in the ST:R files causing this. Only seems to happen when Shivans are getting shot at (the only observed event), and it essentially happens whenever the hell it wants. The crash has been observed while Basilisks, Seraphim and Nephilims are in field of play. There is no error message; just the generic Windows crash notification.

[EDIT] Crashed again, this time with no shooting happening, as bombers (probably Seraphim) arrived in the same mission, Field of Destruction. The crashes also occurred in the prior mission, but a restart let me finish with no issues.

[EDIT 2] Latest nightly debug just threw this up in Cloak and Dagger. Nothing in debug about non-ships with subsystems.

Code: [Select]
Assert: "objp->type == OBJ_SHIP"
File: ship.cpp
Line: 12738
Only ships can have subsystems!

ntdll.dll! NtWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>

[ This info is in the clipboard so you can paste it somewhere now ]


Use Debug to break into Debugger, Exit will close the application.

ntdll.dll! NtWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>

[attachment deleted by admin]
Title: Re: Crashes, but Silent Threat: Reborn-specific
Post by: Oddgrim on September 08, 2016, 08:46:13 am
This might be only speculation from my part, can it be due to a npc warhead model that as been assigned a subsystem?
Title: Re: Crashes, but Silent Threat: Reborn-specific
Post by: mjn.mixael on September 08, 2016, 09:02:06 am
Oh no.

This is giving me nightmare-ish memories of something I experienced in BtA. Dunno if it's related, but what was happening was that warheads were having their target object overwritten (find a new target) before the subsystem target data was flushed.. so suddenly it was targetting something like a Valkyrie with a turret12a. This was like four years ago and I forget what actually solved it. :/ I think I just prevented subsystem lock for those specific weapons or something. I dunno. I really do forget the whole story.
Title: Re: Crashes, but Silent Threat: Reborn-specific
Post by: Goober5000 on September 09, 2016, 12:29:43 am
Hrm.  I did a forum search for "subsystem" posted by "mjn.mixael" but didn't find any mention of the problem.  But this reminded me of something AdmiralRalwood had dealt with more recently, so I searched on that and rediscovered this thread (http://www.hard-light.net/forums/index.php?topic=92175.0).  It's not exactly the same because none of those missions use change-ship-class, but maybe the weapon subsystem reference is the proximate cause.

Cobra, would you be willing to run a debug session using Visual Studio Community Edition to get the actual stack trace?
Title: Re: Crashes, but Silent Threat: Reborn-specific
Post by: mjn.mixael on September 09, 2016, 01:17:51 am
My issue was debugged over IRC. Eventually I gave Valathil remote access to my system and he traced the issue himself. It was quite something to watch.
Title: Re: Crashes, but Silent Threat: Reborn-specific
Post by: Cobra on September 10, 2016, 06:19:05 am
Cobra, would you be willing to run a debug session using Visual Studio Community Edition to get the actual stack trace?

I have no idea what that is or how I would use it. And for the moment, I'm not getting random crashes with the current nightly, but when I get home from work later I'll replay the problem missions to see if they're still present.
Title: Re: Crashes, but Silent Threat: Reborn-specific
Post by: Goober5000 on September 10, 2016, 11:37:48 am
Visual Studio is what we use to build FSO.  Community Edition is the free edition which anyone can download and install.  Running FSO in debug mode, through Visual Studio, would allow one to pinpoint the sequence of events leading up to the crash.
Title: Re: Crashes, but Silent Threat: Reborn-specific
Post by: Cobra on September 12, 2016, 07:39:11 am
Visual Studio is what we use to build FSO.  Community Edition is the free edition which anyone can download and install.  Running FSO in debug mode, through Visual Studio, would allow one to pinpoint the sequence of events leading up to the crash.


Well, I know what Visual Studio itself is. :P Tell me what I must do and it shall be done.

I replayed Field of Destruction using the September 8 nightly and it crashed in the exact same spot twice: two or three seconds after the first wing of Basilisks arrive. Even in debug, though, there was no error. Just a generic Windows crash report. I think it's limited to Ghosts and Field of Destruction because I haven't experienced crashes like these anywhere else.

Code: [Select]
Problem signature:
  Problem Event Name: APPCRASH
  Application Name: fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe
  Application Version: 3.7.5.41356
  Application Timestamp: 57d11e89
  Fault Module Name: fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe
  Fault Module Version: 3.7.5.41356
  Fault Module Timestamp: 57d11e89
  Exception Code: c0000005
  Exception Offset: 0002ec64
  OS Version: 6.1.7601.2.1.0.768.3
  Locale ID: 1033
  Additional Information 1: 39f9
  Additional Information 2: 39f9043ad29d11cadb12d2a010757a78
  Additional Information 3: 8f6a
  Additional Information 4: 8f6ac869042dee097a7ceb809df19fca

[attachment deleted by admin]
Title: Re: Crashes, but Silent Threat: Reborn-specific
Post by: Cobra on September 13, 2016, 05:35:03 pm
Okay, so three tries, three crashes in Return to Ross 128. Each subsequent crash came sooner than the first, with the third crash occurring about three seconds into the mission. Visual Studio is currently being installed.

[EDIT] I should note that my installations of FSPort, ST:R and FSPort MVPs are entirely from the installer, if that means anything.
Title: Re: Crashes, but Silent Threat: Reborn-specific
Post by: Cobra on September 13, 2016, 06:15:47 pm
I'm just going to dump every error that I get from this mission for posterity's sake. Starting the mission in debug gets this:

Code: [Select]
Warning: For asteroid 'Shivan Debris 1', detail level
mismatch (POF needs 1)
File: asteroid.cpp
Line: 477

ntdll.dll! NtWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! AmdPowerXpressRequestHighPerformance + 4984592 bytes
<no module>! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
<no module>! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! AmdPowerXpressRequestHighPerformance + 5543348 bytes
<no module>! <no symbol>
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe! AmdPowerXpressRequestHighPerformance + 5543349 bytes
<no module>! <no symbol>
<no module>! <no symbol>

Attaching VS to the process gets this:

Code: [Select]
Exception thrown at 0x0042CC4A in fs2_open_3_7_5_20160908_932c05c_SSE2.exe: 0xC0000005: Access violation reading location 0x00000220.


Unhandled exception at 0x0042CC4A in fs2_open_3_7_5_20160908_932c05c_SSE2.exe: 0xC0000005: Access violation reading location 0x00000220.

It's an indefinite stream of these until I click "Break".

The call stack shows this:

Code: [Select]
> fs2_open_3_7_5_20160908_932c05c_SSE2.exe!0042cc4a() Unknown
  [Frames below may be incorrect and/or missing, no symbols loaded for fs2_open_3_7_5_20160908_932c05c_SSE2.exe]
  fs2_open_3_7_5_20160908_932c05c_SSE2.exe!0042c6ec() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2.exe!006c3987() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2.exe!006bb0e1() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2.exe!006b9785() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2.exe!006d6355() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2.exe!0055b93d() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2.exe!004f8613() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2.exe!004fa961() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2.exe!004dd28a() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2.exe!004dc6ce() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2.exe!004dc01d() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2.exe!0058e117() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2.exe!004d9390() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2.exe!004d797c() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2.exe!004186a5() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2.exe!004187e7() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2.exe!00491b7a() Unknown
  [External Code]

Actually running the debug file from VS from a solution gets a similar exception but at a different address:

Code: [Select]
fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!0042ec64() Unknown
  [Frames below may be incorrect and/or missing, no symbols loaded for fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe]
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!0042dabc() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!0064047f() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!006359e1() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!00633a6b() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!00653a19() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!006130ab() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!0059f73e() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!005a1ff5() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!005806cd() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!0057f9d1() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!0057f23c() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!00672097() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!0057c19a() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!0057942c() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!004186a5() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!004187e7() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!004e0e6e() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!004e0d80() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!004e0c2d() Unknown
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!004e0e78() Unknown
  [External Code]
  fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!004e0e70() Unknown
> fs2_open_3_7_5_20160908_932c05c_SSE2-FASTDBG.exe!004e0e70() Unknown

I feel like this wasn't the right place to look, though.

And again, I should point out that in-mission, in the last three attempts, now crashes at roughly the same point: within 3-10 seconds of mission start, with the newest crash just prior to this edit happening at precisely 10 seconds.
Title: Re: Crashes, but Silent Threat: Reborn-specific
Post by: Goober5000 on September 14, 2016, 12:49:57 am
This is useful, but debugging it in real-time would be best.  Install Visual Studio 2015 Community Edition, then install git and grab the source code.  Then we can try debugging it over IRC.
Title: Re: Crashes, but Silent Threat: Reborn-specific
Post by: Cobra on September 14, 2016, 01:31:40 am
This is useful, but debugging it in real-time would be best.  Install Visual Studio 2015 Community Edition, then install git and grab the source code.  Then we can try debugging it over IRC.

Ah. I knew I should've gotten something else. I suppose it's for the symbols?

Also, the crashes stopped after changing nighties up until Chasing Shadows. The common theme between the first few were that Shivans were present, but now it's happening when there's no trace of them.

I'll be available all day tomorrow, so hopefully we can sort this strangeness out.
Title: Re: Crashes, but Silent Threat: Reborn-specific
Post by: Goober5000 on September 14, 2016, 10:53:04 pm
I missed the fact that you had actually installed Visual Studio already.  Yes, it's for the debug symbols.  Additionally, if you compile your own debug build, Visual Studio can step through the code line by line from the spot that caused the error.

This will involve building FSO, of course.  You'll need to install CMake and follow the procedure to create a Visual Studio solution.  It's less out-of-the-box than it used to be.
Title: Re: Crashes, but Silent Threat: Reborn-specific
Post by: Cobra on September 14, 2016, 11:13:37 pm
I missed the fact that you had actually installed Visual Studio already.  Yes, it's for the debug symbols.  Additionally, if you compile your own debug build, Visual Studio can step through the code line by line from the spot that caused the error.

This will involve building FSO, of course.  You'll need to install CMake and follow the procedure to create a Visual Studio solution.  It's less out-of-the-box than it used to be.

Went through all that with The_E, m|m, DahBlount and chief1983. m|m reproduced the crash and it turns out it had something to do with AI code and asteroids. Should be fixed in the next nightly.
Title: Re: Crashes, but Silent Threat: Reborn-specific
Post by: Goober5000 on September 16, 2016, 10:25:34 pm
Ah, glad to hear that. :)