Skip to content

[Bug]: Crash when re-enabling "AI" on first column after setting PK on second column #3953

Open

Description

@TheKite0

What did you do?

[DB] Browser for SQLite crashes when re-enabling the AI (Auto Increment) checkbox on the first column, after setting PK (Primary Key) on the second column. In this scenario, the AI checkbox is silently disabled (unchecked) on the first column, but PK remains checked on the second.

Steps to Reproduce:

  1. Create a new table
  2. Add two columns (e.g. id and title)
  3. In the first column (id), check AI → Note: PK is auto-checked as well
  4. In the second column (title), check PK → The AI in the first column is now silently unchecked (but PK remains in the second column)
  5. Now go back to the first column and re-check AI
  6. The application crashes immediately without warning or error message.
n.mov

Crash is 100% reproducible

What did you expect to see?

Either a warning should appear saying AI can only be enabled if that column is the sole primary key or AI should be greyed out / disabled unless PK is active on the same column

What did you see instead?

The application crashes immediately without warning or error message.

DB4S Version

3.13.1

What OS are you seeing the problem on?

MacOS

OS version

Sequoia 15.5

Relevant log output

Process:               DB Browser for SQLite [36691]
Path:                  /Applications/DB Browser for SQLite.app/Contents/MacOS/DB Browser for SQLite
Identifier:            net.sourceforge.sqlitebrowser
Version:               3.13.1 (3.13.1)
OS Version:            macOS 15.5 (24F74)
System Integrity Protection: enabled

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000001
Termination Reason:    SIGNAL 11 Segmentation fault

Crashed Thread:        0  Dispatch queue: com.apple.main-thread
Crash Function:        sqlb::Table::removeKeyFromConstraint(...)

Thread 0 Crashed:
0   DB Browser for SQLite    sqlb::Table::removeKeyFromConstraint(...) + 1123
1   DB Browser for SQLite    EditTableDialog::fieldItemChanged(...) + 6435
2   QtWidgets                QTreeWidgetItem::setData(...) + 1323
...

Prevention against duplicate issues

  • I have searched for similar issues

Activity

  1. mgrojo commented on Jun 16, 2025

    @mgrojo
    Member

    I can't reproduce this with the development branch. Can you confirm this is fixed for you in the nightly? This was probably fixed in e2fcd33.

  2. TheKite0 commented on Jun 16, 2025

    @TheKite0
    Author

    Unfortunately, the bug still persists for me, even with the latest nightly build. It seems that e2fcd33 didn't fully resolve the issue in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions