Skip to content
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

[BUG]: Tests (stepTiming()) hang when 1 Spark Max is instantiated #72

Closed
gerth2 opened this issue Jan 8, 2025 · 9 comments
Closed

[BUG]: Tests (stepTiming()) hang when 1 Spark Max is instantiated #72

gerth2 opened this issue Jan 8, 2025 · 9 comments

Comments

@gerth2
Copy link

gerth2 commented Jan 8, 2025

Problem description

In MRE, there appears to be an infinite loop when one spark max is instantiated, and then stepTiming() is called.

Operating System

Windows

Installed Python Packages

Package                        Version
------------------------------ ----------------
absl-py                        2.1.0
alabaster                      0.7.13
altgraph                       0.17.4
apeye                          1.4.1
apeye-core                     1.1.4
appdirs                        1.4.4
astroid                        3.0.2
asttokens                      2.4.1
autodocsumm                    0.2.11
Babel                          2.13.1
bcrypt                         4.2.1
beautifulsoup4                 4.12.2
Brotli                         1.1.0
CacheControl                   0.13.1
certifi                        2023.7.22
cffi                           1.17.1
charset-normalizer             3.3.2
clang-format                   17.0.5
clang-tidy                     17.0.1
click                          8.1.7
colorama                       0.4.6
context-var                    0.1.1
contourpy                      1.2.0
coverage                       7.4.1
cryptography                   44.0.0
cssutils                       2.9.0
cycler                         0.12.1
data                           0.4
dataclasses                    0.6
debugpy                        1.8.11
decorator                      5.1.1
dict2css                       0.3.0
dill                           0.3.7
doc8                           0.11.2
docutils                       0.18.1
domdf-python-tools             3.7.0
executing                      2.1.0
filelock                       3.13.1
flexcache                      0.3
flexparser                     0.4
fonttools                      4.43.0
frccontrol                     2023.28
fsspec                         2024.2.0
funcsigs                       1.0.2
future                         0.18.3
gersemi                        0.9.3
gitdb                          4.0.11
GitPython                      3.1.41
grpcio                         1.66.1
html5lib                       1.1
idna                           3.4
imagesize                      1.4.1
iniconfig                      2.0.0
inliner                        0.4.1
ipython                        8.27.0
isort                          5.13.2
iterextras                     0.2.1
jedi                           0.19.1
Jinja2                         3.1.3
jsmin                          3.0.1
kiwisolver                     1.4.5
lark                           1.1.8
latex                          0.7.0
lazy-object-proxy              1.10.0
libcst                         1.1.0
line_profiler                  4.1.3
Markdown                       3.7
markdown2                      2.4.6
MarkupSafe                     2.1.3
matplotlib                     3.8.1
matplotlib-inline              0.1.7
mccabe                         0.7.0
modern-sphinx-version-warning  1.1.6
mpmath                         1.3.0
msgpack                        1.0.7
mypy-extensions                1.0.0
natsort                        8.4.0
networkx                       3.2.1
numpy                          2.1.3
opencv-python                  4.10.0.84
packaging                      23.2
pandas                         2.2.3
paramiko                       3.5.0
parso                          0.8.4
pathspec                       0.11.2
pbr                            6.0.0
pefile                         2023.2.7
phoenix6                       25.1.0
photonlibpy                    2025.0.0b8
pillow                         10.2.0
Pint                           0.24.4
pip                            24.2
platformdirs                   4.3.6
pluggy                         1.5.0
prompt_toolkit                 3.0.47
protobuf                       5.28.2
psutil                         6.0.0
pure_eval                      0.2.3
pycparser                      2.22
pyfrc                          2025.0.0
Pygments                       2.16.1
pyinstaller                    6.4.0
pyinstaller-hooks-contrib      2024.1
pylint                         3.0.3
PyNaCl                         1.5.0
pynetconsole                   2.0.4
pyntcore                       2025.1.1.0
pyparsing                      3.1.1
pytest                         8.3.4
pytest-reraise                 2.1.2
python-dateutil                2.8.2
pytz                           2024.2
pywin32-ctypes                 0.2.2
PyYAML                         6.0.1
regex                          2023.10.3
requests                       2.31.0
restructuredtext_lint          1.4.0
robotpy                        2025.1.1.1
robotpy-apriltag               2025.1.1.0
robotpy-cli                    2024.0.0
robotpy-cscore                 2025.1.1.0
robotpy-hal                    2025.1.1.0
robotpy-halsim-gui             2025.1.1.0
robotpy-installer              2025.0.0
robotpy-rev                    2025.0.0
robotpy-wpilib-utilities       2025.0.0
robotpy-wpimath                2025.1.1.0
robotpy-wpinet                 2025.1.1.0
robotpy-wpiutil                2025.1.1.0
ruamel.yaml                    0.18.5
ruamel.yaml.clib               0.2.8
scipy                          1.11.3
seaborn                        0.13.2
setuptools                     75.1.0
shutilwhich                    1.1.0
six                            1.16.0
smmap                          5.0.1
snowballstemmer                2.2.0
soupsieve                      2.5
Sphinx                         7.2.6
sphinx-autodoc-typehints       1.25.2
sphinx-copybutton              0.5.2
sphinx_design                  0.5.0
sphinx-hoverxref               1.3.0
sphinx-jinja2-compat           0.2.0
sphinx-notfound-page           1.0.0
sphinx-prompt                  1.8.0
sphinx-rtd-theme               2.0.0
sphinx-tabs                    3.4.4
sphinx-toolbox                 3.5.0
sphinxcontrib-applehelp        1.0.7
sphinxcontrib-devhelp          1.0.5
sphinxcontrib-htmlhelp         2.0.4
sphinxcontrib-jquery           4.1
sphinxcontrib-jsmath           1.0.1
sphinxcontrib-qthelp           1.0.6
sphinxcontrib-serializinghtml  1.1.9
sphinxcontrib-svg2pdfconverter 1.2.2
sphinxext-delta                0.2.0
sphinxext-linkcheckdiff        0.1.0
sphinxext-mimic                0.1.1
sphinxext-opengraph            0.9.0
sphinxext-photofinish          0.1.10
sphinxext-presentations        0.2.2
sphinxext-rediraffe            0.2.7
sphinxext-remoteliteralinclude 0.4.0
sphinxext-toptranslators       0.1.3
stack-data                     0.6.3
stevedore                      5.1.0
sympy                          1.12
tabulate                       0.9.0
tempdir                        0.7.1
tensorboard                    2.17.1
tensorboard-data-server        0.7.2
thop                           0.1.1-2209072238
tinycss2                       1.2.1
tomli                          2.2.1
tomlkit                        0.13.2
torch                          2.4.1+cpu
torchaudio                     2.4.1+cpu
torchvision                    0.19.1+cpu
tqdm                           4.66.1
traitlets                      5.14.3
typing_extensions              4.12.2
typing-inspect                 0.9.0
tzdata                         2024.1
urllib3                        1.26.18
wcwidth                        0.2.13
webencodings                   0.5.1
Werkzeug                       3.0.4
wheel                          0.42.0
wpilib                         2025.1.1.0
wrapt                          1.16.0
zopfli                         0.2.3

Reproducible example code

https://github.com/RobotCasserole1736/RevHangMRE2025
@virtuald
Copy link
Member

virtuald commented Jan 8, 2025

Smaller reproducer:

import time
import rev
from wpilib.simulation import stepTiming

motor = rev.SparkMax(0, rev.SparkMax.MotorType.kBrushless)
time.sleep(1)
stepTiming(0.2)

@virtuald
Copy link
Member

virtuald commented Jan 8, 2025

Actually, I was able to duplicate on a mac, but it does not hang on Linux (which is annoying since that's easier to use gdb in... )

@virtuald
Copy link
Member

virtuald commented Jan 8, 2025

I think I identified the source of the bug, I'll contact REV

@virtuald
Copy link
Member

virtuald commented Jan 8, 2025

I was able to reproduce on Linux by adding a sleep(1) after creating the motor controller.

@gerth2
Copy link
Author

gerth2 commented Jan 15, 2025

Any feedback from Rev? I assume not, just checking if there's anything we can help investigate or test.

@ThadHouse
Copy link
Collaborator

This is fixed in 2025.0.1

@gerth2
Copy link
Author

gerth2 commented Jan 15, 2025

image

@auscompgeek
Copy link
Member

auscompgeek commented Jan 15, 2025

robotpy-rev should be available as of this morning Sydney time, let us know how you go.

@gerth2
Copy link
Author

gerth2 commented Jan 15, 2025

I can get a student working on it next day or two, we can bump the version and check.

Appreciate the work again, ya'll are amazing. At least one round of beverage-of-your-choice on me next time we meet. Perhaps at a Mexican restaurant in Houston.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants