-
Notifications
You must be signed in to change notification settings - Fork 44
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
libc++abi exception when running demo enable/enable/examples/demo/savage/buttons_on_canvas when running python3.11 #1023
Comments
The error seems to happen in demo.configure_traits() (enable/examples/demo/savage/buttons_on_canvas.py, Line 181). Evidence: When I add prints above and below it, only the first print (1) will print out:
|
After further locating using the same print method, the error is found inside the following part of the traits/traits/has_traits.py (line 2163-2172). This is a class from traitsui:
|
We can exclude the possibility that the error comes from toolkit() construction function (traitsui/traitsui/toolkit.py line 80), since the print can successfully pass this function. The inspect tool points to the overrided view_application function in traitsui/qt4/toolkit.py using the following code (in line 2164 of traits/traits/has_traits.py)
|
Further print tests leads to traitsui/qt4/view_application.py (line 59-110)
|
Is there no stack trace? Most of the code you're referencing here is nowhere near |
@homosapien-lcy It may be worth trying to run this under |
As John noted the code you have linked here is just generic GUI wrapper code that starts and runs a TraitsUI application and so is not helpful in diagnosing the issue - or likely at fault (by the way, github allows you to highlight and copy permanent links to other code stored in github, which is a nicer way of linking in issues). As Mark suggests, run with faulthandler to get a better idea of the issue. |
Thanks for the comments! Looking into faulthandler now |
For the quick version: just use |
Thanks! I got much more information from the error message. It seems the problem comes from kiva/agg/agg.py", line 1183 in clip_to_rect:
|
Ahh... that's the level of detail we needed. Here's the relevant C++ code: enable/kiva/agg/src/kiva_graphics_context.h Lines 862 to 917 in ccb7680
Yes, there is an enable/kiva/agg/src/kiva_graphics_context.h Lines 787 to 789 in ccb7680
I suspect, but do not know, that bad values are being passed as the clipping rect and that big block of code is throwing an exception somewhere. |
One thing to try is to see what happens when using a backend other than old Agg. Something like:
or
|
After test, I found qt.qpainter can run with no error. But the qt.celiagg will yield the following error:
|
After more tests:
The bbox inputted that caused unimplemented error seems normal:
Indeed, even if I pin the bbox value to all 0s (enable/savage/svg/backends/kiva/renderer.py, line 195-235)
I print the *args out before it is past into the C++ code
The program will still failed in the end, even though it didn't raised error with the same input in the first few calls:
|
I tested it with edm on Python 3.8 and Linux (enable 5.3) and it works as expected. The issue seems to be OS-X specific. |
Description:
When running demo enable/enable/examples/demo/savage/buttons_on_canvas, a exception will happen in libc++:
Replication step:
python enable/examples/demo/savage/buttons_on_canvas.py
Environment:
MacOS, python3.11 or python3.8 (with or without EDM)
Packages Installed:
The text was updated successfully, but these errors were encountered: