1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Bug Game Engine crashed with additional data output setting in xplane

Discussion in 'SimTools Pro & Entertainment Version' started by stargazer, Oct 8, 2018.

  1. stargazer

    stargazer Active Member

    Joined:
    Jun 29, 2018
    Messages:
    129
    Occupation:
    Electrical/Computer Engineer
    Location:
    Boston,USA
    Balance:
    811Coins
    Ratings:
    +35 / 0 / -0
    My Motion Simulator:
    3DOF, Arduino, Motion platform, 4DOF
    Hi,
    While setting up xplane 11 I found that Game Engine would crashed constantly if there are additional setting to the following:

    3 Speeds
    4 Mach, VVI, g-load
    16 Angular velocities
    17 Pitch, roll, & headings
    37 Engine RPM
    38 Propeller RPM

    For example if the following are turned on the Game Engine would crashed:

    0 Frame rate
    20 Latitude, Longitude and Altitude
    21 Location, Velocity and Distance Traveled

    Since other applications also rely on the UDP data output for their operations (e.g., Google Moving Map GPS https://forums.x-plane.org/index.php?/files/file/25569-external-moving-map/&_fromLogin=1), it would be great if Game Engine can work without crashing when other data outputs are enabled.
  2. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,460
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,596Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  3. stargazer

    stargazer Active Member

    Joined:
    Jun 29, 2018
    Messages:
    129
    Occupation:
    Electrical/Computer Engineer
    Location:
    Boston,USA
    Balance:
    811Coins
    Ratings:
    +35 / 0 / -0
    My Motion Simulator:
    3DOF, Arduino, Motion platform, 4DOF
    Hi @noorbeast . I am not sure if I could understand that. Why would game engine crash despite what the plug in of xplane do?
  4. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,460
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,596Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  5. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,903Coins
    Ratings:
    +5,027 / 16 / -0
    Its because you are changing the data in the packets it is sending.
    Then the data does not match up to what Game Engine expects and it can't cast the data as needed.
    Take care buddy,
    yobuddy
    • Agree Agree x 1
  6. stargazer

    stargazer Active Member

    Joined:
    Jun 29, 2018
    Messages:
    129
    Occupation:
    Electrical/Computer Engineer
    Location:
    Boston,USA
    Balance:
    811Coins
    Ratings:
    +35 / 0 / -0
    My Motion Simulator:
    3DOF, Arduino, Motion platform, 4DOF
    So the first problem is that the plug in didn't supply the correct data to Simtools. Shouldn't someone be looking into this? The second problem is that Simtools has no way to deal with bad data and crashed. Shouldn't Simtools has some input data checking to ignore the bad data?
  7. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,460
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,596Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Keep in mind plugin devs create plugins in their spare time and release them for free.

    But you are welcome to construct a plugin any way you please: https://www.xsimulator.net/communit...lugin-for-simtools-2-0-api-documentation.131/
    • Agree Agree x 1
    Last edited: Oct 10, 2018
  8. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,903Coins
    Ratings:
    +5,027 / 16 / -0
    The user just needs to setup the game to send the correct data the plugin is expecting.
    https://www.xsimulator.net/community/threads/xplane-11-setup-guide-simtools.11087/
    Once configured, the structure from the game then never changes and the game plugin will handle the packets quite nicely.
    Take care,
    yobuddy
  9. stargazer

    stargazer Active Member

    Joined:
    Jun 29, 2018
    Messages:
    129
    Occupation:
    Electrical/Computer Engineer
    Location:
    Boston,USA
    Balance:
    811Coins
    Ratings:
    +35 / 0 / -0
    My Motion Simulator:
    3DOF, Arduino, Motion platform, 4DOF
    @noorbeast and @yobuddy I understand that the xplane plugin is a work of volunteers so we cannot expect too much. However if there is a problem with it then we should be able to freely discuss about it so that may be someone else can come up with an enhancement to fix the problem.

    I do believe that there is a problem here since the data output can only be set to a very limited subset to prevent the simtools software from crashing. Consequently, other applications which also monitor the udp port for other data sets are unable to run. I think there are many people out there who rely on these applications to build their cockpit display but their display would stop working if they wish to run simtools at the same time.
  10. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,903Coins
    Ratings:
    +5,027 / 16 / -0
    But it's not a problem with SimTools or the plugin, the plugin was simply designed for a specific subset of data from the game.
    Most games have it's packet structure hard coded, with Xplane you configure it yourself.
    So the plugin writer decided on what he needed for the plugin and then captured and deciphered this data into a game plugin.

    All I'm saying is what you are trying to do (by changing the output structure from the game) can usually only be done by the developers of the game.
    So usually you only see a different game structure from 2 different games.
    (And not one title that can output hundreds of different combinations of data structures)
    Thats why you must setup the settings from the game just as the instructions shows.

    I hope that makes sense buddy.
    Take care,
    yobuddy
    • Agree Agree x 1
  11. stargazer

    stargazer Active Member

    Joined:
    Jun 29, 2018
    Messages:
    129
    Occupation:
    Electrical/Computer Engineer
    Location:
    Boston,USA
    Balance:
    811Coins
    Ratings:
    +35 / 0 / -0
    My Motion Simulator:
    3DOF, Arduino, Motion platform, 4DOF
    This is not the problem on the game itself. The game can output hundreds of parameters on its udp port. If all other applications are able to select only the data that they need to read, why can't the plugin just read the data that sim tools needed and ignore the rest?
  12. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,460
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,596Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    This is not a bug or a problem, the plugin and SimTools work fine when configured as instructed.

    As already explained the plugin dev chose the subset of data required, but if you want to create a plugin covering all of the possible data permutations then feel free to do so. But please do not expect others to do it for you.
  13. stargazer

    stargazer Active Member

    Joined:
    Jun 29, 2018
    Messages:
    129
    Occupation:
    Electrical/Computer Engineer
    Location:
    Boston,USA
    Balance:
    811Coins
    Ratings:
    +35 / 0 / -0
    My Motion Simulator:
    3DOF, Arduino, Motion platform, 4DOF
    The problem is simtools may work fine but all other supporting applications for panel builder cannot work. :(
  14. value1

    value1 Nerd SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Jan 9, 2011
    Messages:
    2,184
    Location:
    Zug, Switzerland
    Balance:
    14,461Coins
    Ratings:
    +3,318 / 11 / -1
    My Motion Simulator:
    2DOF, DC motor, JRK, Joyrider
    Hi @stargazer
    As mentioned by noorbeast in post #7 above, anyone including you can help to improve our plugins for the benefit of the whole xsimulator community. Your contribution is very welcome :cheers
    The documentation how to do it is here.
  15. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,903Coins
    Ratings:
    +5,027 / 16 / -0
    Hi @stargazer,
    For adding dash board outputs in this plugin you not only would have to send more data from the game, but you would also have to handle the new dash info in the plugin itself. (Send it to game dash basically)
    So for that an updated or new plugin would need to be created buddy.
    Take care,
    yobuddy
  16. stargazer

    stargazer Active Member

    Joined:
    Jun 29, 2018
    Messages:
    129
    Occupation:
    Electrical/Computer Engineer
    Location:
    Boston,USA
    Balance:
    811Coins
    Ratings:
    +35 / 0 / -0
    My Motion Simulator:
    3DOF, Arduino, Motion platform, 4DOF
    Hi @value1
    Thank you for the pointer. I will look into it. Can you tell me which computer language the plugin was written in? Did you use some socket API to access the udp data?
  17. stargazer

    stargazer Active Member

    Joined:
    Jun 29, 2018
    Messages:
    129
    Occupation:
    Electrical/Computer Engineer
    Location:
    Boston,USA
    Balance:
    811Coins
    Ratings:
    +35 / 0 / -0
    My Motion Simulator:
    3DOF, Arduino, Motion platform, 4DOF
    Hi @yobuddy
    I am not sure if we are talking about the same dash board display. What I meant is something like this . As you can see the user has built up many display panels for the b737 in the upper and lower end of the main monitor windows. Many of these displays and switch panels rely on the udp outputs from xplane. So if the user wish to run simtools then his cockpit will no longer working.
  18. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,903Coins
    Ratings:
    +5,027 / 16 / -0
    @stargazer,
    SimTools has a Companion App called GameDash, it's used to build dash board displays.
    Unlike allot of games, I believe this game can only send one packet to one location at a time since its configured in the game itself.

    So what you need is a packet relay or something to get them both going.
    Where you send all the data you need to the new app, and it splits off/makes & sends the data thats needed to each setup.
    Or maybe check out GameDash as it was created in part to solve this problem of games that can only send data to one place.

    Take care buddy,
    yobuddy
  19. stargazer

    stargazer Active Member

    Joined:
    Jun 29, 2018
    Messages:
    129
    Occupation:
    Electrical/Computer Engineer
    Location:
    Boston,USA
    Balance:
    811Coins
    Ratings:
    +35 / 0 / -0
    My Motion Simulator:
    3DOF, Arduino, Motion platform, 4DOF
    @yobuddy, may be I am missing something but this is not so. There is no need to relay the data. xplane provides UDP service which means each application can open their own socket connection to xplane machine to get the same set of UDP data. Then depending on what it needs, it can select just the data that it need as the data is prefixed by an integer index to identify the data type in the data output list.

    Here is a description of the data format:

    1) Choose "Data Input and Output" from the Settings menu. Under the "Inet 2" tab, check "IP address of data receiver" and enter the IP address and port where you want the UDP data sent.

    2) Under the "Data Set" tab, find a few options that you want to have sent to you. Each entry has a number and four checkboxes next to it. Check the leftmost checkbox next to each item. As soon as you close the "Data Input & Output" screen, X-Plane begins sending UDP data packets at the specified rate.

    3) The first five bytes of each UDP packet you receive should be constant. The first four bytes should form the ASCII string "DATA". The fifth byte can simply be ignored. What's left should be a multiple of 36 bytes. Each 36 byte record corresponds to a single entry from the "Data Set" screen.

    4) Each 36 byte record can be broken down into a series of 9 items, each of which is 4 bytes long (9 * 4 = 36). The first four bytes are an integer. This integer corresponds to the number beside each item on the "Data Set" screen. The remaining 4-byte items in each record (all 8 of them) are the actual data from the flight simulator. Here is the complete packet format:

    (Note that all data is in network-byte order!)

    "DATA" (4-byte ASCII string) | pad character (1-byte) | record #1 (36 bytes) | record #2 (36 bytes) | record #3...

    And the format of each record:

    data identifier (4-byte integer) | data item #1 (4 bytes) | data item #2 (4 bytes) | ... | data item #8 (4 bytes)

    5) Within each record, each data item may be an integer or floating point number. So how do you tell what format they're in? And what each of them means? The descriptions are in X-Plane itself.