wj200-vfd segfaulting after updates
13 Mar 2015 07:59 #56774
by green751
Replied by green751 on topic wj200-vfd segfaulting after updates
Okay, after some effort and a bunch of printf statements (I went old school on debugging) I found the problem.
In line 94 of wj200_vfd.comp, the definition:
bits[10]
should be changed to
bits[16]
... because 10 isn't large enough for the data returned from libmodbus, and the overflow was clobbering the pointer to the __comp_inst structure inside the loop FOR_ALL_INSTANCES().
I am guessing libmodbus changed something in the most recent version or else the author of the code was lucky enough to never hit the bug (like I was with the previous incarnation of my linuxcnc system).
I doubt that wj200_vfd has completely worked since prior to version 2.6, although I'd guess that there are some people using it and it works just fine for them. /shrug.
Can someone please email this to the emc-developers list so the fix gets into the main code stream?
Thanks,
Erik
In line 94 of wj200_vfd.comp, the definition:
bits[10]
should be changed to
bits[16]
... because 10 isn't large enough for the data returned from libmodbus, and the overflow was clobbering the pointer to the __comp_inst structure inside the loop FOR_ALL_INSTANCES().
I am guessing libmodbus changed something in the most recent version or else the author of the code was lucky enough to never hit the bug (like I was with the previous incarnation of my linuxcnc system).
I doubt that wj200_vfd has completely worked since prior to version 2.6, although I'd guess that there are some people using it and it works just fine for them. /shrug.
Can someone please email this to the emc-developers list so the fix gets into the main code stream?
Thanks,
Erik
The following user(s) said Thank You: cajbr
Please Log in or Create an account to join the conversation.
13 Mar 2015 22:32 #56791
by andypugh
Replied by andypugh on topic wj200-vfd segfaulting after updates
Thanks, I have forwarded it to the developers list.
Please Log in or Create an account to join the conversation.
Time to create page: 0.062 seconds