Anki Forums

Anki keeps freezing, started after getting a new Mac

I got a new Mac and transferred over all my files via the apple migration assistant, and ever since then my Mac keeps freezing when I hit the good button in review. It freezes with the green light/box showing then the anki screen freezes but I am still able to move my mouse. After a few seconds the whole computer freezes. This has happened spontaneously (but especially when I use anki for longer) and for about a week now.
Interestingly, I also got this message the first time I opened up anki after transferring to my new Mac (below). But that message stopped appearing when I changed my anki version from 2.1.48 to 2.1.41 (today) and the issue still persisted.

Note sure if it matters, but I also noticed a slight lag/freeze in the sync bar before I close the program every time, It’s not a big deal but not sure if that is part of the issue.
"
When loading ‘Legacy ReMemorize’:
Traceback (most recent call last):
File “aqt/addons.py” ,line 230,in
loadAddons
File “/Users/cristiancontreras/Library/
Application Support/Anki2/
addons21/323586997/__init
…py”, line 11,
in
from .main import *
File “/Users/cristiancontreras/Library/
Application Support/Anki2/
addons21/323586997/main.py” ,line 146, in

aqt.browser.Browser._reposition
wrap(aqt.browser.Browser._reposition,
reposition, ‘around’)
AttributeError: type object ‘Browser’ has no
attribute
reposition’


"

Not sure what to do, so any info will be helpful. I copied the debug info:

Anki 2.1.41 (312fa278) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.16
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-01-04 17:42:26


===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
'' ['Clickable tags v20   Anki 2120 support', 0, 'None', '']
'' ['put_ALL_due_learning_cards_first', 0, 'None', '']
Add Hyperlink ['318752047', 2021-11-21T08:04, 'None', '']
Additional Card Fields Fork for 21 ['744725736', 2021-12-05T12:30, 'None', mod]
Advanced Browser ['874215009', 2021-07-22T14:14, 'None', '']
Anki Simulator ['817108664', 2021-09-18T17:03, 'None', '']
Anki Zoom ['538879081', 2020-04-03T17:20, 'v1.1.3', '']
AnkiConnect ['2055492159', 2021-12-26T22:22, 'None', '']
Automatic Dark Night Mode ['446355629', 2021-05-15T11:22, 'None', '']
Batch Editing ['291119185', 2020-10-20T08:19, 'None', '']
Browser Resizer ['1435775540', 2021-08-01T14:11, 'None', '']
Browser TableEditor side-by-side horizontal split ['831846358', 2021-05-27T09:47, 'None', mod]
Convert Subdecks to Tag Hierarchy ['1172858842', 2020-02-23T14:03, 'None', '']
Create Filtered Deck from the Browser ['861263371', 2019-03-01T19:14, 'None', '']
Customize Keyboard Shortcuts ['24411424', 2021-12-05T12:39, 'None', mod]
Customize Sidebar ['1988760596', 2020-01-16T14:12, 'None', mod]
Edit Field During Review Cloze ['385888438', 2021-12-18T02:47, '6.9', mod]
Extended Card Stats During Review ['1008566916', 2017-08-29T11:59, 'None', '']
Extended Tag AddEdit Dialog ['1135507717', 2021-12-05T12:35, 'None', mod]
Fastbar- with nightmode support ['46611790', 2021-05-18T17:50, 'None', '']
Free Weekend - or Any Other Day ['742185195', 2020-04-10T04:57, 'None', mod]
Frozen Fields ['516643804', 2020-02-29T20:12, 'None', '']
Hierarchical Tags 2 ['594329229', 2021-09-18T17:03, 'None', '']
Highlight Search Results in the Browser ['225180905', 2021-09-18T17:02, 'None', '']
Hint Hotkeys ['1844908621', 2019-02-26T10:58, 'None', '']
Image Occlusion Enhanced for Anki 21 alpha ['1374772155', 2020-08-09T14:00, 'None', '']
Image Style Editor ['1593969147', 2021-12-16T23:01, 'None', mod]
ImageResizer ['1214357311', 2021-09-18T17:02, 'None', '']
Improved Quizlet to Anki 21 Importer ['538351043', 2020-11-14T18:16, 'None', '']
Learning Step and Review Interval Retention ['1949865265', 2021-09-18T17:02, 'None', '']
Legacy ReMemorize ['323586997', 2020-11-19T21:27, 'None', mod]
More Decks Stats and Time Left ['1556734708', 2021-09-18T17:02, 'None', mod]
More Overview Stats 21 ['738807903', 2021-07-30T12:13, 'None', mod]
More Overview Stats ['2116130837', 2021-05-29T04:24, 'None', '']
Placeholder - The KING of Study Timers ignore this  do NOT download this now ['907028815', 2020-04-25T12:57, 'None', '']
Progress Bar ['2091361802', 2019-03-02T18:27, 'None', '']
Quick Colour Changing ['2491935955', 2021-01-24T20:41, 'None', '']
Rebuild All  Empty All for Anki 21 ['1810938259', 2018-07-19T21:40, 'None', '']
Refocus Card when Reviewing 21 ['1642550423', 2019-03-04T10:20, 'None', '']
Resize images in editor ['1103084694', 2021-07-18T23:35, 'None', mod]
Review Heatmap ['review_heatmap', 2020-04-30T06:23, 'None', '']
Speed Focus Mode auto-alert auto-reveal auto-fail/good ['1046608507', 2019-06-02T02:11, 'None', '']
Symbols As You Type ['2040501954', 2021-09-18T17:02, 'None', '']
Symbols ['1461102936', 2019-04-23T06:37, 'None', mod]
The KING of Button Add-ons ['374005964', 2020-04-17T15:33, 'None', mod]
add-on dialog searchfilter bar ['561945101', 2021-12-05T12:28, 'None', '']

===IDs of active AnkiWeb add-ons===
1008566916 1046608507 1103084694 1135507717 1172858842 1214357311 1374772155 1435775540 1461102936 1556734708 1593969147 1642550423 1810938259 1844908621 1949865265 1988760596 2040501954 2055492159 2091361802 2116130837 225180905 24411424 2491935955 291119185 318752047 323586997 374005964 385888438 446355629 46611790 516643804 538351043 538879081 561945101 594329229 738807903 742185195 744725736 817108664 831846358 861263371 874215009 907028815

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Anki Speed Limit ['395996975', 2021-10-07T09:27, 'None', '']
Custom Background Image and Gear Icon ['1210908941', 2021-08-19T18:20, 'None', mod]

You have a bunch of add-ons there: I’d try to deactivate them, starting with legacy rememorize: most of its features are now built in the main program. The same is true for other add-ons you have.
https://faqs.ankiweb.net/when-problems-occur.html

My personal recomendation is to install only the add-ons you really need.

2 Likes

So I toggled all my add-ons off but I still get the freeze/lag when I sync before closing out of anki. But I will keep you posted if that solves the freezing issues.

How can you reschedule cards without Rememorize? I really love the feature and am really trying not to loose it!

Did you try the latest version to see if the freeze/lag is still there?

You can reschedule cards in recent versions with the ‘set due date’ action.

1 Like

Update, I had Advanced Browser, Amboss, Batch edit, Customize keyboard shortcuts, edit field during review close, faster, image resize, legacy Remorize, Resize images in editor, Review Heatmap, and King of buttons on with my anki yesterday and I did not have any lasting freezing issues. But I did notice that it was slower then normal and slightly lagging. For example, after hitting the good button it would freeze for like 2 seconds but it would move on to a new card. This did not happen for every card but it happened more often the more I used anki.

Today, I decided to add custom background image and gear icons, and it just froze like how I described earlier (anki screen first then entire computer).

Not sure if the custom background is the issue since I was having some issues (but not as bad) with custom background off.

Tomorrow, I will try without ReMemorize on, but what are my options if rememorizes or one of my add-ons are in issue? Am I forced to just not have them or is there a way to restart my entire anki program (while keeping my files cards) so that this doesnt happen? I was not having this issue with my old computer and it was basically the same as my current one.

I just tried to see if anki lags when closing anki/syncing with 2.1.49 (with all add ons off) and yes it still does that lag/freeze =(

I am back on 2.1.41 since I had the least amount of issues with it, but again any help would be great!

Did you try starting Anki while holding down the shift key to disable all add-ons, to confirm it’s not an add-on causing the slowdown? Any what exactly do you mean by ‘lag’? When closing or switching to a different profile, your collection is backed up, so it will take more time than when opening a profile.

So basically when I log out it gets frozen at syncing stage (see pic). It freezes like that then it just quits out. This does not really bother me but it started around the same time my anki started freezing completely.

Update: I started today off with custom background off and my anki froze completely (followed by freezing my computer). So still not sure what the problem is. I am planning on turning off rememorize today so will keep posted.

Would you recommend just deleting all anki and redownloading it?

Deleting and redownloading has never been a real solution, because it means nobody understood what the problem was, so nobody solved it (even though the problem might disappear).
Instead, you should try to do as proposed by @dae, which is

This will not definitively remove your add-ons, it will only start Anki once as if there were no add-ons. This is to rule out the possibility that your problems are caused by a buggy add-on (in which case you should submit this issue to the add-on developer).
Once you have done that (asserted that Anki kept freezing even when launched without add-ons), you could run it in a terminal and post if there is any output.

So I previously turned the add-ons all off manually, and I still got the slight lag/freeze before closing out of anki.

When I hold shift down and then when I try to close anki, it just disappears (it doesn’t look like it syncs at all until I open anki back up), so because of that I can’t tell if there is a lag.

Again the lag isn’t the issue, but I am just correlating it with the issue since it began at the same time.

I’ve been using anki with add-ons off (via shift button) for the last 2 hours and so far no trouble, but then again it freezes the more I use anki so I will keep you guys posted!

Holding down the shift key also disables the automatic sync on startup and shutdown, so if you want to test the automatic syncing without add-ons, you’d need to manually disable them all then restart Anki - but probably best to continue with your current session for now.

This is interesting. Would you say that, the more you are using Anki, the more it is freezing?
This sounds like memory leaking. And it reminds me that I heard about Anki leaking in this forum, and the issue was of course Qt leaking…

I would say it happens more often when I use it for longer (like when it happened 2days ago). But it can still happen after using it for a short time (like this morning).

But if that’s the case what would you recommend doing?

it’s a bit hard to assert whether it’s really a memory leak, and if it is it’s almost impossible to patch because it is due to Qt, which is independent from Anki (Qt is the “software” that is responsible for creating windows, buttons, and everything).
Personally, I don’t have experience in measuring memory consumption under MacOS, and I don’t know if Anki has a profiler, so I can’t help you, sorry.

Update - after having all add-ons off (via holding the shift key) my anki froze completely today =(

Does anyone have any recommendations now that add-ons aren’t the issue?

Two things you could try:

https://docs.ankiweb.net/platform/windows/display-issues.html
https://betas.ankiweb.net/

Should I just delete my anki files and reinstall? Because I am not really sure switching to a beta version would be optimal since I don’t know coding and from what I hear its really buggy and only really recommended if you know what your doing. From what I read in the display issues link you sent me, this does not apply to me since that is for windows and im running Mac Monterey.

Im in the middle of studying for boards so at this point I just need it to work.

Can anyone else please help me or let me know what my realistic options are?

One thing I have noticed is that I have no issues at all with a Anki mobile, so I know it most likely is not due to my decks/cards.

It may be this is an issue with the toolkit Anki is built on, and there may be nothing that can be done until it gets fixed upstream. If you’ve tried the various video drivers and none helped, and would prefer not to use a beta, then you’ll need to wait until it gets released as stable. You may want to consider updating to the latest stable version however, as it saves after every change, which minimizes the chances of losing any work if things do go wrong.

Beta version is not that buggy or unsuable if you don’t know coding. It’s just more likely to contain yet untested bugs (or unpatched), and as such usually used by testers and developers, but if you need it to be working as urgently as possible, it’s certainly worth trying it (put it otherwise: it might work, and it would really be stupid to miss it, if it does actually work for you).
Anyways, you can “always” revert back to stable (as always, before doing something that might corrupt your collection, back it up).

@dae as an aside note, as I have spent some time recently on the forum I have noticed that a lot of bug reports come from Qt. Do you think it would be reasonable to migrate to an other toolkit? I’m aware that it’s a drastic change, but since most toolkit expose (almost) the same API it would not be that huge of a change. Notably, you could try GTK or wxWidgets (maybe the former for performance, the latter for better integration with the user’s desktop – performance doesn’t really seem to be an issue for Anki). You could even try orbtk, which is a toolkit entirely written in Rust.

3 Likes