Engine cut v1.4.3

Report problems with JoinFS.
OMGEDSON
Posts: 28
Joined: Tue Jan 02, 2018 6:17 pm

Re: Engine cut v1.4.3

Postby OMGEDSON » Tue Jan 02, 2018 11:04 pm

It's my professional guess that this is due to v4(.1) and how its handling in/out data of said systems. Because we have never before really noticed this, yet last night in testing went back to your original builds and the issue was still very much there and very much prominent and easy to replicate.

I'm making the call to postpone the tour until next Monday, hopefully we have something fresh out, as always my friend, we'll help test so feel free to make contact.

-e

User avatar
spokes2112
Posts: 39
Joined: Wed Dec 21, 2016 3:05 am
Location: KGRB

Re: Engine cut v1.4.3

Postby spokes2112 » Sat Jan 06, 2018 11:48 pm

Peter,

First off, wishing you a Happy New Year! Thank You for all your hard work!
I believe we (the AVSIM Saturday crew) have found the bug.. (Not from JoinFS)
1) What I did is to make a lua file (thru FSUIPC) that monitored all 15 available mixture commands that could cause the mixture getting set to cut -

(global)
MIXTURE LEAN 65778
MIXTURE SET 65773 <---- THIS IS THE BUGGER HERE!!!
AXIS MIXTURE SET 66292
(engine 1)
MIXTURE1 LEAN 65987
MIXTURE1 SET 65919
AXIS MIXTURE1 SET 66422
(engine 2)
MIXTURE2 LEAN 65992
MIXTURE2 SET 65920
AXIS MIXTURE2 SET 66425
(engine 3)
MIXTURE3 LEAN 65997
MIXTURE3 SET 65921
AXIS MIXTURE3 SET 66428
(engine 4)
MIXTURE4 LEAN 66002
MIXTURE4 SET 65922
AXIS MIXTURE4 SET 66431

2) Also in that same lua if a mixture cut was commanded and the parking brake was off (meaning flying or moving, not in a "flight ended" shutdown situation) the lua automatically commanded a mixture rich to "try" to keep engine(s) running. This works partially (75% or so) - it could be timing and/or the FDE of the affected aircraft (by the instigator) that didn't let the newly commanded rich to have any effect.
It was visually confirmed that the lua works by setting full rich, maybe just not quick enough.

3) We ran tests on known aircraft that cause this silly behaviour -
Carenado PC-12
Carenado Dornier DO-228
Carenado Aero Commander
Carenado King Air 350 (reported as bad in a previous test session)
Carenado TBM 850 (Not tested but found bad code)
Carenado Beech C90 (Not tested but found bad code)
Alabeo Piper PA44 Seminole (Not tested but found bad code)

4) Every time a mixture cut/shutdown occurred it reported FSUIPC 65733 ( ## (>K:MIXTURE SET) in XML )

5) With that information I scoured the gauges that I could (.cab/.xml), and found nothing in there..
Also, the called .dlls/.gau(s) were checked, doubtful to find anything in those as they are compiled. Nothing found.

6) It was found that command is coming from the visual model!!
Therefore able to transmit over the MP network ?? For P3D v4+ only ??
It seems like some kind of initialization routine.
These were found using a hex editor in plain text mode with the *.mdl(s) opened.

PC-12 (found in exterior and interior models)
(L:var_check125,bool) 0 == if{ 0 (>K:MIXTURE_SET) -16383 (>K:ELEVATOR_SET) }

Aero Commander (found in exterior and interior models)
(L:var_check202,bool) 0 == if{ 0 (>K:MIXTURE_SET) 16383 (>K:ELEVATOR_SET) }

I don't have the 228.

TBM 850 (found in exterior and interior models)
(L:var_check69, bool) 0 == if{ 0 (>K:MIXTURE_SET) -16383 (>K:ELEVATOR_SET) }

Beech C90
(L:Var_check181,bool) 0 == if{ 0 (>K:MIXTURE_SET) -16383 (>K:ELEVATOR_SET) }

Piper PA44 Seminole
(L:var_check36,bool) 0 == if{ 0 (>K:MIXTURE_SET) 16383 (>K:ELEVATOR_SET) }

Baron - Does not shut down other aircraft as you can see but it could affect the the others' flight!!
(L:var_check7, bool) 0 == if{ 16383 (>K:AILERON_SET) }

7) As you can see it's in the Carenado .mdl routines. (didn't check all of them, probably more)
Why are they doing this? :x :shock:
Don't know if you can trap these commands in JoinFS prior to sending them into the sim, maybe this will help you though.
I plan on rewriting the lua so it acts quicker, for now as a stop gap.. No more diagnosing, just a reaction if a mixture cut is commanded.

Again,
I hope this may help and Thank You!

Roman

User avatar
spokes2112
Posts: 39
Joined: Wed Dec 21, 2016 3:05 am
Location: KGRB

Re: Engine cut v1.4.3 -- Lua Volunteers?

Postby spokes2112 » Sun Jan 07, 2018 1:10 am

Here's a revised lua available for testing - much quicker response without the diagnostic features.

1) Requires registered FSUIPC
2) With FS closed place the attached MP_Anti_Mix.lua file into the FS\Modules folder
3) Either assign keys to run/stop it or set it up to automatically run via FSUIPC
3a) to use keys to start or stop it, refer to the attached photos w/ FS running
3b) to auto start it refer to FSUIPC for Advanced Users.pdf topic "Automatic running of Macros and Lua plugins" (around pg 46) with FS still closed.

This one is slightly different than previously mentioned. Instead of the parking brake not activated to work it uses the battery switch instead. Battery must be on for the lua to trap and correct the lean condition.

Attachment Removed

Roman
Last edited by spokes2112 on Thu Jan 11, 2018 9:12 pm, edited 1 time in total.

User avatar
Peter
Site Admin
Posts: 1459
Joined: Fri Sep 23, 2016 8:51 am

Re: Engine cut v1.4.3

Postby Peter » Sun Jan 07, 2018 5:42 pm

Hi Roman,

And a big happy new year to you guys at AVSIM group as well. Doesn't seem five minutes since we were flying around Hawaii. :)

Thanks for the detailed analysis that you've kindly provided. That does indeed look like the culprit. It still leaves a couple of questions though, why do I not get the same problem in my installation of P3Dv4 and why doesn't the same problem occur with other multiplayer add-ons (or perhaps it does?)

I only just installed FSUIPC5 a few days ago so I'll take a look at your findings. I wonder if it only happens if you have FSUIPC installed? I'll see if I can get the problem to occur here now that I have FSUIPC installed.

Perhaps there is a way to intercept it as you suggested. But I also think I have enough information now to at least be able to implement a good workaround for it.

Thanks,
Peter

User avatar
spokes2112
Posts: 39
Joined: Wed Dec 21, 2016 3:05 am
Location: KGRB

Re: Engine cut v1.4.3

Postby spokes2112 » Mon Jan 08, 2018 12:03 am

Hi Peter,

A hypothesis came over me earlier today. Maybe it doesn't transmit the bad command over the network at all. Maybe it is the visual model loaded as another client commanding the bad stuff. Will need to give it a quick test in the next few days.
For example -

1) I only have FSX (for now) so I will not be affected. ( the control of the test perse, in a non offending aircraft )
2) 2 other players on P3Dv4. ( in non offending, but victims of, aircraft with engines running )
3) Only 1 of the other players replace (alias, thru JoinFS) my non offending aircraft with one that is offending. (PC-12 is nearly 100%)
4) If only that 1 player in step 3 has their engines cut (maybe after a disconnect / reconnect too) but not the other then it proves it's the client's visual model doing it and not any external command over the network.

What baffles me ( I looked for 5+ hours this morning at XMLs ) is that there is absolutely no command ANYWHERE that will set the offending L:var_check### to one and therefore cancel the command. Maybe it's inside a .dll/.gau somewhere loaded in the VC, that would suck.
I'm thinking it has something to do with navigraph validation where simconnect monitors the 2 commands, if they occur on load then the navigraph system is in a valid aircraft. (to prevent use on a non Carenado aircraft, it is a .dll loaded globally by dll.xml - "carenavigraph.dll" in the FS root) No - It's a .dll type gauge that check anti-piracy things then writes the var to cancel the command.
(L:var_check125,bool) 0 == if{ 0 (>K:MIXTURE_SET) -16383 (>K:ELEVATOR_SET) } (PC-12)
If it is the case being a .dll/.gau, maybe the system isn't fast enough to load and have that var set to one.

Another example is one of our members is really having a bad time with this and it can happen multiple times while flying. I'm thinking another offending player is coming in or out of the model display radius and therefore the visual model is reloaded (reinitialized) and the system isn't fast enough to initialize the offending model.

One more idea and this could work with a needed database to include each offending aircraft.
A lua (or other) that writes a 1 to everyone of the L:var_check### vars, CONSTANTLY.
This would have to be extensively tested so it doesn't interfere with normal "pilot in control" operations.

No - At 18Hz it just doesn't do it, constantly fighting with the anti-piracy gauge, which cannot be disabled.

Carenado could fix all this malarky by using code similar to this and recompiling all models (doubt that would happen) -
(L:var_check###,bool) 0 == (A:IS USER SIM, bool) and if{ 0 (>K:MIXTURE_SET) -16383 (>K:ELEVATOR_SET) }

It still leaves a couple of questions though, why do I not get the same problem in my installation of P3Dv4 and why doesn't the same problem occur with other multiplayer add-ons (or perhaps it does?)

This whole thing is baffling! I'll keep testing though.
Some aircraft (high end) will not be affected by any offences because they have extensive engine managment code overriding the offence.

I updated that lua to V2 (attached, if V1 is installed just paste & overwrite the lua, uses the same commands).

1) In some aircraft it did not correct the lean because the modeller used an alternate set of commands (real air dukes/sf260 for example) for the mixture controls. This covers all (hopefully) possible mixture commands for correction.
2) There was a problem with turboprop/jets. Once fuel is stopped so are the engine(s), instantly & permanent. So at the same time that a mixture lean was commanded it checks if there is combustion on only engine 1. If no combustion, it toggles ALL starters. It works pretty well, just a slight loss of power for a few seconds until N2 reaches the ignition state. (tested on turbine duke, MS 747, f-111, twin otter, pc-12)
3) Added a "memory" that monitors mixture position, only engine 1. Upon correction it sets all mixtures to the engine 1 past position except jets. Jets get set to full rich.

Attachment removed.
Hope to get a few gents together for some more testing (all of the above) in the next few days (Tuesday or after) - will keep you informed.

Thanks,
Roman
Last edited by spokes2112 on Thu Jan 11, 2018 9:13 pm, edited 3 times in total.

OMGEDSON
Posts: 28
Joined: Tue Jan 02, 2018 6:17 pm

Re: Engine cut v1.4.3

Postby OMGEDSON » Wed Jan 10, 2018 12:40 am

Hi Peter, any progress?

I think we will need to postpone this months tour another week.

User avatar
Peter
Site Admin
Posts: 1459
Joined: Fri Sep 23, 2016 8:51 am

Re: Engine cut v1.4.3

Postby Peter » Thu Jan 11, 2018 3:07 pm

A new test version, 1.4.4, is now available.

Based on the information that you provided, Roman, I've decided to just go for the workaround option for now. I think the other stuff I was going to try wouldn't have made any difference.

So, when you try 1.4.4 (make sure you have this version in the bottom left of the main JoinFS window), please report the following:

A) Seems to be completely fixed, no side effects.
B) Seems to be fixed, but my mixture/elevator temporarily changes for a split second when a network aircraft is injected into the simulator.
C) Old problem still occurs, but is definitely less frequent than before.
D) Not fixed, it's exactly the same as before.

Thanks,
Peter

TexxasAl
Posts: 26
Joined: Thu Dec 08, 2016 3:58 am

Re: Engine cut v1.4.3

Postby TexxasAl » Thu Jan 11, 2018 4:50 pm

Peter,

Is it possible for us to download 1.4.4 (test version)?

Thanks

picnic
Posts: 36
Joined: Tue Apr 04, 2017 8:19 am

Re: Engine cut v1.4.3

Postby picnic » Thu Jan 11, 2018 5:25 pm

You can get if from the standard place Al, http://pmem.uk/joinfs/development.html

OMGEDSON
Posts: 28
Joined: Tue Jan 02, 2018 6:17 pm

Re: Engine cut v1.4.3

Postby OMGEDSON » Fri Jan 12, 2018 5:53 am

Peter, just tested 1.4.4... SERVER and CLIENTS. It's WORSE!

Mixture cut still there. (Canrenado 690B, King Air 3501 in testing)

But now:
- plane hard nose up
- full engine cut
- max power restored in a few seconds (not at all quick)
- Throttle quadrant unresponsive. no matter what I set to, throttle is full power.
- Then throttle becomes responsive once again.


Return to “Bugs”