Latest update of Anki keeps crashing

MacOS 10.15 (Catalina). Anki 23.10 (qt5, intel version).

Crash log has too many characters for the post. Send me a DM if you want the link to its pastebin.

Does the error look something like this?

Summary

Process: anki [78440]
Path: /Users/USER/Desktop/Anki.app/Contents/MacOS/anki
Identifier: net.ankiweb.dtop
Version: 23.10 (0)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: anki [78440]
User ID: 502

Date/Time: 2023-11-01 15:39:03.758 +0800
OS Version: macOS 11.7.10 (20G1427)
Report Version: 12
Anonymous UUID: 9FAA6F9A-3D82-6517-70F5-B55098B85782

Sleep/Wake UUID: 9865C7E2-AC66-477A-B2B2-93DDCE502FFE

Time Awake Since Boot: 520000 seconds
Time Since Wake: 7400 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000002f3c000
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [78440]

VM Regions Near 0x2f3c000:

In that case I have the same problem running macOS 11, I brought it up during the beta and the guess was that the new version of Xcode is incompatible with older macOS versions, so if you are able to update to a newer macOS you could try that.

I canā€™t update so Iā€™ve gotten around it by building anki from source by myself, which works. Otherwise you might have to continue on older versions for now.

dang. Guess Iā€™m stuck with 2.1.66

Hi, Iā€™m experiencing the same issue with my Anki on MacOS 10.15.

sw_vers
# ProductName:	Mac OS X
# ProductVersion:	10.15.7
# BuildVersion:	19H2026

My Anki version is 23.10

  • using anki-23.10-mac-intel-qt5.dmg

The issue didnā€™t occur with version 2.1.66


stack trace

In order to obtain the stack trace, I had to disable my System Integrity Protection status. Without this step, no stack trace is generated because Anki is released with the macOS security feature ā€˜Hardeningā€™ enabled.

csrutil status
# System Integrity Protection status: disabled.
/Applications/Anki.app/Contents/MacOS/anki --safemode
# zsh: segmentation fault  /Applications/Anki.app/Contents/MacOS/anki --safemode

lldb /Applications/Anki.app/Contents/MacOS/anki
(lldb) target create "/Applications/Anki.app/Contents/MacOS/anki"
Current executable set to '/Applications/Anki.app/Contents/MacOS/anki' (x86_64).
(lldb) run --safemode
Process 4474 launched: '/Applications/Anki.app/Contents/MacOS/anki' (x86_64)
Process 4474 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x000000010011ff67 anki`malloc_conf_init_helper + 279
anki`malloc_conf_init_helper:
->  0x10011ff67 <+279>: movq   (%rax), %rbx
    0x10011ff6a <+282>: movq   -0x90(%rbp), %rax
    0x10011ff71 <+289>: movq   %rbx, (%rax,%r13,8)
    0x10011ff75 <+293>: testq  %rbx, %rbx
Target 0: (anki) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x000000010011ff67 anki`malloc_conf_init_helper + 279
    frame #1: 0x000000010011f91f anki`malloc_init_hard_a0_locked + 127
    frame #2: 0x000000010012332f anki`malloc_init_hard + 159
    frame #3: 0x0000000102bb7353 dyld`ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 535
    frame #4: 0x0000000102bb775e dyld`ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 40
    frame #5: 0x0000000102bb217b dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 493
    frame #6: 0x0000000102bb0234 dyld`ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 188
    frame #7: 0x0000000102bb02d4 dyld`ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 82
    frame #8: 0x0000000102b9e6a8 dyld`dyld::initializeMainExecutable() + 199
    frame #9: 0x0000000102ba3bf7 dyld`dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 6728
    frame #10: 0x0000000102b9d227 dyld`dyldbootstrap::start(dyld3::MachOLoaded const*, int, char const**, dyld3::MachOLoaded const*, unsigned long*) + 453
    frame #11: 0x0000000102b9d025 dyld`_dyld_start + 37
(lldb) 

Thereā€™s a chance this will be fixed by Xcode 15.1. I will let you know when I have a build you can try.

3 Likes

I am facing the same issue, I think. Anki Qt6 23.10 does not start on my OS 11.7.10. Intel Iris

-I changed the bin to zsh then it said: zsh: segmentation fault
-I updated Big Sur
-I tried downloading Qt5 23.10again-> zsh: segmentation fault

I never used Anki beforeā€¦
Thank you for any hints and thoughts :slight_smile:

I have the same issue ā€œsegmentation faultā€ on MacOS 10.15.7

Hi all,

I have a similar crashlog to @Gustaf-C with Q5 version on an Intel Mac running 10.14.6. I have also Xcode 11.3.1 installed.

@dae Damien Iā€™m very interested by a new build as well.

My problem now is that I already updated on iOS so Iā€™m stuck since I was using the old custom FSRSā€¦ And of course I canā€™t update my machine. Iā€™m in the last year of my phd and rely on legacy software for my research. :man_facepalming:

@Gustaf-C by any chance would you have some guidance to build Anki from sources with Xcode? Iā€™m not a beginner with programming just not so much used to the IDE, I just dabbled with it a couple months ago to compile a friendā€™s project, but Iā€™m more of a Lisp guyā€¦ :sweat_smile:

Also Iā€™m not sure but is it easy to compile the Qt5 version? And Iā€™m using a couple older plugins like Chinese redux so I canā€™t use Qt6 yet.

Thanks all !

[UPDATE] : No terminal window pops up in my case. Anki starts bouncing, I get a very long security check, then after a while it just crashes. Then when I try to restart it bounces only once then stops every time I click on the dock icon.

I have the same issue. New Anki user and I cannot launch it. Zero plugins, first time trying to use Anki.

Platform: MacOS 11.7.10 on Intel i7 dual core
Release: anki-23.10-mac-intel-qt6.dmg

Steps to reproduce:

  1. Download latest Anki dmg from github: anki-23.10-mac-intel-qt6.dmg
  2. Place it in Applications folder
  3. Attempt to start it.

Expected result: Application launches.
Observed result: Terminal window pops with Segmentation fault (11). Application does not launch.

The error showing in terminal window is:
$ /Applications/Anki.app/Contents/MacOS/anki ; exit;
Segmentation fault: 11

Please let me know also when you have a build I can try :slight_smile:

If you have some experience already itā€™s really not difficult, although a bit time consuming. Just follow the guide on GitHub.

As for Chinese support I have actually released my own patch for 23.10, which should work with both qt5 and qt6. (Poking around a bit on my GH and you could also find my own pre-built dmg files for 23.10 which should work with older macOS. Although they are really only for my own safe keeping, building Anki yourself is of course safer than trusting a random guy on the internet :slight_smile: .)

2 Likes

Thank you for your fast reply, thanks !

I actually spent the last hour trying to build but didnā€™t get it to work.
I end up with the following without more explanation.
But I think I did see a smaller error somewhere about protoc being built for macOS11.3 (and Iā€™m still on 10.14).

I couldnā€™t find the dmg on your github unfortunately, in which repo is it? I know thatā€™s not super safe but I could maybe just give it a quick try :sweat_smile:

ā€¦
Compiling htmlescape v0.3.1
Compiling anki_proto v0.0.0 (/Volumes/Data/Desktop/anki/rslib/proto)
Compiling hex v0.4.3
Compiling unindent v0.2.3
Compiling rsbridge v0.0.0 (/Volumes/Data/Desktop/anki/pylib/rsbridge)
Compiling difflib v0.4.0
Compiling axum-client-ip v0.4.2
Compiling anki v0.0.0 (/Volumes/Data/Desktop/anki/rslib)
Compiling zstd v0.13.0
Compiling async-compression v0.4.4
Finished dev [unoptimized + debuginfo] target(s) in 5m 55s
ninja: build stopped: subcommand failed.

Build failed.

great news for Chinese support, the French community of Chinese learners Iā€™m part of is a fan of the plugin but often reported troubles with the old one. Iā€™ll give them your link :slight_smile:

Iā€™ve uploaded them as a release under my own Anki fork. (Iā€™m not sure if Iā€™m allowed to post a link to it, donā€™t want people thinking itā€™s an official solutionā€¦)

1 Like

I found it thank you so much, I didnā€™t think of checking releases of course

Ok so first opening is terribly long on 10.14, stays on the security check for a while,
but I was eventually able (after bypassing the unidentified dev check) to start Anki 23.10, yay ! Even the old Chinese support redux works on qt5ā€¦ and Chinese Support 3 as well, now my go to :wink:

Please let me know if the following builds work any better:

https://apps.ankiweb.net/downloads/beta/

None of them work for me, I still get segmentation fault at startup.

macOS Big Sur 11.7.10

It still gives me the same error, unfortunately

Process:               anki [2658]
Path:                  /Applications/Anki.app/Contents/MacOS/anki
Identifier:            net.ankiweb.dtop
Version:               23.10 (0)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           anki [2658]
User ID:               502

Date/Time:             2023-11-02 10:26:30.249 +0800
OS Version:            Mac OS X 10.15.7 (19H2026)
Report Version:        12
Anonymous UUID:        03915C0F-4DE9-2309-8ABB-491741F70F95

Sleep/Wake UUID:       191D5B49-45C6-42D7-8883-65F2162E2550

Time Awake Since Boot: 22000 seconds
Time Since Wake:       1700 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x000000000e651000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [2658]

VM Regions Near 0xe651000:
...

@dae Iā€™m sorry, but the beta builds you provided did not work for me. macOS 10.15


The version that @Gustaf-C posted on their GitHub fork release page does work and opens Anki without any issues.

@Gustaf-C is building with older development tools that donā€™t work on the latest macOS.

I mourn the hours this took, but think Iā€™ve finally got something working with the latest tools. Please let me know how the latest build in Index of /downloads/beta/ goes.

4 Likes

They both work for me, thanks for the hard work!

Just a heads up though, they both give unidentified developer warnings, in case you didnā€™t know.

Thanks, that will be fixed when I build a proper beta/release candidate. Would be good to hear from @julienvincenot to confirm this is working on 10.14.

1 Like