Teensy 2++ and X-Plane does not work anymore?!

Status
Not open for further replies.
Win7, 64 bit. Right now I try running the demo, Teensy connected, dataref editor open (thats when it
usually hangs). The demo mode does not load scenery outside Seattle, so being on a runway in Germany
does not stress RAM and CPU so much. It runs since 30 min, no problem so far.

edit: Still the crash reporter appears when closing X-Plane. I'll try more later on, maybe I can
identify risk factors.
 
Got email from Austin!
Ben S. will take care of this. He is the plugin-guy from X-Plane.

Paul, I sent him your email-adress so you guys can get into contact! :)

Thank you guys,

Olli
 
If anyone has a way to reproduce the error, we can help Paul. I got an email from him, it will very likely take another few months.

I'm trying to reproduce the hangup during flying. Seriously I have no clue. Now X-P runs since about 15 mins, I play
around with the encoders and the dataref editor is opened... but it does not hang up and runs stable... if anyone
has a reliable way to reproduce the error, please report it here :)
 
The ideal would be a program for any Teensy board that automatically sends dataref changes without any hardware connected (to the Teensy), and cause the crash or lockup within seconds.
 
Hardware is connected, but this should do as well. It makes the heading bug go wild and it runs since minutes :/

#include*<Encoder.h>
*
Encoder Heading_Enc(19, 18);
long Heading_EncPrev = 0;
*
FlightSimFloat headingBug;
*
void setup() {
*headingBug*=*XPlaneRef("sim/cockpit2/autopilot/heading_dial_deg_mag_pilot");
}


*
void loop() {
*FlightSim.update();
*
//*compare*current*position*to*previous*position
*int Heading_EncDiff = Heading_Enc.read() - Heading_EncPrev;
*
*// update previous position
Heading_EncPrev*=*Heading_Enc.read()+1; //+1 for the poltergeist-factor :)

*// if there was movement, change the dataref
*if (Heading_EncDiff) {
*headingBug*=*headingBug*+*Heading_EncDiff;
*}
}

edit: Hm, X-Plane runs since 90 mins without problems. The heading-bug is constantly changed, while I can still assign
buttons and send them to X-Plane. Perhaps the Teensy-plugin runs into an overflow or so? Maybe we just need to
send a dummy-variable to keep in the air?
 
Last edited:
Hi Paul,

I use the 32-bit version for now. I have some strange behavior which I cannot explain, I was thinking
that it may lead to the issue that you expct in the 32-bit version which hinders the 64bit version from
working correct.
If you have time, check this thread:
http://forums.x-plane.org/index.php?showtopic=55952&page=62#entry765724

You can see the electric output of the encoder and what it does - the value jumps
arbitrary sometimes.

Gerhard, have you had anything like this happen to you?

Thanks,

Olli
 
Hi Paul,

Just wondering if you use the long datatype in TeensyControls, and did you build it against the latest (v2.1.3, Nov 2013) X-Plane SDK?

long is not portable, apparently, and the SDK was updated in November to fix a bug which caused plugins to crash each other.

Per this article: http://developer.x-plane.com/2013/11/a-release-candidate-a-new-sdk-and-incompatibility/

Please could you build TeensyControls against the new SDK and we can see if this fixes the bug?
 
Looks like I need to rebuild the plugin. I haven't touched it in many months, certainly long before Nov 2013 (only last month).

However, I do not believe TeensyControls is using any of the Widgets stuff. In fact, the only place I could find "long" is this:

Code:
PLUGIN_API void XPluginReceiveMessage(XPLMPluginID from, long msg, void *param)
{
}

It's just an empty function, because apparently this is required to be a valid plugin. Even if "msg" is a truncated pointer, it's never used in any way.

Still, I've put rebuilding the plugin on my to-do list. Please make sure you're subscribed to this thread. I'll post the new copy here and ask for help testing.
 
Thank you!

I have the same problem as others. The X-Plane crashes when using 64 bit version plugin. (upon exit from xplane) regardless of hardware being plugged in or not.
My project is a G430 interface. Would like to build a couple more of them for my friends and my flight Instructor. Will have to wait until 64 bit allows people to exit their sim without a "crash" :)
Thank you for working on this plugin, your work is greatly appreciated by everyone who is using it.

Vik.


Looks like I need to rebuild the plugin. I haven't touched it in many months, certainly long before Nov 2013 (only last month).

However, I do not believe TeensyControls is using any of the Widgets stuff. In fact, the only place I could find "long" is this:

Code:
PLUGIN_API void XPluginReceiveMessage(XPLMPluginID from, long msg, void *param)
{
}

It's just an empty function, because apparently this is required to be a valid plugin. Even if "msg" is a truncated pointer, it's never used in any way.

Still, I've put rebuilding the plugin on my to-do list. Please make sure you're subscribed to this thread. I'll post the new copy here and ask for help testing.
 
I have published the complete plugin source code on github.

https://github.com/PaulStoffregen/X-Plane_Plugin

Unfortunately, it's very unlikely I'll be able to dedicate more engineering time to developing this plugin within the next year. Hopefully making the code available will help. My hope is that Dozer can vet any changes and submit pull requests via Github, which I'll merge.

The best place to discuss this code is actually the X-Plane forum.

http://forums.x-plane.org/index.php?showtopic=55952&page=65#entry792330

I'm sorry I can't put more time into this. Hopefully making the code available will allow anyone who's really interested to dig into these issues.
 
Just to replicate what was published on other threads, for those that follow only this one.

I have done some work on the X-Plane plugin and USB controls. The current version fixed the exit crash on OSX, provides a multi-architecture ("fat") plugin, handles data refs with names longer than 58 characters and permits optional arguments to the callback functions set with onChange.

You need to update the Teensy core libraries and the plugin. For now, the new versions exist on my github repositories:


https://github.com/jbliesener/cores contains the patches to the Teensy core library
https://github.com/jbliesener/X-Plane_Plugin has a new version of the plugin


I have sent a pull-request to Paul, maybe he'll include the patches in his official distribution.
 
Status
Not open for further replies.
Back
Top