Broswer crashes Anki when user clicks free space under card/note list view (v2.1.63)

Brief

After upgrading to Anki Desktop 2.1.63, I was able to crash Anki in two ways

  1. click empty space below a card/note list view in the Browser
  2. select a deck with no cards in the Browser

I could reproduce (1) multiple times back-to-back. When I went to experiment, I accidentally crashed Anki via (2). After reopening Anki after crashing via (2), I cannot reproduce either issue anymore.

Versions

Version ⁨2.1.63 (f356f177)⁩
Python 3.9.15 Qt 6.5.0 PyQt 6.5.0
Anki Desktop for macOS (Apple Silicon)

Reproduction

For the first reproduction,

  1. open the browser
  2. select a deck that has cards
  3. apply a filter that reduces the number of cards shown so that there is free space in the UI below the list
  4. click in the freespace

For example, click in the red circle:

For the second reproduction,

  1. create a new deck with no cards/notes
  2. open the Browser
  3. click the new deck in the Decks list on the left column

Logs

I did not capture logs at the times of the crashes, but I snooped around ~/Library/Logs/DiagnosticReports and found 3 logs for the first reproduction and then 1 log for the second reproduction. I’m not sure how best to work with Apple .ips files, so I just removed the first line of each to make the files valid JSON docs, imported them with Python, and wrote them back out to files with an indent of 2.

Crashes for both reproductions appear to be a similar segfault. I can’t upload crashlogs because text files don’t seem to be permitted here. I can’t paste crashlogs because then my post exceeds the max character limit. Crashlogs are ~95 kB, so I did not take time to dissect further.

The gist, admittedly with no stacktrace:

  "procPath": "/Applications/Anki.app/Contents/MacOS/anki",
  "bundleInfo": {
    "CFBundleShortVersionString": "2.1.63",
    "CFBundleIdentifier": "net.ankiweb.dtop"
  },
  "storeInfo": {
    "deviceIdentifierForVendor": "5CD839BB-5C76-524F-8919-D70244F2BC77",
    "thirdParty": true
  },
  "parentProc": "launchd",
  "parentPid": 1,
  "coalitionName": "net.ankiweb.dtop",
  "crashReporterKey": "12617D3E-3165-64CA-040E-81B3B960E461",
  "wakeTime": 583,
  "sleepWakeUUID": "7A6D2EFB-3160-40CF-B404-A466BD5ADD75",
  "sip": "enabled",
  "vmRegionInfo": "0x8 is not in any region.  Bytes before following region: 105553518919672\n      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL\n      UNUSED SPACE AT START\n--->  \n      MALLOC_NANO (reserved)   600018000000-600020000000 [128.0M] rw-/rwx SM=NUL  ...(unallocated)",
  "exception": {
    "codes": "0x0000000000000001, 0x0000000000000008",
    "rawCodes": [
      1,
      8
    ],
    "type": "EXC_BAD_ACCESS",
    "signal": "SIGSEGV",
    "subtype": "KERN_INVALID_ADDRESS at 0x0000000000000008"
  },
  "termination": {
    "flags": 0,
    "code": 11,
    "namespace": "SIGNAL",
    "indicator": "Segmentation fault: 11",
    "byProc": "exc handler",
    "byPid": 60825
  },
  "ktriageinfo": "VM - pmap_enter retried due to resource shortage\nVM - pmap_enter retried due to resource shortage\nVM - pmap_enter retried due to resource shortage\nVM - pmap_enter retried due to resource shortage\nVM - pmap_enter retried due to resource shortage\n",
  "vmregioninfo": "0x8 is not in any region.  Bytes before following region: 105553518919672\n      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL\n      UNUSED SPACE AT START\n--->  \n      MALLOC_NANO (reserved)   600018000000-600020000000 [128.0M] rw-/rwx SM=NUL  ...(unallocated)"

Additional Thoughts

I wonder if a fresh install of 2.1.63 or perhaps using 2.1.63 for the first time after an upgrade from an older version would allow me to start reproducing the crashes again. I have not done these experiments, though.

BTW I’m happy to share the crash logs as “jpgs” if it works that we can just change the file extension, and if that’s allowed. Do let me know. I prefer to keep all info colocated; not really interested in using a GitHub gist, pastebin, etc. It would be most convenient if I could open a bug report directly in GitHub, but GitHub directs me here. I do understand the motivation :wink:

I have the same issue. Using a apple silicon macbook.

Does resetting the window positions in the preferences screen help?

That does the trick. Thank you :slight_smile:

Thank you for the solution. FYI, I tried the following to reproduce:

  1. mv ~/Library/Application\ Support/Anki2 ~/Library/Application\ Support/AnkiTwo
  2. Uninstall 2.1.63
  3. Install 2.1.62; select US English
  4. Create a new dummy card in the Default deck
  5. Open the card browser; maximize the window
  6. Uninstall 2.1.62
  7. Install 2.1.63
  8. Open the browser and click some free space

I could not reproduce the issue.

I’ll mark Damien’s note as the solution here.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.