Problem Description
After adding a new field (which triggers a schema change) and choosing the “Upload to AnkiWeb / one-way sync (upload)” option, Anki consistently crashes during the sync progress phase.
-
Environment
-
Anki: 25.09 (539054c3)
-
OS: macOS 15.6.1 (Apple Silicon)
-
Python 3.13.5, Qt 6.9.1, PyQt 6.9.1
-
Sync backend: self-hosted Anki sync server (not AnkiWeb)
-
Add-ons: issue reproduces in Safe Mode (Shift-launch), so add-ons are not involved.
-
-
Steps to Reproduce
-
Edit note fields (add a field), which triggers a schema change.
-
When prompted, choose the one-way upload option to sync.
-
Sync starts; as progress updates, Anki crashes.
-
-
Observed Behavior
Anki exits with an OverflowError raised from aqt/progress.py while updating the progress bar.
-
Expected Behavior
One-way upload should complete (or at least report the error) without crashing.
-
Additional Observations
-
The crash only happens when the total size to upload is greater than ~2 GiB (collection and/or media involved in the one-way upload).
-
Workaround: temporarily remove part of my decks (to reduce the total upload size under ~2 GiB), then the upload completes without crashing.
-
-
Hypothesis (for maintainers):
The stack points to QProgressBar.setMaximum(self._max) receiving a value larger than a 32-bit signed int (INT_MAX = 2,147,483,647). If the progress bar is using raw byte counts for “maximum/ value,” a transfer > ~2 GiB would overflow and crash.
Log
Anki 25.09 (539054c3) (ao)
Python 3.13.5 Qt 6.9.1 PyQt 6.9.1
Platform: macOS-15.6.1-arm64-arm-64bit-Mach-O
Traceback (most recent call last):
File “/Users/xxx/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/sync.py”, line 273, in on_timer
on_full_sync_timer(mw, label) \~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~^^^^^^^^^^^
File “/Users/xxx/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/sync.py”, line 214, in on_full_sync_timer
mw.progress.update( \~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~^ value=sync_progress.transferred, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<2 lines>... label=label, ^^^^^^^^^^^^ ) ^
File “/Users/xxx/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/progress.py”, line 225, in update
self.\_win.form.progressBar.setMaximum(self.\_max) \~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~^^^^^^^^^^^
OverflowError: argument 1 overflowed: value must be in the range -2147483648 to 2147483647