serock / pla-util

A power line adapter utility for Linux
GNU General Public License v3.0
42 stars 5 forks source link

power_line_adapter-network.adb:63 range check failed #4

Closed flarn2006 closed 3 years ago

flarn2006 commented 3 years ago

I'm getting the following error:

# pla-util enp6s0 discover

Execution of pla-util terminated by unhandled exception
raised CONSTRAINT_ERROR : power_line_adapter-network.adb:63 range check failed
Call stack traceback locations:
0x421fb1 0x42294b 0x425598 0x4285d6 0x403919 0x403f62 0x7f48d72dab23 0x403838 0xfffffffffffffffe

# pla-util enp6s0 get-network-info any

Execution of pla-util terminated by unhandled exception
raised CONSTRAINT_ERROR : power_line_adapter-network.adb:63 range check failed
Call stack traceback locations:
0x421fb1 0x423272 0x426741 0x42870e 0x403919 0x403f62 0x7f758b7c7b23 0x403838 0xfffffffffffffffe

I looked in Wireshark, and I do see that it sends out an Ethernet broadcast packet with protocol 0x8912, and then my Powerline adapters respond with similar packets. So the crash must be happening at some point after it sends the packet, but before it actually displays the results.

serock commented 3 years ago

I haven't been able to reproduce this issue. Can you provide screenshots of Wireshark showing the details of the response packets or a packet capture file with the 0x8912 protocol packets?

flarn2006 commented 3 years ago

Here's one I just took. The adapter in question wasn't communicating properly with the others at the time, so I only got the response from that one, but it was still enough to cause the crash.

Here's the command line and output from that test:

$ sudo pla-util enp6s0 discover

Execution of pla-util terminated by unhandled exception
raised CONSTRAINT_ERROR : power_line_adapter-network.adb:63 range check failed
Call stack traceback locations:
0x421fb1 0x42294b 0x425598 0x4285d6 0x403919 0x403f62 0x7fc98ee44b23 0x403838 0xfffffffffffffffe
serock commented 3 years ago

Thanks for reporting the issue.

I pushed a fix to the master branch, or if you want to test a binary, you can try this: pla-util.gz

Please let me know whether the fix works for you.

flarn2006 commented 3 years ago

Yep, looks like it works now. Thanks for the fix!