You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Constructing an A301 on a Motioncore bus segfaults in sim #387
The first::a301::A301 constructor segfaults in simulation when passed a Motioncore CAN bus ID.
I encountered this when updating robotpy-rev to the latest REVLib today. I haven't attempted to reproduce this on real hardware (as I don't have an A301 or Motioncore).
This segfault doesn't occur with a SparkMax, nor does it occur when instantiating an A301 on a Systemcore CAN bus (as exercised by robotpy-rev tests); it's specific to specifying a Motioncore bus.
Here's a backtrace from gdb:
#0 0x00007fffe4a1dca4 in (anonymous namespace)::A301_AutoDetectDeviceId(int) ()
from /home/davo/git/robotpy/robotpy-rev/rev/_rev.cpython-312-x86_64-linux-gnu.so
#1 0x00007fffe4a1e8b5 in c_A301_RegisterId () from /home/davo/git/robotpy/robotpy-rev/rev/_rev.cpython-312-x86_64-linux-gnu.so
#2 0x00007fffe4a04de2 in first::a301::internal::A301::A301(int, int) ()
from /home/davo/git/robotpy/robotpy-rev/rev/_rev.cpython-312-x86_64-linux-gnu.so
#3 0x00007fffe4a0498c in first::a301::A301::A301(wpi::CANPort, int) ()
from /home/davo/git/robotpy/robotpy-rev/rev/_rev.cpython-312-x86_64-linux-gnu.so
REVLib 2027.0.0-alpha-7
Linux (Fedora 44, also reproducible in a Debian 13 container)
Activity
ThadHouse commentedon Sep 12, 2026
I'm guessing this is sim only, as its in the autodetect code which uses the CAN stream APIs.
Thats also why it only occurs on Motioncore buses, as those are the only ones which attempt to auto detect.
ThadHouse commentedon Sep 14, 2026
I can't reproduce this either on Windows Sim or on Systemcore.
virtuald commentedon Sep 14, 2026
Fixed in 2027.0.0a7.post1