-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DCC-EX / RedHat++ LocoNet LBServer and TCP binary #141
Comments
@DrEVILish thanks for the log, Can you verify if this resolved it? (latest |
When using an actual Loconet Server LbServer this isn't an issue. Only an Issue when using JMRI / PanelPro - built-in LocoNet Server, possibly similar to issue #53. |
Is it possible for you to run the server with a debugger attached? Maybe that can give a clue why it crashes when connected to JMRI's LBserver. |
Before I forget, can you enable communication debug logging for the LocoNet interface, you can find it on the LocoNet tab of the LocoNet interface dialog. |
I'm not sure how to do this, within the context of this build environment. I've not used CMake as part of an Application only built and debugged CPP projects directly, without the "extra" steps.
I also enabled PCAP to file:
To clarify it's still crashing when using LocoNet on RedHat++ as well as the JMRI LocoNet Simulator. |
Hi, I've not looked into the code but I recall a similar issue with Z21.
When disabling communications, the Interface object deletes it's Kernel.
It may happen that Kernel just posted a callback to EventLoop or it's IO context, and this callback captures variables by reference, for example raw "this" pointer.
If this callback is put in the queue and executed after Kernel is deleted you get a segmentation fault.
I saw this pattern multiple times in the code, so the issue here might be similar.
|
This pattern is used in all interface + kernel setups, I'll look into it. |
I've narrowed down the case to crash the server. It's just happening on the LbServer. LocoNet -> TCP binary -> I can enable and disable communications without the server crash I think there is an infinite loop being caused by LbServer. As soon as I open an LbServer connection the thread is pegged at 100%, have to SIGKILL. Traintastic is getting a reply After that nothing is sent back out, I think the error has already happened before "disconnecting" and it's stuck in a loop without the ability to properly close out the connection so it hangs. This should be corrected by fixing #143 I believe both issues are caused by the same underlying issue. |
However
Which logs out "FAILED TO MATCH" when starting LocoNet. |
#147 fixes this |
Fixed new line character skipping, see #141
Unable to connect to RedHat++ LocoNet LBServer
This happens on both macOS -server and debian -server
Tried with multiple ports.
Verified it's not a IoTT/RedHat++ issue as JMRI from the same computer (macOS) can connect and run trains.
Created a brand new world, added Interface, Loconet, try to connect Fails.
The text was updated successfully, but these errors were encountered: