Jump to content

You're browsing the 2004-2023 VATSIM Forums archive. All content is preserved in a read-only fashion.
For the latest forum posts, please visit https://forum.vatsim.net.

Need to find something? Use the Google search below.

Help me crash my sim


Ross Carlson
 Share

Recommended Posts

Ross Carlson
Posted
Posted

Hi all,

 

vPilot and/or SimConnect has a bug where if the sim crashes and the user restarts the sim but leaves vPilot running, vPilot keeps receiving the old pre-crash location from the sim, so from the perspective of other users on VATSIM, the user appears to be paused in that location even though their sim is actually still flying along.

 

In order to troubleshoot this bug, I need to be able to trigger a simulator crash at will. I'm looking for [Mod - Happy Thoughts]istance with this. If you know of a way to reliably cause the sim to crash (P3D in my case) please let me know.

 

Thanks.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

Ernesto Alvarez 818262
Posted
Posted

probably the easiest would be with scenery. have it try and load scenery that doesnt exist or not compatible, that at least worked with fs9, not sure if fsx or p3d would crash since you dont even need to restart the sim to make scenery changes, so it can probably deal with that.

 

the other thing to figure out is whether all crashes are treated the same by the system or do only some cause simconnect to stay running, while others dont. that might be the tricky one and youll probably have to find a way to trigger multiple types to check that

 

a hanged app or appcrash im sure would be ones that might replicate the issue. guess you can probably cause those by overloading the processes. run p3d and memtest? thats gotta overload it lol

Link to comment
Share on other sites

  • Board of Governors
Don Desfosse
Posted
Posted

Your title certainly got my attention!

 

Could you just terminate the application from the task manager?

 

Also, how about (backing up your config file first) cranking your sliders all the way to the right, hopping into a PMDG plane, flying into a scenery intensive area (especially easy if you happen to have Drunkwiecki NY airports package), and trying to OOM?

Don Desfosse
Vice President, Operations

Link to comment
Share on other sites

Ross Carlson
Posted
Posted
Could you just terminate the application from the task manager?

 

I tried that, it does register as a crash in vPilot, but it doesn't reproduce the bug. My guess is that when the process is terminated that way, it also clears out the SimConnect memory. I need a way to terminate the process in a less "clean" way.

 

Also, how about (backing up your config file first) cranking your sliders all the way to the right, hopping into a PMDG plane, flying into a scenery intensive area (especially easy if you happen to have Drunkwiecki NY airports package), and trying to OOM?

 

I'm hoping for something a little easier to reproduce many times over. I used to be able to crash the sim by trying to create an aircraft with a certain model, but for some reason that doesn't work anymore. The model loads fine now.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

Roger Hanson
Posted
Posted

Would putting "Crash Detection" on and taxying into a building/aircraft do it?

Regards, Rog Hanson

Link to comment
Share on other sites

Ross Carlson
Posted
Posted
Would putting "Crash Detection" on and taxying into a building/aircraft do it?

 

I should have been more clear ... I'm looking for a software crash ... like triggering a bug ... a "crash to desktop". (Not a virtual airplane crash.)

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

Joshua Black
Posted
Posted
Would putting "Crash Detection" on and taxying into a building/aircraft do it?

 

I should have been more clear ... I'm looking for a software crash ... like triggering a bug ... a "crash to desktop". (Not a virtual airplane crash.)

 

Am I the only one who chuckles when I read this?

Joshua Black

22

Link to comment
Share on other sites

Randy Tyndall 1087023
Posted
Posted

Ross,

 

Every once in a while I will have one of my ACARS programs (I have three) when flying for a VA online and if I inadvertantly switch aircraft after I start the ACARS program my Sim (FSX) will CTD. Not always, so I cannot guarantee anything.

 

What about installing three or four different afcads for the same airport, some obscure out of the way airport, and then trying to fly there from somewhere close? Ideally, one in Addon Scenery/scenery, one in Addon Scenery/KXXX/Scenery, and one in FSX/Scenery. In the AVSIM forums when people complain about CTDs for "no reason" when trying to land at a specific airport that's one of the first things the members suggest, duplicate AFCADS or sceneries.

 

Wish I had more, but that's all I got.

 

Randy

Randy Tyndall - KBOI

ZLA I-11/vACC Portugal P4

“A ship is always safe in the harbor. But that’s not why they build ships” --Michael Bevington ID 814931, Former VATSIM Board of Governors Vice President of Pilot Training

1087023

Link to comment
Share on other sites

Luke Kolin
Posted
Posted
vPilot and/or SimConnect has a bug where if the sim crashes and the user restarts the sim but leaves vPilot running, vPilot keeps receiving the old pre-crash location from the sim, so from the perspective of other users on VATSIM, the user appears to be paused in that location even though their sim is actually still flying along.

 

From what little I know of Windows-specific programming, I'd be surprised if the FSX/P3D process could terminate altogether without killing either the named pipe or the TCP socket connecting it to vPilot. I suspect that the sim is "mostly dead" but not "completely dead" and the connection is still alive.

 

FSUIPC has a facility where if it isn't receiving SimConnect events in a particular time period it disconnects and attempts to create a fresh SimConnect session with the sim. That may be worth trying - what intervals do you receive events on - every frame, 6hz or other?

 

Cheers!

... I spawn hundreds of children a day. They are daemons because they are easier to kill. The first four remain stubbornly alive despite my (and their) best efforts.

... Normal in my household makes you a member of a visible minority.

Link to comment
Share on other sites

Ross Carlson
Posted
Posted
FSUIPC has a facility where if it isn't receiving SimConnect events in a particular time period it disconnects and attempts to create a fresh SimConnect session with the sim. That may be worth trying - what intervals do you receive events on - every frame, 6hz or other?

 

vPilot subscribes to the frame event, so it gets that one every frame. Other data (such as aircraft position, radio stack data, etc.) is requested by vPilot on a timer, rather than using a SimConnect interval.

 

vPilot detects a sim crash by catching a COMException when it requests the aircraft's position. When that happens, I dispose of the SimConnect object and instantiate a new one. It then attempts to connect every few seconds until the connection succeeds after the user starts the sim again. So I'm already creating a new SimConnect connection ... no idea why it keeps getting stale aircraft position data from SimConnect. Makes me think maybe there's a SimConnect bug that keeps some values in shared memory after an improper shutdown of the sim. Totally speculating, though.

 

One of the parameters to the SimConnect constructor is the client name ... I wonder if the SimConnect library is somehow hanging onto some shared memory keyed on the client name, and keeps using that memory after the sim crashes, and never updates it again once the sim is restarted.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

Matthew Bartels
Posted
Posted

With P3D unplug and replug in a USB controller. Works every time on my rig... grumble, grumble...

You either die a hero, or live long enough to see yourself become the villain.

Forever and always "Just the events guy"

Link to comment
Share on other sites

 Share