Skip to content

[Bug]: SEGV when loading new offline-added files #986

Open
@ToxicMushroom

Description

@ToxicMushroom

Checklist

  • I am using an up-to-date version.
  • I have read the documentation.
  • I have searched existing issues.

TagStudio Version

Alpha v9.5.2 (portable)

Operating System & Version

Arch Linux

Description

TagStudio segfaults (SIGSEGV) when opening a library that had file added while TagStudio was running.
The crash occurs after scanning the entire library and successfully registering the new files.

Maybe some UI update for the new files is going wrong ?? No clue just speculating.
The next launch is fine again since there are now no unprocessed files.
Also this is not a new issue, I just haven't gotten around to reporting it.

Expected Behavior

When adding new files in the background, tagstudio should not be crashing after scanning them

Steps to Reproduce

  1. Add 2-3 files when tagstudio is not running
  2. Launch tagstudio
  3. Segfaults after scanning the library and adding the new files to its db.

Logs

merlijn@mimic ~/Downloads % ./tagstudio --debug 2> tagstudio.log
2025-07-11 18:31:24 [info     ] [FFmpeg] Using FFprobe location: ffprobe (Found)
2025-07-11 18:31:24 [info     ] [FFmpeg] Using FFmpeg location: ffmpeg (Found)
2025-07-11 18:31:25 [info     ] [ResourceManager] Resources Registered: count=32
2025-07-11 18:31:25 [info     ] [Settings] Global Settings File Path not specified, using default
2025-07-11 18:31:25 [info     ] [Settings] Reading Global Settings File path=PosixPath('/home/merlijn/.config/TagStudio/settings.toml')
2025-07-11 18:31:25 [info     ] [Cache] Cache File not specified, using default one filename=/home/merlijn/.config/TagStudio/TagStudio.ini
2025-07-11 18:31:25 [info     ] [Config] Thumbnail cache size limit: 500 MB
2025-07-11 18:31:26 [error    ] Path does not exist.           open_path=None
2025-07-11 18:31:26 [info     ] [Library] Opening SQLite Library connection_string=sqlite:////drive2/Seafile/private/meems/.TagStudio/ts_library.sqlite library_dir=PosixPath('/drive2/Seafile/private/meems')
2025-07-11 18:31:26 [info     ] [Library] DB_VERSION: 9       
2025-07-11 18:31:26 [info     ] [Library] Creating DB tables...
2025-07-11 18:31:26 [warning  ] [PanelModal] add_callback not implemented for FileExtensionModal
2025-07-11 18:31:26 [info     ] finished counting (0 seconds) 
2025-07-11 18:31:26 [info     ] searching library              filter=FilterState(page_size=100, page_index=0, sorting_mode=<SortingModeEnum.DATE_ADDED: 'file.date_added'>, ascending=False, ast=None) query_full=SELECT DISTINCT entries.id, entries.folder_id, entries.path, entries.filename, entries.suffix, entries.date_created, entries.date_modified, entries.date_added 
FROM entries 
WHERE (entries.suffix NOT IN ('json', 'xmp', 'aae')) ORDER BY entries.id DESC
 LIMIT 100 OFFSET 0
2025-07-11 18:31:26 [info     ] SQL Execution finished (0 seconds)
2025-07-11 18:31:26 [info     ] items to render                count=100
2025-07-11 18:31:26 [info     ] [QtDriver] Loading Entries... 
2025-07-11 18:31:26 [info     ] [QtDriver] Building Filenames...
2025-07-11 18:31:26 [info     ] [QtDriver] Done! Processing ItemThumbs...
2025-07-11 18:31:32 [info     ] Directory scan time            duration=5.778486967086792 files_not_in_lib=[PosixPath('***', ***)] files_scanned=9435 path=PosixPath('/drive2/Seafile/private/meems')
[1]    71522 segmentation fault (core dumped)  ./tagstudio --debug 2> tagstudio.log

*** inserted by me to censor filenames, was around 35 files

I don't think the coredump is useful without debug symbols but here anyway:

130 merlijn@mimic /drive2/Seafile/data % coredumpctl info 71522
           PID: 71522 (tagstudio)
           UID: 1000 (merlijn)
           GID: 1000 (merlijn)
        Signal: 11 (SEGV)
     Timestamp: Fri 2025-07-11 18:31:35 CEST (48min ago)
  Command Line: ./tagstudio --debug
    Executable: /home/merlijn/Downloads/tagstudio
 Control Group: /user.slice/user-1000.slice/[email protected]/app.slice/vte-spawn-c939a2f3-7bad-457f-adf3-7995e4185011.scope
          Unit: [email protected]
     User Unit: vte-spawn-c939a2f3-7bad-457f-adf3-7995e4185011.scope
         Slice: user-1000.slice
     Owner UID: 1000 (merlijn)
       Boot ID: b1cabe9a5cef4d37b92052e06e247417
    Machine ID: 6ca9a93a9a214972b3505a8bf4b60a66
      Hostname: mimic
       Storage: /var/lib/systemd/coredump/core.tagstudio.1000.b1cabe9a5cef4d37b92052e06e247417.71522.1752251495000000.zst (present)
  Size on Disk: 67.7K
       Message: Process 71522 (tagstudio) of user 1000 dumped core.
                
                Stack trace of thread 71522:
                #0  0x00007f5c135fd74c n/a (libc.so.6 + 0x9774c)
                #1  0x00007f5c135a3dc0 raise (libc.so.6 + 0x3ddc0)
                #2  0x00000000004041f4 n/a (/home/merlijn/Downloads/tagstudio + 0x41f4)
                #3  0x00007f5c1358d6b5 n/a (libc.so.6 + 0x276b5)
                #4  0x00007f5c1358d769 __libc_start_main (libc.so.6 + 0x27769)
                #5  0x000000000040258e n/a (/home/merlijn/Downloads/tagstudio + 0x258e)
                ELF object binary architecture: AMD x86-64
merlijn@mimic /drive2/Seafile/data % 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions