Jump to content
The simFlight Network Forums

FSUIPC / LUA Crash with com.openhid on Honeycomb Bravo


Recommended Posts

Posted

Hi,

I had random crashes of FSUIPC when using button polling on my Honeycomb Bravo.
When FSUIPC is killing the LUA script (on exit or on a "reload" when switching between airplanes) sometimes FSUIPC crashes with this message:

188765 Lua threads being terminated:
188765       9 = "G:\MSFS\FSUIPC7\lua\test.lua"
188953 LUA: "G:\MSFS\FSUIPC7\lua\test.lua": killed
189515 LUA.0: Crash C0000005 at 7FFB15A75C57: ""

As you can see at the "9 =" this was the 9th aircraft switch, it usually happens between 1 and 15 tries. The same can happen when closing FSUIPC. When it happens FSUIPC then has to be killed via the task manager.

I simplified my LUA to this small code, and it still happens:

VendorIdHC = 0x294B -- Honeycomb vendor id
ProductIdBravo = 0x1901 -- Honeycomb Bravo product id
Pollrate = 25 -- Polling rate in number of polls per second

devB, rdB = com.openhid(VendorIdHC, ProductIdBravo, 0, 0)

function Poll(time)
--	if devB ~= 0 then
		--PollBravo()
--	end
end

event.timer(1000/Pollrate, "Poll")

This is the only script I used for testing, no other script running. Script startet using the [Auto] block in FSUIPC ini.
As you can see I removed the complete polling logic and it still happens, the Poll function is basically just there to keep the script running.

It only happens with the Honeycomb Bravo, not the Alpha, where everything works fine with basically the same code.
I also removed the MSFS addon that controls the LEDs on the Bravo, thinking it might interfere, but no, same behavior with or without.

In the log of the LUA script itself everything looks like it was terminated fine:

********* LUA: "test" Log [from FSUIPC version 7.0.3] *********
    28203 System time = 24/12/2020 11:13:52, Simulator time = 10:13:37 (09:13Z)
    28203 LUA: beginning "G:\MSFS\FSUIPC7\lua\test.lua"
    39766 >>> Thread forced exit (ipc.exit or os.exit) <<<
    39766 System time = 24/12/2020 11:14:03, Simulator time = 10:13:48 (09:13Z)
********* LUA execution terminated: Log Closed *********

I tried closing the com-handle manually with

function on_exit()
	com.close(devB)
end
event.terminate("on_exit")

But this only made it worse, with this it crashed consistently on the first try every time, even without logging the LUA.0: Crash line in the log.

I tried with FSUIPC 7.0.2 and 7.0.3, same result with both.

Also with Lua debug logging there is no more information logged regarding the crash.

Maybe you could provide a version with more debug logging enabled so I can support you better finding the cause for the crash?

Thanks,
Jan

Posted

Sure, no problems.
At the moment it's just an annoyance having to check if FSUIPC has crashed after a plane change or while shutting down and then having to kill and restart it.
I'll post again if I see it crashing during "normal" operation and not just on script termination.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.