Meadville Space Center

Project Apollo - NASSP => Support & Bugs => Topic started by: Thymo on September 16, 2016, 05:38:55 PM



Title: Apollo 9 LVDC crash
Post by: Thymo on September 16, 2016, 05:38:55 PM
Hi all,

It appears something on my installation broke down. I wanted to try the Apollo 9 LVDC scn today but it crashes on the loading screen.
Now, I know this should work as I tested it with no issues some time ago and indy91 has also been playing around with it.

Where should I start debugging this? I checked the logs but most of them didn't log anything useful.


Title: Re: Apollo 9 LVDC crash
Post by: dseagrav on September 16, 2016, 07:57:24 PM
Do you have VS loaded on your machine?


Title: Re: Apollo 9 LVDC crash
Post by: Thymo on September 17, 2016, 12:33:21 AM
As in Visual Studio? Yes, I do build The modules myself from Git.


Title: Re: Apollo 9 LVDC crash
Post by: Thymo on September 17, 2016, 12:38:10 AM
It appears that if I remove the USE_LVDC PLEASE flag from the scn file it successfully loads.


Title: Re: Apollo 9 LVDC crash
Post by: indy91 on September 17, 2016, 01:45:49 AM
Well, removing the flag simply deactivates the LVDC, which is of course no good. Can you post the scenario here? How far into the mission is it?


Title: Re: Apollo 9 LVDC crash
Post by: dseagrav on September 17, 2016, 05:17:03 AM
I don't remember how to tell Windows to give it to you but what we need here is the stack backtrace when it crashes.


Title: Re: Apollo 9 LVDC crash
Post by: Thymo on September 17, 2016, 05:26:35 AM
Well, removing the flag simply deactivates the LVDC, which is of course no good. Can you post the scenario here? How far into the mission is it?

I'm using the A9 scn from Git under Broken Scenarios/Virtual AGC



I don't remember how to tell Windows to give it to you but what we need here is the stack backtrace when it crashes.


I'll try to get one when I get back home tomorrow.


Title: Re: Apollo 9 LVDC crash
Post by: rcflyinghokie on September 17, 2016, 07:37:53 AM
Hi all,

It appears something on my installation broke down. I wanted to try the Apollo 9 LVDC scn today but it crashes on the loading screen.
Now, I know this should work as I tested it with no issues some time ago and indy91 has also been playing around with it.

Where should I start debugging this? I checked the logs but most of them didn't log anything useful.

I have been flying many A9 missions after 8, but I just tried myself on A9 and I too am getting a CTD when I load the scn.  Not sure what broke because I was flying it after indy added the sep attitude maneuver and it worked fine then.


Title: Re: Apollo 9 LVDC crash
Post by: indy91 on September 17, 2016, 07:40:42 AM
But which scenario is crashing and when? The Apollo 9 LVDC++ Launch Scenario? Works fine for me...


Title: Re: Apollo 9 LVDC crash
Post by: rcflyinghokie on September 17, 2016, 07:45:50 AM
But which scenario is crashing and when? The Apollo 9 LVDC++ Launch Scenario? Works fine for me...

This one, and if it helps, the orbiter screen is on "reentry.dds" when it CTD

EDIT:  Well apparently the server wont let me upload the file, it is the "Apollo 9 Virtual AGC LVDC++ - Launch" scn


Title: Re: Apollo 9 LVDC crash
Post by: indy91 on September 17, 2016, 07:50:46 AM
Well, if it's the launch scenario, then I have that scenario, too, of course. So you don't need to upload it. I'm using that scenario and it is not crashing for me. No idea how I can debug it then...


Title: Re: Apollo 9 LVDC crash
Post by: rcflyinghokie on September 17, 2016, 07:56:42 AM
Well, if it's the launch scenario, then I have that scenario, too, of course. So you don't need to upload it. I'm using that scenario and it is not crashing for me. No idea how I can debug it then...

I figured you would have it, just would make easier to send what I have in case there is an issue I guess.  And do you have any suggestions how we could debug it and get you the data?  Because this was working fine for me a week or so ago.


Title: Re: Apollo 9 LVDC crash
Post by: indy91 on September 17, 2016, 08:00:14 AM
And do you have any suggestions how we could debug it and get you the data?  Because this was working fine for me a week or so ago.

Yes, for those using Visual Studio. Open the ProjectApollo2015.sln and let Visual Studio open. Then start the Apollo 9 scenario, wait for the crash and then after a few seconds Windows is collecting crash information or something like that. There should be a debug option then where you select the ProjectApollo2015.sln. This should send you to the part of the NASSP code (if it is a NASSP problem) where the error had occured. You don't even need to build NASSP in debug mode for this.


Title: Re: Apollo 9 LVDC crash
Post by: rcflyinghokie on September 17, 2016, 08:03:41 AM
Yes, for those using Visual Studio. Open the ProjectApollo2015.sln and let Visual Studio open. Then start the Apollo 9 scenario, wait for the crash and then after a few seconds Windows is collecting crash information or something like that. There should be a debug option then where you select the ProjectApollo2015.sln. This should send you to the part of the NASSP code (if it is a NASSP problem) where the error had occured. You don't even need to build NASSP in debug mode for this.

Ok its up and this window is up

Unhandled exception thrown: read access violation.

this was 0xCDCDCDCD.

If there is a handler for this exception, the program may be safely continued.


Title: Re: Apollo 9 LVDC crash
Post by: indy91 on September 17, 2016, 08:07:21 AM
No idea. Thymo, are you using Visual Studio, too? Maybe you both could try and REbuild your NASSP solution and see if that changes anything? I have looked at my uncommited changes, there is nothing related to the LVDC or even anything in the Saturn class that I have changed.


Title: Re: Apollo 9 LVDC crash
Post by: rcflyinghokie on September 17, 2016, 08:09:02 AM
No idea. Thymo, are you using Visual Studio, too? Maybe you both could try and REbuild your NASSP solution and see if that changes anything? I have looked at my uncommited changes, there is nothing related to the LVDC or even anything in the Saturn class that I have changed.

Just did a rebuild prior to test.

The LVDC.cpp is the one open in VS right now, the exception was on this line:    if(Initialized){      As part of the code below.

void LVDC::LoadState(FILEHANDLE scn){
   char *line;   
   int tmp=0; // for bool loader
   if(Initialized){
      fprintf(lvlog,"LoadState() called\r\n");
      fflush(lvlog);


Title: Re: Apollo 9 LVDC crash
Post by: indy91 on September 17, 2016, 08:14:45 AM
Could be something with LVDC parameters loading from the launch scenario then. So possibly related to the problem that the first CMPAD EMEM gets eaten by the LVDC scenario loading. Or mabye even worse, it's a line ending problem. I'm getting my Aspirin ready. Any ideas @dseagrav?

EDIT: You are building in release mode, not debug mode, right?


Title: Re: Apollo 9 LVDC crash
Post by: rcflyinghokie on September 17, 2016, 08:16:06 AM
Would saving the dump from the debug menu give you a good file to analyze?


Title: Re: Apollo 9 LVDC crash
Post by: rcflyinghokie on September 17, 2016, 08:27:19 AM
EDIT: You are building in release mode, not debug mode, right?

Doh, just saw it was in debug not release :(  Let me rebuild and try again.


Title: Re: Apollo 9 LVDC crash
Post by: indy91 on September 17, 2016, 08:30:11 AM
Doh, just saw it was in debug not release :(  Let me rebuild and try again.

That will be it then. I remember trying debug mode and the LVDC really didn't like it, also something with the "initialized" variable.


Title: Re: Apollo 9 LVDC crash
Post by: rcflyinghokie on September 17, 2016, 08:32:29 AM
That will be it then. I remember trying debug mode and the LVDC really didn't like it, also something with the "initialized" variable.

Awesome that did it :)  Thanks so much!  Guess you don't need your Aspirin for this!


Title: Re: Apollo 9 LVDC crash
Post by: Thymo on September 17, 2016, 08:50:54 AM
I am using Visual Studio, yes.
I think I too built in debug mode. I'll have to check tomorrow.


Title: Re: Apollo 9 LVDC crash
Post by: Thymo on September 18, 2016, 09:01:44 AM
Switching to release fixed it for me too. Thanks.  :)