I was setting up my recently purchased Vero 4k, and the music library scan always crashed after around 10 minutes.
After a few tries, I’ve managed to figure out that the issue is caused by a specific FLAC file - that is, whenever the library scanner got to the folder containing this file the Kodi process simply crashed. The crash can be triggered by simply entering the folder (which is on an SMB share by the way) containing this FLAC file via the file browser too.
I just tried that file on my Pi3b+ over SMB and I could browse, scrape, and play it without issue. Is there any kind of \ / " : < > ; | * ? stuff in any of the file or folder names? I’m assuming your file is not named crash.flac on your system.
It is named crash.flac. Of course the original path wasn’t crash.flac, but even after I’ve copied the file to the root folder of the SMB share, and renamed it to crash.flac, Kodi kept crashing when opening the root folder, so it can’t be path-related.
However, in the meantime I’ve figured out that the issue can be circumvented by removing the PICTURE block from the file like this:
Indeed, it’s the zero-length PADDING block, and not the PICTURE block that’s causing the crash. Kodi still crashes even if I delete the PICTURE block but preserve the zero-length padding block like this:
According to the logs it crashes due to a segmentation fault:
Aug 01 20:12:05 vero mediacenter[2542]: /usr/bin/mediacenter: line 206: 5093 Segmentation fault sudo -u osmc MALLOC_MMAP_THRESHOLD_=8192 LIRC_SOCKET_PATH=/var/run/lirc/lircd $KODI --standalone -fs
Aug 01 20:12:05 vero mediacenter[2542]: Kodi exited with return code 139 after 0 hours, 7 minutes and 19 seconds
Very strange! I’ve checked with debug logging enabled, but it didn’t really provide any clue about the nature of this crash. It simply stops after CSMBFile::Open: