I have 2 Debian 11 environments (Proots in Termux). Both run Anki 2.1.65 installed via pip:
My old Debian 11 install which works just fine and can open a small test collection and my large actual collection .
My new Debian 11 install which can open the small test collection just fine, but the large collection crashes with the following error:
$ pyenv/bin/anki --safemode
Preparing to run...
Qt warning: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-anki-user'
[10456:10497:0809/165356.091414:ERROR:file_path_watcher_linux.cc(71)] Failed to read /proc/sys/fs/inotify/max_user_watches
[10456:10501:0809/165356.146170:ERROR:udev_watcher.cc(50)] Failed to initialize a udev monitor.
pcilib: Cannot open /proc/bus/pci/devices
Qt warning: QObject::~QObject: Timers cannot be stopped from another thread
Segmentation fault
I get the max_user_watches error even when running working install of Anki, so I don’t think that’s relevant. The error about the udev_monitor and Timers is unique to the broken install of Anki.
For now, I need these two environments. The old env has a working Anki but can’t recieve updates via apt (It failed the upgrade process to Debian 12, so now part of it thinks it is Debian 12). The new env has a working apt, but not Anki.
I can get the debug info from the about screen. I truncated the add-on info because I disabled them. The working env has:
I note that the working version is using glibc2.36 and a flag of ao=true while the broken version is using glib2.31 and a flag of ao=false. I think the difference in glibc versions is explained by the botched Debian 12 upgrade I mentioned earlier, but nevertheless Anki was working in the old environment before and after the upgrade attempt. Does anyone know what the ao flag is and how I could set it to see if it fixes this?
On an ARM system your Qt libraries will be installed in system locations, and my guess is there’s a chance either they, or one of the libraries they depend on, differ between one of the two systems.
On an ARM system your Qt libraries will be installed in system locations, and my guess is there’s a chance either they, or one of the libraries they depend on, differ between one of the two systems.
Can you give an example of a name of one of these libraries or location where I’d find them? I could then try comparing the libaries betweent the two environments
Edit: In another attempt, I ran a strace pyenv/bin/anki in both PRoots and noticed this difference in the logs:
The working PRoot is using /usr/lib/python3/dist-packages/ when the broken PRoot is using /usr/local/lib/python3/dist-packages/.
I guess I have to give up and just use my working backup. My phone can afford the storage space. I looked into the flatpak install, but I don’t think it would work because ARM isn’t listed under supported architectures, though I haven’t tried it.
To summarize the problem and what I’ve tried: The segmentation fault happens when trying open my large collection, but does not occur on a small test collection. It occurs in fresh installs of Debian 11, Debian 12, Ubuntu, and Arch, all installed in a PRoot environment in Termux. It does not occur in my Debian 11 backup, but apt/dpkg is broken in this backup due to a botched upgrade.
I don’t think there’s many users out there using Anki in a PRoot on their phone. If there’s someone out there wanting to do it, I can provide my backup file. It’s 3.5GB compressed though