Sync crashes app at last steps

Issue description:

I noticed that for 3 days now the lms provider in Symfonium no longer lists syncs as successful (however it also does not specify that they failed). To clarify: It lists the last sync from 19/07/2025 as successful but makes no mention of the syncs that have happened since.
Strangely, the tracks I added do show up in Symfonium which is why I did not notice it until yesterday.

I watched the last sync happen. After all Artists, Albums and Tracks were counted, the sync did not progress to the “collecting metadata” stage. I started debug logging after it hung for a few seconds. Then the app crashed/closed itself. I restarted it and stopped debug logging.

I suspected that there’s something wrong with my db in Symfonium, so I ran: “Cleanup internal state”.
However this also closed/crashed the app after a few seconds. I enabled debug logging, started “Cleanup internal state”, let Symfonium crash, restarted the app and stopped the logging.

Logs:

Upload description: 655321 sync crash & 655321 cleanup internal state crash

Additional information:

 
I’m currently on a test lms container because I helped @itm to improve the scan speed of lms:
epoupon/lms:6704762c

But I doubt that’s the reason since “Cleanup internal state” also crashes Symfonium.
 

Reproduction steps:

 
Sync crash:

  1. Start a sync to lms
  2. Wait till the artists, albums and tracks are counted
  3. Wait till Symfonium crashes

Cleanup internal state crash:

  1. Start cleanup internal state
  2. Wait till Symfonium crashes
     

Media provider:

Subsonic

Screenshots:

     

Check that you have enough space free on the device where the database is present.

Your phone can’t compact the DB and crash.

Is that a special path on the device? My phone seems to have ample free storage.

Then remove the provider. Do the cleanup and see if it works ?

No idea what was wrong but after removing the provider, re-adding it and waiting 6 hours for the initial sync to finish it works again. How odd.

With LMS there’s no difference in syncs between the first and the others, so it should not have taken 6 hours. There’s something strange here.

Does the cleanup state works ?

That has always been the case for me with “Fetch additional metadata” enabled for the provider. First sync takes forever at the “gathering metadata” stage (5-6ish hours) and consecutive syncs take 20-30min.

It doesn’t crash the app, so I guess? I don’t think it reports finishing the task, does it?