-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Exception on python action plugin code #475
Comments
I can confirm I get the same issue. A sort of workaround seems to be:
|
I have exactly same issue on Windows 11 + KiCad 8.0.2 + kicad-jlcpcb-tools 2024.05.01 |
I also have this issue on Windows 10 + KiCad 8.0.2 + kicad-jlcpcb-tools 2024.05.01. |
So it looks like the issue is due to some mismatch of memory being freed on one side (python vs. qt). There are a number of issues with similar text on stack overflow, like: @whmountains any thoughts on what might be going on here? Clearly its due to the message sending change but its not clear which object isn't valid or being properly retained. |
@Bouni any thoughts? I don't quite follow which object is deleted on the c++ side but not on the python side... |
or who we might be able to ask to take a look? We could revert the change until we can get a fix but the wrong thread updating the UI was causing a separate issue |
Same issue as @DomoticX under Manjaro with KiCad 8.0.2. Not possible to downgrade, as many other libraries were changed during the last update. |
As an update I'm discussing the issue on the wxPython forums, https://discuss.wxpython.org/t/help-debugging-a-runtimeerror-wrapped-c-c-object-of-type-jlcpcbtools-has-been-deleted-error/36948, as I kind of understand the problem but not why or how it's happening in this case. Will update here when I know more. |
Can someone with this issue please try #478 to see if this resolves the crash for them? With the help of Aleksandr Shvartzkop I was able to understand the issue and reproduce it here and fix it. I'm not able to reproduce the crash any more. |
I still have the error on Kicad 8.0.2, OS: Windows 11 My steps:
|
@DomoticX can you confirm you've totally exited out of kicad and are still seeing the issue? The crash is slightly different and I wasn't seeing it as that logging call in library.py:57 is only called when there isn't a datadir. So I modified library setup() locally to log even if it doesn't create the directory and not seeing the crash here. There are also no other calls to addHandler() without matching removeHandler(), only remaining question is maybe quit_dialog() isn't the correct place to clean up the loggers. |
@chmorgan well i closed all there is, and restarted KiCad, seems to be working now without crashing ;-) thank you! |
@DomoticX whew. At least that’s consistent with the theory of operation behind the fix heh @whmountains can you review the open PR so we can get it merged and a new version released? |
I can confirm that this fixed my issues so far |
I just released 2024.06.01 which should include the fix for this. |
I confirm that issue is now fixed with 2024.06.01 (tested with Windows 11 Pro x64 + KiCad 8.0.3) |
Describe the bug
"Exception on python action plugin code" window pops up when I click the plugin button in the PCB Editor. Plugin doesn't work after this point.
To Reproduce
Steps to reproduce the behavior:
I have just updated to the latest plugin release (2024.05.01) and this started happening. The first time I click the icon it downloads the db ok, then after that this happens every time. I tried uninstalling and reinstalling and no change.
Expected behavior
Plugin works
KiCad Version
The text was updated successfully, but these errors were encountered: