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

Issue with External Note Editor for the Browser and open windows multiple times #9

Open
silentcicada1 opened this issue Apr 4, 2020 · 15 comments
Labels

Comments

@silentcicada1
Copy link

This error occurs whenever multiple windows have been open:

Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site.
Debug info:
Anki 2.1.23 (de9543ff) Python 3.8.0 Qt 5.13.1 PyQt 5.14.1
Platform: Mac 10.15.1
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2020-04-03 22:16:45
Add-ons possibly involved: ⁨Symbols As You Type⁩

Caught exception:
Traceback (most recent call last):
File "/Users/papasmurf/Library/Application Support/Anki2/addons21/2040501954/browser_replacer.py", line 36, in on_text_edited
self._check_for_replacement(current_text, False)
File "/Users/papasmurf/Library/Application Support/Anki2/addons21/2040501954/browser_replacer.py", line 56, in _check_for_replacement
cursor_pos = self.get_search_box().cursorPosition()
File "/Users/papasmurf/Library/Application Support/Anki2/addons21/2040501954/browser_replacer.py", line 26, in get_search_box
return self._browser.form.searchEdit.lineEdit()
RuntimeError: wrapped C/C++ object of type QComboBox has been deleted

Caught exception:
Traceback (most recent call last):
File "/Users/papasmurf/Library/Application Support/Anki2/addons21/2040501954/browser_replacer.py", line 36, in on_text_edited
self._check_for_replacement(current_text, False)
File "/Users/papasmurf/Library/Application Support/Anki2/addons21/2040501954/browser_replacer.py", line 56, in _check_for_replacement
cursor_pos = self.get_search_box().cursorPosition()
File "/Users/papasmurf/Library/Application Support/Anki2/addons21/2040501954/browser_replacer.py", line 26, in get_search_box
return self._browser.form.searchEdit.lineEdit()
RuntimeError: wrapped C/C++ object of type QComboBox has been deleted

@qriousguy
Copy link

I've a similar issue with open windows multiple times.
Here's the error report:

Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site.
Debug info:
Anki 2.1.22 (0ecc189a) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2020-04-07 09:31:20

Caught exception:
Traceback (most recent call last):
File "C:\Users\Arnav Kalra\AppData\Roaming\Anki2\addons21\2040501954\browser_replacer.py", line 36, in on_text_edited
self._check_for_replacement(current_text, False)
File "C:\Users\Arnav Kalra\AppData\Roaming\Anki2\addons21\2040501954\browser_replacer.py", line 56, in _check_for_replacement
cursor_pos = self.get_search_box().cursorPosition()
File "C:\Users\Arnav Kalra\AppData\Roaming\Anki2\addons21\2040501954\browser_replacer.py", line 26, in get_search_box
return self._browser.form.searchEdit.lineEdit()
RuntimeError: wrapped C/C++ object of type QComboBox has been deleted

@jefdongus
Copy link
Owner

Hm, are there any steps you can take to reproduce this error? I am still having trouble reproducing this on my end :(

@qriousguy was this with the"External Note Editor" addon installed as well?

@silentcicada1
Copy link
Author

I had two different browsers opened and every time I went to type in the search box I had the above error until I restarted anki.

@qriousguy
Copy link

qriousguy commented Apr 14, 2020 via email

@jefdongus
Copy link
Owner

Hm, can you list all the add-ons you have installed? I tried the steps you listed above, but even after several hours there was no error.

The difference in behavior on my end and on your end makes me think that perhaps this is either due to another add-on or a difference in our computers (perhaps amount of memory or something? ...not sure what Qt does behind-the-scenes with UI components).

In the meantime, can you replace browser_replacer.py with this debug version? Link: https://gist.githubusercontent.com/jefdongus/7013e508f655dfe89742d64e8feb51ce/raw/21176327aa83a69ba5e91982234de52e200fed74/browser_replacer.py

Steps as follows:

  1. Open the Add-ons window (Tools -> Add-ons), select Symbols As You Type, and click "View Files" to open the add-on source code directory.
  2. Create a backup of browser_replacer.py (eg. rename it to browser_replacer.py.bak).
  3. Click on the above link and save the file to the directory (make sure it is named browser_replacer.py).
  4. Run Anki and try to replicate this error again. Instead of crashing, it should create a popup with some debug info. Could you copy and paste that debug info below? Thanks!

@jefdongus jefdongus added the bug label Apr 15, 2020
@qriousguy
Copy link

qriousguy commented Apr 16, 2020 via email

@jefdongus
Copy link
Owner

Hmm, which version of Advanced Browser are you on? I'm having no problems with Anki 2.1.22 and Advanced Browser version 2.7 (to see the version, select Advanced Browser from the Add-ons popup, click View Files, and then open __init__.py to see the version).

@qriousguy
Copy link

qriousguy commented Apr 16, 2020 via email

@qriousguy
Copy link

I'd uninstalled advanced browser earlier. I'm not noticing this issue after reinstalling it. I'll let you know in case of any updates.

@Arthur-Milchior
Copy link

Similar error

Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools>Add-ons menu item to disable some add-ons and restart Anki, repeat until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue on the add-ons section of our support site.
Debug info:
Anki 2.1.24 (359b9f5c) Python 3.8.1 Qt 5.14.1 PyQt 5.14.1
Platform: Linux
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-05-08 11:01:50
Add-ons possibly involved: ⁨Symbols As You Type⁩

Caught exception:
RuntimeError: wrapped C/C++ object of type QComboBox has been deleted

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/arthur/.local/share/Anki2/addons21/2040501954/browser_replacer.py", line 40, in on_return_pressed
search_box = self.get_search_box()
SystemError: PyEval_EvalFrameEx returned a result with an error set

I am on latest anki. 2.1.25, I do have multi window opener (I actually created it, so I may be able to help with it eventually) and advanced browser (I contributed to it and know its source code, so it may help)
I don't have time immediately, just wanted to report the problem

@qriousguy
Copy link

qriousguy commented May 8, 2020 via email

@thiswillbeyourgithub
Copy link

Same here. Closing and reoppening the browser window fixes it. At least until I open several browser and use them for a bit (does not seem to occur instantly, oddly enough)

@aPaci95
Copy link

aPaci95 commented Apr 11, 2021

Same here. Closing and reoppening the browser window fixes it. At least until I open several browser and use them for a bit (does not seem to occur instantly, oddly enough)

same problem here

@aPaci95
Copy link

aPaci95 commented Sep 5, 2021

Is there any update? Unfortunately, this problem really interrupts the workflow...

@aPaci95
Copy link

aPaci95 commented Sep 6, 2021

Somehow, installing old versions of these addons from a backup i had stored in cloud, the error didn't occur again, while it works perfectly. I really can't explain what happened, but if someone encountered the same error i can send my addon files to you to see if it fixes it.

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

No branches or pull requests

6 participants