-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
an Exception Error Caused in ursina's mouse.py #730
Comments
How can it be reproduced? |
The Ursina application has been running continuously for 24 hours a day without interruption for several months. Every one or two days, the administrator will remotely connect to check on it. This issue has only occurred once so far, so I also don’t know how to reproduce it. The original code in "/usr/local/lib/python3.8/dist-packages/ursina/mouse.py", line 234 is
now I changed it as follows in order to catch some evidence:
ChatGPT said "The expression !cnan(r2) shows that the code is checking whether the variable r2 is not a “Not-a-Number” (NaN) value. Variable r2 is NaN: cnan(r2) might be a function that checks whether r2 is NaN. If r2 is indeed NaN, then !cnan(r2) will fail, leading to an assertion error. You need to check whether there are any errors or unreasonable operations in the calculation process of r2 before the code reaches this line, such as division by zero, undefined mathematical operations, etc." I suspect that the issue might be due to computational problems such as encountering a singular matrix that cannot be inverted during the pose transformation calculations for mouse operations, leading to this abnormal error. |
This is probably a lower level error, in panda3d's collision library. There's some invalid math somewhere, like diving by 0 because something is scaled to 0 for example. It's kinda hard to figure out why it happens though. |
Running continuously from Oct 23 to Nov 25,a new error appeared. Assertion failed: !cnan(r2) at line 181 of panda/src/mathutil/boundingLine.cxx |
My Ursina application has runned normally for months on an Ubuntu 20.04 workstaion which can be visited by xrdp service. Sometimes the administrator uses the windows system's remote connector to check if it works well.
THe Ursina version is 5.2.0.
But today, one exception happed, maybe caused by "mouse" operation.
The info in the terminator are as follows:
Traceback (most recent call last):
File "/home/ndri/Crane_WenXiu/src/main.py", line 71, in
app.run()
File "/usr/local/lib/python3.8/dist-packages/ursina/main.py", line 241, in run
super().run()
File "/usr/local/lib/python3.8/dist-packages/direct/showbase/ShowBase.py", line 3330, in run
self.taskMgr.run()
File "/usr/local/lib/python3.8/dist-packages/direct/task/Task.py", line 553, in run
self.step()
File "/usr/local/lib/python3.8/dist-packages/direct/task/Task.py", line 504, in step
self.mgr.poll()
File "/usr/local/lib/python3.8/dist-packages/ursina/main.py", line 108, in _update
mouse.update()
File "/usr/local/lib/python3.8/dist-packages/ursina/mouse.py", line 234, in update
self._picker.traverse(self.traverse_target)
AssertionError: !cnan(r2) at line 181 of panda/src/mathutil/boundingLine.cxx
The text was updated successfully, but these errors were encountered: