Memory leak? (over time)

I’m sorry that’s happening. Let’s have you start with the same information we needed from everyone else.

  1. Is this happening over time, or right away?
  2. Does this only happen if/when you open the Browse window?

@Danika_Dakika

?

Hello All,

Thank you so much for your help!

  1. Anki 24.06.3 (d678e393) (ao)
    Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
    Platform: macOS-15.0.1-arm64-arm-64bit

===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
AMBOSS add-on [‘0amboss_addon’, 2024-08-05T09:24, ‘None’, mod]
Additional Card Fields Fork for 21 [‘744725736’, 2022-10-23T05:10, ‘None’, ‘’]
Advanced Browser [‘874215009’, 2024-10-27T09:20, ‘None’, ‘’]
AnJoy [‘anjoy’, 2019-07-31T16:02, ‘None’, mod]
Anki Simulator [‘817108664’, 2023-11-06T11:26, ‘None’, ‘’]
AnkiHub [‘1322529746’, 2024-10-21T12:10, ‘None’, ‘’]
Batch Editing [‘291119185’, 2023-10-25T19:38, ‘None’, ‘’]
BetterSearch [‘1052724801’, 2024-03-06T10:25, ‘None’, ‘’]
Bionic Reading [‘649714433’, 2023-10-26T16:24, ‘None’, mod]
Browser Resizer [‘1435775540’, 2023-11-11T11:16, ‘None’, ‘’]
Browser TableEditor side-by-side horizontal split [‘831846358’, 2022-01-25T16:11, ‘None’, ‘’]
Button Colours Good Again [‘2494384865’, 2022-09-27T05:18, ‘None’, ‘’]
Clickable Tags v20 [‘1739176371’, 2022-01-30T16:58, ‘None’, ‘’]
Cloze Hide All [‘1709973686’, 2024-09-10T21:45, ‘24.9.11i29’, ‘’]
Colorful Tags Hierarchical Tags [‘594329229’, 2022-09-15T10:06, ‘None’, ‘’]
Contanki - Controller Support for Anki beta [‘1898790263’, 2024-02-29T19:22, ‘v1.0.2’, mod]
Customize Keyboard Shortcuts [‘24411424’, 2023-11-01T04:17, ‘None’, ‘’]
Edit Field During Review Cloze [‘385888438’, 2024-01-03T01:19, ‘6.18’, mod]
Export Deck to HTML and Print to PDF [‘266464821’, 2022-05-25T00:23, ‘None’, ‘’]
Extended Card Stats During Review [‘1008566916’, 2024-02-26T13:07, ‘None’, ‘’]
Extended Tag AddEdit Dialog [‘1135507717’, 2023-11-11T10:58, ‘None’, mod]
Fastbar- with nightmode support [‘46611790’, 2023-06-27T06:47, ‘None’, ‘’]
High Yield Tags [‘1918380616’, 2023-01-10T13:14, ‘None’, ‘’]
Highlight Search Results in the Browser [‘225180905’, 2023-10-21T14:17, ‘None’, ‘’]
Hint Hotkeys [‘1844908621’, 2023-04-14T09:13, ‘None’, ‘’]
Image Editor [‘307397307’, 2022-09-07T23:09, ‘None’, ‘’]
Image Occlusion Enhanced for Anki 21 [‘1374772155’, 2022-04-09T02:15, ‘None’, ‘’]
ImageResizer [‘1214357311’, 2023-12-02T19:58, ‘None’, ‘’]
Learning Step and Review Interval Retention [‘1949865265’, 2024-01-06T11:48, ‘None’, ‘’]
Mini Format Pack [‘295889520’, 2023-11-02T13:00, ‘None’, ‘’]
More Decks Stats and Time Left [‘1556734708’, 2024-08-19T17:49, ‘None’, ‘’]
More Overview Stats 21 [‘738807903’, 2024-08-22T04:14, ‘None’, ‘’]
More Overview Stats [‘2116130837’, 2024-04-15T13:07, ‘None’, ‘’]
Quick Colour Changing [‘2491935955’, 2023-10-18T22:15, ‘None’, ‘’]
Rebuild All Empty All for Anki 21 [‘1810938259’, 2018-07-19T23:40, ‘None’, ‘’]
Review Heatmap [‘1771074083’, 2022-06-29T20:43, ‘None’, ‘’]
Special Fields [‘1102281552’, 2024-10-26T10:51, ‘None’, mod]
Straight Reward [‘957961234’, 2023-11-01T09:11, ‘None’, ‘’]
Syllabus - Anki Statistics and Export by Tag and Deck [‘668156440’, 2020-01-12T05:47, ‘None’, ‘’]
Symbols As You Type [‘2040501954’, 2024-01-19T23:42, ‘None’, ‘’]
Symbols [‘1461102936’, 2024-02-10T10:53, ‘None’, ‘’]
The KING of Study Timers [‘907028815’, 2022-04-20T13:14, ‘None’, ‘’]
Web Browser - Search terms Import texts and images automatically [‘864545277’, 2023-11-17T13:28, ‘None’, ‘’]
add-on dialog searchfilter bar [‘561945101’, 2023-10-18T11:22, ‘None’, ‘’]

===IDs of active AnkiWeb add-ons===
1008566916 1052724801 1102281552 1135507717 1214357311 1322529746 1374772155 1435775540 1461102936 1556734708 1709973686 1739176371 1771074083 1810938259 1844908621 1898790263 1918380616 1949865265 2040501954 2116130837 225180905 24411424 2491935955 2494384865 266464821 291119185 295889520 307397307 385888438 46611790 561945101 594329229 649714433 668156440 738807903 744725736 817108664 831846358 864545277 874215009 907028815 957961234

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Add Hyperlink [‘318752047’, 2023-06-18T06:39, ‘None’, ‘’]
AnKing Note Types Easy Customization [‘952691989’, 2024-10-21T09:29, ‘None’, mod]

  1. Yes, issue persists with all available video drivers
  2. Issue resolves when Anki is started in safe mode/ add ons disabled
  3. happens right away when opening the browser, very slow. Will get up to 11 gigs of RAM probably within 20 minutes or so, will then crash 10 minutes later with 16 gigs of RAM and doesn’t respond
  4. Yes, only happens when opening the browse window.

Thanks again for your suggestions! Maybe one of my add-ons is the issue.

I will admit first off – I don’t really know what that is. :sweat_smile:

But because I am pathologically unable to resist trying to help – to my naive ear, it sounds like the sort of thing you would do for a website in Chrome Dev Tools. Since Anki is, at heart, a series of websites – could you use the AnkiWebView Inspector add-on to get that? :person_shrugging:t4:

1 Like

Thanks for checking. Yes, that almost certainly it. You’ve got at least a few add-ons that haven’t been updated in years, so it’s unlikely their compatibility with the current version of Anki has been tested.

The Troubleshooting checklist gives a good technique for narrowing down where the problem is. It could be one add-on, or the interaction between multiple add-ons.

You have so many, you’ll save yourself a lot of time with the first step – disabling/deleting any add-ons you don’t use anymore (and that might even be enough to fix it). After that, disabling them half-by-half should go faster, but you also can see the last-update dates for all of them in the list above. Anything before about 2022 should be immediately suspect.

1 Like

Thank you! I appreciate your help :slight_smile:

1 Like

OK, a bit of a context. In Java (and in Python as well) memory is allocated by objects and collections of data. In case of Java it’s possible to dump complete state of the memory with all the objects and so forth. And having this dump let’s you analyse what’s taking up the memory (which objects/collections) and also see the references that created that and with that you can analyse what’s responsible for the memory consumption.

see: Creating and Analyzing Java Heap Dumps

Hmm… interesting! I’ll take a dump from memory tab and see if that’s the reason. However! Considering that allocations are not the same as with Software renderer it would indicated that the issue is not caused by objects allocations within the renderer but rather the issue with renderer itself…

EDIT: I’m not sure if this dev tools will help. I took a heapdump in it right after start and when I noticed higher memory usage and it’s the same size :confused:

if any other people see this post, the add-on that was breaking my browser is: Cloze (Hide All) → 1709973686 just in case other people have the same problem. thanks again to everyone here who helped me out. it’s greatly appreciated!

2 Likes

Though I have not tried it, there is a fixed version of Cloze Hide All so you might want to try it.

In my case I’m not using this addond :frowning:

1 Like

I think if memory leaks occur even after disabling add-ons the deck may be the problem, e.g. if you do a lot of reviews, the image and audio cache keeps growing?
I’m not familiar with Anki’s code for the desktop so I don’t know how those are handled, maybe QWebEngine keeps a cache of local files, but it seems to me that the images cache is reloaded after the reviews is completed.

1 Like