[RESOLVED] Bug report: UnrecognizedID exception propagates into other SimConnect clients

12bPilot
Posts: 45
Joined: Tue Jun 30, 2015 1:56 pm
Location: Switzerland
Contact:

[RESOLVED] Bug report: UnrecognizedID exception propagates into other SimConnect clients

Postby 12bPilot » Thu Sep 08, 2016 5:29 pm

This is Jeffrey, the author of the SODE module, a SimConnect client that is being used for example for jetway animation.

A couple of users have reported that they are getting multiple SimConnect exception = 3 (UnrecognizedID) in the log file that SODE writes out. My exception handler would then inhibit the triggering of jetways to prevent writing data to non-existent simobjects.
However, I was not able to trace the source of those errors and my injected simobjects are not removed and are present. But still, the simconnect communications diagnostic window shows various

Code: Select all

>>>>>  EXCEPTION=3, SendID=686, Index=3  <<<<<
coming from SODE.

Some users reported that they were able to stop those exceptions by deactivating some other SimConnect client add-on (TacPack or Aivlasoft EFB). SODE would then run without issues.

So I have made a small SimConnect client application that just generates a unrecognized ID exception periodically (PERIOD_SECOND) by calling RequestDataOnSimObject with a wrong object ID.

Following observations were made:

In the diagnostic window, the exceptions are showing at the correct rate, i.e. every second. But the module index is not from my small exception generator, but from an other module making (valid) data requests! In my case the log says the exceptions would come from the Addon Manager X module [67], which makes periodic data requests in the background. Obviously the SendID always refers to the last data request made to the server. It also always refers to parameter Index=3, regardless of the SimConnect API call made (mostly RequestDataOnSimObject and TransmitClientEvent).

It seems that the exception generated by my small application [69] is being broadcasted to other clients of the SimConnect server! As soon as I turn off my application, the exceptions would disappear.

Here's the server communications trace:

Code: Select all

> 19.64717 [67, 1]Open: Version=0x00000004  Name="Addon Manager X"
...
> 131.83063 [69, 1]Open: Version=0x00000004  Name="SimConnect Exception Generator"
...
< 219.93907 [67] >>>>>  EXCEPTION=3, SendID=686, Index=3  <<<<<
> 219.95226 [67, 687]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
> 220.11646 [67, 688]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
> 220.28724 [67, 689]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
> 220.45064 [67, 690]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
> 220.62110 [67, 691]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
> 220.78418 [67, 692]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
< 220.93723 [67] >>>>>  EXCEPTION=3, SendID=692, Index=3  <<<<<
> 220.95085 [67, 693]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
> 221.11966 [67, 694]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
> 221.28252 [67, 695]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
> 221.44933 [67, 696]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
> 221.53895 [65, 1398]TransmitClientEvent:ObjectID=0, EventID=42, dwData=0, GroupID=1, Flags=16
> 221.61772 [67, 697]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
> 221.78472 [67, 698]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
< 221.94233 [67] >>>>>  EXCEPTION=3, SendID=698, Index=3  <<<<<
> 221.95584 [67, 699]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
> 222.11991 [67, 700]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
> 222.28240 [67, 701]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
> 222.45004 [67, 702]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
> 222.61922 [67, 703]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
> 222.78717 [67, 704]RequestDataOnSimObject:RequestID=5, DefineID=9, ObjectID=0, Period=1, Flags=0, origin=0, interval=0, limit=0
< 222.93817 [67] >>>>>  EXCEPTION=3, SendID=704, Index=3  <<<<<


During the same test with the generator active, as soon as I want to trigger a jetway with SODE, the exception from my generator will then leak into SODE which in turn handles the exception as if it was generated by itself!

Code: Select all

> 19.58016 [65, 1]Open: Version=0x00000004  Name="SimObject Display Engine SODE"
...
> 242.91270 [65, 1822]TransmitClientEvent:ObjectID=0, EventID=19, dwData=0, GroupID=32, Flags=16
< 242.94258 [65] >>>>>  EXCEPTION=3, SendID=1822, Index=3  <<<<<


I also observed that this exception leaking only occurs for periodic data requests, when using PERIOD_ONCE, the expection would not propagate.

Conclusion: Once a SimConnect client (e.g. TacPack) generates a UNRECOGNIZED_ID exception from a periodic RequestDataOnSimObject() call, this exception leaks into other clients and that can fool the exception handling of those clients.


Thanks for looking into this. If you are interested, I can provide my small exception generator to you for testing.
Jeffrey Stähli
SimObject Display Engine (SODE) Developer

adiemus
Posts: 120
Joined: Fri Mar 16, 2012 4:19 am
Contact:

Re: Bug report: UnrecognizedID exception propagates into other SimConnect clients

Postby adiemus » Wed Sep 21, 2016 5:53 pm

As the developer of the TacPack, I can confirm this bug and that it's only present in P3D. (I believe v2 and higher)

Happy to provide any info that would be helpful.

Clifton Crane
Lockheed Martin
Posts: 997
Joined: Tue Sep 25, 2012 2:34 pm

Re: Bug report: UnrecognizedID exception propagates into other SimConnect clients

Postby Clifton Crane » Mon Oct 10, 2016 8:32 pm

Hello,

I have tried to reproduce the issue using modified SDK samples but have been able to do so thus far. Is there any more information you could provide such as:

1. How many SimConnect applications are running?
2. Does the order you start/stop them have any effect on the issue?

Thanks.
Clifton Crane
Prepar3D® Software Engineer Sr.

12bPilot
Posts: 45
Joined: Tue Jun 30, 2015 1:56 pm
Location: Switzerland
Contact:

Re: Bug report: UnrecognizedID exception propagates into other SimConnect clients

Postby 12bPilot » Tue Oct 11, 2016 1:48 pm

Hi Clifton,

Just tested with a minimal setup. Active SimConnect applications:
  • couatl.exe
  • My exception generator
  • bglmanx.dll (fsdreamteam AddonManagerX)

Once I start generating exceptions with my app, the diagnostic window will show exceptions indicating it would come from Addon Manager X, which is doing periodic requests.

The launch order has no influence on the outcome.
Jeffrey Stähli
SimObject Display Engine (SODE) Developer

User avatar
DaveWG
Posts: 62
Joined: Mon Apr 09, 2012 12:15 pm

Re: Bug report: UnrecognizedID exception propagates into other SimConnect clients

Postby DaveWG » Sun Oct 16, 2016 9:47 am

I've seen this as well, using TacPack and Active Sky Next in the same session. ASN logs all SimConnect messages to a log file, unfortunately with TacPack enabled it throws up lots of exception errors ( many times a second in some cases) creating a huge log file which can be many gig in size!
If I remove all traffic bgls (remove, not set the traffic level to zero), or disable TacPack, the problem stops.

Clifton Crane
Lockheed Martin
Posts: 997
Joined: Tue Sep 25, 2012 2:34 pm

Re: Bug report: UnrecognizedID exception propagates into other SimConnect clients

Postby Clifton Crane » Mon Oct 17, 2016 1:43 pm

Thanks for the additional information. We will continue to look into this issue.
Clifton Crane
Prepar3D® Software Engineer Sr.

Clifton Crane
Lockheed Martin
Posts: 997
Joined: Tue Sep 25, 2012 2:34 pm

Re: Bug report: UnrecognizedID exception propagates into other SimConnect clients

Postby Clifton Crane » Mon Oct 17, 2016 10:02 pm

Hello,

I have been able to reproduce the issue. The issue should be fixed in the next release.

Thanks!
Clifton Crane
Prepar3D® Software Engineer Sr.

adiemus
Posts: 120
Joined: Fri Mar 16, 2012 4:19 am
Contact:

Re: Bug report: UnrecognizedID exception propagates into other SimConnect clients

Postby adiemus » Tue Oct 18, 2016 6:17 am

Excellent news. Thanks. And thanks to 12bPilot for coming up with a reproducible test app.

12bPilot
Posts: 45
Joined: Tue Jun 30, 2015 1:56 pm
Location: Switzerland
Contact:

Re: Bug report: UnrecognizedID exception propagates into other SimConnect clients

Postby 12bPilot » Wed Oct 19, 2016 7:40 pm

Where's the like button? :-)

Thanks for fixing!
Jeffrey Stähli
SimObject Display Engine (SODE) Developer

jabloomf1230
Posts: 236
Joined: Thu Nov 01, 2012 7:40 pm

Re: Bug report: UnrecognizedID exception propagates into other SimConnect clients

Postby jabloomf1230 » Mon Nov 07, 2016 8:01 pm

@Clifton Crane

Thanks for fixing this so quickly. Other than the SimConnect exceptions not being attributed to the correct addon, were their any other positive ramifications (performance, VAS usage, etc.) of patching this bug?

Clifton Crane
Lockheed Martin
Posts: 997
Joined: Tue Sep 25, 2012 2:34 pm

Re: Bug report: UnrecognizedID exception propagates into other SimConnect clients

Postby Clifton Crane » Mon Nov 07, 2016 9:31 pm

Hello,

Not that I am aware of, however we are hoping that resolving this issue will help to remedy issues users may have when combining multiple SimConnect add-ons.
Clifton Crane
Prepar3D® Software Engineer Sr.

jabloomf1230
Posts: 236
Joined: Thu Nov 01, 2012 7:40 pm

Re: Bug report: UnrecognizedID exception propagates into other SimConnect clients

Postby jabloomf1230 » Mon Nov 07, 2016 10:17 pm

Thanks. That's what I was guessing was the result.


Return to “SimConnect Interface Questions”

Who is online

Users browsing this forum: No registered users and 5 guests