glutanimate / bettertags-public

Temporary repository to host bug reports and documentation for the BetterTags Anki add-on
https://www.patreon.com/glutanimate/posts?tag=BetterTags
5 stars 0 forks source link

RuntimeError: wrapped C/C++ object of type SidebarTreeView has been deleted #8

Closed aleksejrs closed 4 years ago

aleksejrs commented 4 years ago

Problem description

I was editing a new card (with some holdovers of a previously created card still in some fields), and pasted an URL from Selection (selected in the Web browser and clicked MMB) into one of the fields. Then I switched to another workspace and when I came back there was an error message. I had used the Browser before editing this card, but I don't remember if it was still open when the message appeared — now it wasn't.

Checklist

Please replace the space inside the brackets with an x if the following items apply:

Information about your Anki set-up

2.1.20

If you are using Anki 2.1

Please open Anki, go to Help → About, click on "Copy Debug Info", and paste the result between the backticks below (if the button does not appear you are using an older version of Anki 2.1 and will need to update first):


    Anki 2.1.20 (47a1bf8b) 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-02-28 03:25:19

    ===Add-ons (active)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    '' ['cronholio', 0, 'None', '']
    '' ['main_fullscreen', 0, 'None', '']
    '' ['tagedit_subtag_completer', 0, 'None', '']
    3 add-ons merged quicker anki explain deletion explain database check ['777545149', 2020-02-07T05:40, 'None', '']
    Add Table ['1237621971', 2020-02-07T06:02, 'None', '']
    Add a tag to notes with missing media ['2027876532', 2020-02-11T00:14, 'None', '']
    BetterTags ['bettertags', 2020-01-28T23:30, 'None', mod]
    Bury related notes ['413416269', 2020-02-07T06:01, 'None', '']
    Button Colours Good Again ['2494384865', 2020-02-10T03:24, 'None', '']
    CSS classes around fields ['631147309', 2020-02-07T05:42, 'None', '']
    Cardistry Dynamically Adjust New Cards ['1535078906', 2020-02-16T10:58, 'None', '']
    Change cards decks prefix ['1262882834', 2020-02-07T05:31, 'None', '']
    Clean the default deck ['683170394', 2020-02-07T05:33, 'None', '']
    Copy notes ['1566928056', 2020-02-07T05:35, 'None', '']
    Correct Answers Graph ['993120073', 2020-02-07T01:30, 'None', '']
    Create Filtered Deck from the Browser ['861263371', 2017-11-05T13:55, 'None', '']
    Create subs2srs cards with mpv video player ['1213145732', 2020-02-07T05:07, 'None', '']
    DA KILL Z0NE - automatic suspension and burying for time-wasting cards ['1565222544', 2020-02-07T05:47, 'None', mod]
    Deck name in title 21 ['699175524', 2020-02-07T05:38, 'None', '']
    Duplicate Selected Notes ['2126361512', 2017-11-05T14:02, 'None', '']
    Ease Factor Histogram ['494944895', 2019-08-02T23:48, 'None', '']
    Enhance main window ['877182321', 2020-02-16T05:51, 'None', '']
    Ensure each note is unique correct a bug introduced by add-on copy note ['2082040683', 2020-02-07T05:37, 'None', '']
    Extended Card Stats During Review ['1008566916', 2017-11-05T13:50, 'None', '']
    Field History ['1247884413', 2020-02-07T05:40, 'None', '']
    High Yield Tags ['1918380616', 2020-02-14T11:45, 'None', '']
    If a note has no more card warns instead of deleting it ['2018640062', 2020-02-07T05:41, 'None', '']
    Increase autosave frequency ['786971082', 2020-02-07T05:27, 'None', '']
    Incremental Reading v4103 ['935264945', 2020-02-07T01:30, 'None', '']
    Learning Step and Review Interval Retention ['1949865265', 2020-01-12T03:33, 'None', '']
    Maximum image height and width in card editor ['229181581', 2020-02-20T11:10, 'None', '']
    MentalPause No bonus for being late ['1707633456', 2019-08-03T00:14, 'None', '']
    Multi-column note editor ['3491767031', 2020-02-07T01:30, 'None', mod]
    Pop-up Dictionary beta ['153625306', 2020-02-10T03:51, 'None', '']
    Pretzel Logic Retention Benchmarking ['1168065472', 2020-02-07T05:13, 'None', '']
    Preview any cloze number ['915063177', 2020-02-07T05:29, 'None', '']
    Progress Graphs and Stats for Learned and Matured Cards ['266436365', 2020-02-07T05:14, 'None', '']
    Push Paradox Sibling Cardistry ['1797395052', 2020-02-07T05:16, 'None', '']
    Quick note and deck change menus ['277081964', 2020-02-07T05:44, 'None', '']
    ReMemorize Ex Rated0Search ['1056004913', 2020-02-07T05:19, 'None', '']
    ReMemorize Rescheduler with sibling and logging v130 ['323586997', 2020-02-07T05:18, 'None', '']
    Reflect On Mee - Helps Alleviate RGS ['86140736', 2020-02-07T06:29, 'None', '']
    Separate Learn and Relearn in the Answer Buttons graph 21 ['403491806', 2020-02-07T05:26, 'None', '']
    Slackers Delight PostponeDefer Button ['880824023', 2020-02-26T22:09, 'None', '']
    Statistics for Note Types Card Types and Tags ['16703369', 2019-12-17T04:30, 'None', '']
    Syllabus - Anki Statistics and Export by Tag and Deck ['668156440', 2020-01-12T14:47, 'None', '']
    True Retention ['613684242', 2020-02-07T05:47, 'None', '']
    True Retention by Card Maturity ['923360400', 2017-11-05T13:51, 'None', '']
    Watch Foreign Language Movies with Anki ['939347702', 2020-02-22T13:44, 'None', '']
    bury future new sibs ['930365039', 2020-02-07T06:00, 'None', '']
    syntax highlighting FORK ['1972239816', 2020-02-07T05:25, 'None', '']

    ===IDs of active AnkiWeb add-ons===
    1008566916 1056004913 1168065472 1213145732 1237621971 1247884413 1262882834 1535078906 153625306 1565222544 1566928056 16703369 1707633456 1797395052 1918380616 1949865265 1972239816 2018640062 2027876532 2082040683 2126361512 229181581 2494384865 266436365 277081964 323586997 3491767031 403491806 413416269 494944895 613684242 631147309 668156440 683170394 699175524 777545149 786971082 861263371 86140736 877182321 880824023 915063177 923360400 930365039 935264945 939347702 993120073

    ===Add-ons (inactive)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    Advanced Browser ['874215009', 2020-02-21T01:39, 'None', '']
    Fold Note Types in Sidebar ['1518136901', 2018-11-09T23:55, 'None', '']
    Frozen Fields ['516643804', 2020-02-22T00:11, 'None', '']
    Hierarchical Tags Addon 20  21 ['1835859645', 2018-11-13T14:49, 'None', '']
    Localize Media ['1293255374', 2018-11-26T14:27, 'None', '']
    Search and Replace Tags ['138501288', 2017-11-05T13:48, 'None', '']

Please fill in details about your operating system (Windows/macOS/Linux, which version):

Please open Anki, go to Tools → Add-ons, take a screenshot of your installed add-ons, and paste it below:

image

Error message (if any)

If you've received an error message, please copy and paste it between the backticks below:

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-ons section of our support site. 
Debug info:
Anki 2.1.20 (47a1bf8b) 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-02-28 03:25:19
Add-ons possibly involved: BetterTags

Caught exception:
Traceback (most recent call last):
  File "aqt/progress.py", line 73, in handler
  File "aqt/browser.py", line 1079, in deferredDisplay
  File "/home/fc/.local/share/Anki2/addons21/bettertags/sidebar/view.py", line 100, in setModel
    super().setModel(model)
RuntimeError: wrapped C/C++ object of type SidebarTreeView has been deleted
glutanimate commented 4 years ago

Thanks for the report, Aleksej! Will look into it.

aleksejrs commented 4 years ago

It happened again, this time when I closed the "Add" window after adding a card.

glutanimate commented 4 years ago

Sorry that this took so long to address, Aleksej. It's been a difficult few weeks (hope you're well!).

I just wanted to let you know that I fixed the browser issue in the current development build and the fix will land in v1.0.4 of BetterTags. The release should be ready over the next few days.

As for the variant in the "Add" window: I'm afraid I haven't been able to reproduce this just yet. Have you run into this again? If so, I'd really appreciate it if you could create a new issue report and paste the error message there (as this is likely a different bug). Please feel free to skip the tedium of filling out the issue template in that case.

(Since this is a fairly generic error that I've also seen occur in third-party add-ons in the past, there's a good chance that the AddCards variant is produced by a different add-on. But we should definitely dig into this further to understand what's going on).

aleksejrs commented 4 years ago

Thank you, Aristotelis. Soon after updating the addon, I did see some issue with the "Add" window (it made it uncloseable), but it stop appearing since (maybe I did only different things). There was no mention of BetterTags.