Skip to content

[Bug]: Crash when closing program without an open library #480

Closed
@Leseratte10

Description

@Leseratte10

Checklist

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

TagStudio Version

Fork of TagStudio 9.4.0 (see #479) to support Ubuntu 20.04

Operating System & Version

Ubuntu 20.04

Description

I noticed that when I open TagStudio and then close it again without creating a library, it crashes. Same goes when I click File -> Close Library.

Expected Behavior

Trying to close a nonexistant library shouldn't crash the program.

Steps to Reproduce

  1. Open program without a library defined.
  2. Either click File -> Close Library or just close the program.
  3. Notice exceptions / crash in the log.

Logs

$ ./tagstudio 
2024-09-09 19:21:46 [info     ] resources registered           count=4
2024-09-09 19:21:46 [info     ] Config File not specified, using default one filename=/home/myusername/.config/TagStudio/TagStudio.ini
qt.multimedia.ffmpeg.libsymbolsresolver: Couldn't load OpenSsl library
2024-09-09 19:21:48 [info     ] update_widgets                 selected=[]
Traceback (most recent call last):
  File "src/qt/ts_qt.py", line 326, in <lambda>
  File "src/qt/ts_qt.py", line 571, in close_library
AttributeError: 'Library' object has no attribute 'library_dir'


Traceback (most recent call last):
  File "tag_studio.py", line 66, in main
  File "src/qt/ts_qt.py", line 491, in start
    self.shutdown()
  File "src/qt/ts_qt.py", line 556, in shutdown
    if self.lib and self.lib.library_dir:
                    ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Library' object has no attribute 'library_dir'

TagStudio Frontend (Qt) Crashed! Press Enter to Continue...
QThread: Destroyed while thread is still running
Abgebrochen (Speicherabzug geschrieben)

Metadata

Metadata

Assignees

No one assigned

    Labels

    System: LinuxFor Linux/BSD distributionsType: 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