datareftool icon indicating copy to clipboard operation
datareftool copied to clipboard

Plugin incompatible with Bell 407 Plugin

Open KarlLeclerc opened this issue 6 years ago • 12 comments

Hi Lee,

The plugin is incompatible with the Dreamfoil Creations Bell 407 plugin. It is the only aircraft in my hangar that Dataref Tool does not work with. I have used it to develop checklists for most helicopters without problem. However, when using it with the Bell 407, upon requesting to show datarefs or commands, it crashes to desktop. Clicking on About DRT does display the github address link without crashing.

Many thanks for a great tool.

KarlLeclerc avatar Aug 14 '18 19:08 KarlLeclerc

Hi @KarlLeclerc,

I suspect that what's going on here is that the Bell 407 plugin provides a dataref that crashes when it is read sometimes. This is somewhat common, and it's up to the plugin author to fix their plugin.

DRT has two different tools for working around this. If you can figure out which dataref it is, you can put it in a file called Resources/plugins/drt_blacklist.txt, and DRT will never read that dataref.

The second tool will be in a future release of DRT. On Mac and Linux, we're able to detect crashes in other plugins providing datarefs, and put a message in Log.txt so you know what the dataref causing the crash is. You can then add it to drt_blacklist.txt, and avoid the crash.

-Lee

leecbaker avatar Sep 14 '18 08:09 leecbaker

Thanks Lee. Looking forward to your next release.

Karl

On Sep 14, 2018, at 4:32 AM, Lee Baker [email protected] wrote:

Hi @KarlLeclerc https://github.com/KarlLeclerc,

I suspect that what's going on here is that the Bell 407 plugin provides a dataref that crashes when it is read sometimes. This is somewhat common, and it's up to the plugin author to fix their plugin.

DRT has two different tools for working around this. If you can figure out which dataref it is, you can put it in a file called Resources/plugins/drt_blacklist.txt, and DRT will never read that dataref.

The second tool will be in a future release of DRT. On Mac and Linux, we're able to detect crashes in other plugins providing datarefs, and put a message in Log.txt so you know what the dataref causing the crash is. You can then add it to drt_blacklist.txt, and avoid the crash.

-Lee

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/leecbaker/datareftool/issues/33#issuecomment-421273141, or mute the thread https://github.com/notifications/unsubscribe-auth/AcxQo9vMZVow9GDAgWGcM7FKulw4OXuxks5ua2mtgaJpZM4V9BSe.

KarlLeclerc avatar Sep 14 '18 20:09 KarlLeclerc

FYI I had this with one of mine. It using the buffer length correctly but then not checking properly before doing some final null-termination stuff, if the buffer pointer was non-null. So, bug in my code. However, you might be able to reduce crashes if you don't pass a pointer to a zero-byte byte array; if you're trying to get the data size the docs say to pass a null pointer. HTH.

jimkeir avatar Jul 23 '19 11:07 jimkeir

There's a thread related to this issue over at the X-Plane.org forums.

I also just emailed Dreamfoil to see if we can get them to fix the plugin.

@jimkeir Thanks for the suggestion. If I understand correctly, you're saying that we should not read an array dataref if the size is indicated to be zero, correct?

leecbaker avatar Jul 23 '19 22:07 leecbaker

@jimkeir Thanks for the suggestion. If I understand correctly, you're saying that we should not read an array dataref if the size is indicated to be zero, correct?

I think it may help you to avoid other people's bugs. It's a minimal change and worth a try, at least.

jimkeir avatar Aug 05 '19 13:08 jimkeir

@jimkeir good point.

By any chance do you have the Bell 407? Are you experiencing this crash?

leecbaker avatar Aug 07 '19 13:08 leecbaker

By any chance do you have the Bell 407? Are you experiencing this crash?

No, I don't, sorry. My bugs are entirely home-grown :) I was seeing this crash though and while I've fixed the problem here I can recreate it if it helps you test.

jimkeir avatar Aug 07 '19 16:08 jimkeir

I have the Bell 407. I reported having this crash problem with versions 3 to 3.0.3 of Plane Command over a year ago. The problem went away with an update, not exactly sure which one. It could have been updating X-Plane to 11.35, an update of the 407 plugin, or the update to PlaneCommand 3.1. With the latest versions, it is not crashing anymore. The log.txt files are clean.

As additional feedback, the voice recognition in 3.1 is a lot better with my Mac’s built-in microphone, but still results in a lot of misunderstood commands (that I can also read in the log.txt file). I will have to test with a headset to see if my interest in this plugin will come back.

Karl

On Aug 7, 2019, at 9:31 AM, Lee Baker [email protected] wrote:

@jimkeir https://github.com/jimkeir good point.

By any chance do you have the Bell 407? Are you experiencing this crash?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/leecbaker/datareftool/issues/33?email_source=notifications&email_token=AHGFBIYYE4YKQ3GDYDRYI6DQDLFC3A5CNFSM4FPUCSPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3YM5HA#issuecomment-519098012, or mute the thread https://github.com/notifications/unsubscribe-auth/AHGFBI7DMNOGCFZCCV6HPUTQDLFC3ANCNFSM4FPUCSPA.

KarlLeclerc avatar Aug 10 '19 13:08 KarlLeclerc

It appears these datarefs are the ones crashing. So far the Bell 407 runs without crashing after adding them to my drt_ignore.txt.

B407/Lights/CL1
B407/Lights/CL2
B407/Lights/CL3

RotationMatrix avatar Apr 20 '21 13:04 RotationMatrix

It appears these datarefs are the ones crashing. So far the Bell 407 runs without crashing after adding them to my drt_ignore.txt.

Thanks for figuring this out! I'll send a note to the developer, maybe we can get this fixed.

leecbaker avatar Apr 20 '21 21:04 leecbaker

When querying B407/Lights/CL1, the array length being returned here seems inconsistent and too large. In three different sessions the length was: 1041955840, 1042089216, and 1042140160. Maybe this is not the array length, leading to an out-of-bounds read on the next call?

Edit: If I limit current_array_length to <100 on this dataref we do not get a SIGSEGV.

RotationMatrix avatar Apr 24 '21 20:04 RotationMatrix

@RotationMatrix Thanks for the help debugging. I've sent a message to the developer, it's in their hands now.

leecbaker avatar Apr 29 '21 20:04 leecbaker