Skip to content

[Bug]: Crashes when try to edit or delete column #4069

@d4v1dx9-art

Description

@d4v1dx9-art

What did you do?

Created a database with the following schema:

CREATE TABLE "Gadget_Measures" (
"userID" INTEGER NOT NULL,
"measureType" INTEGER NOT NULL,
"measureValue" REAL NOT NULL,
PRIMARY KEY("userID"),
FOREIGN KEY("measureType") REFERENCES "Measure_types"("measureTypeID"),
FOREIGN KEY("userID") REFERENCES "Users"("userID")
)

Case1:

Select the "Gadget_Measures" table.
Select Modify Table.
Select "UserID" row.
Select Remove.
Select Yes.
DB Browser for Sqlite crashed.

Case2:

Select the "Gadget_Measures" table.
Select Modify Table.
Select "UserID" row.
Select edit name and changed to "GadgetUserID".
Click on another field
DB Browser for Sqlite crashed.

I think is the same issue as #4061 but I wanted to give for information to the case

What did you expect to see?

In case 1: I expected that the bar column would be removed from the test table.
In Cas2 2: I expected that the name was changed and the system allow me to continue modifying the record

What did you see instead?

In both cases DB Browser for Sqlite crashed.

DB4S Version

3.13.1

What OS are you seeing the problem on?

MacOS

OS version

BigSur 11.7.10 (macOS 11.7.10 (20G1427))

Relevant log output

VM Regions Near 0x1:
--> 
    __TEXT                      10ffb2000-110605000    [ 6476K] r-x/r-x SM=COW  /Applications/DB Browser for SQLite.app/Contents/MacOS/DB Browser for SQLite

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   net.sourceforge.sqlitebrowser 	0x00000001100dce43 sqlb::Table::renameKeyInAllConstraints(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 3971
1   net.sourceforge.sqlitebrowser 	0x000000010fff1774 EditTableDialog::fieldItemChanged(QTreeWidgetItem*, int) + 8324
2   org.qt-project.QtCore         	0x00000001118b483d 0x1116b3000 + 2103357
3   org.qt-project.QtWidgets      	0x0000000110dbb748 0x110ac4000 + 3110728
4   org.qt-project.QtCore         	0x00000001118b497a 0x1116b3000 + 2103674
5   org.qt-project.QtCore         	0x0000000111845e9c QAbstractItemModel::dataChanged(QModelIndex const&, QModelIndex const&, QVector<int> const&) + 60
6   org.qt-project.QtWidgets      	0x0000000110db5d72 0x110ac4000 + 3087730
7   org.qt-project.QtWidgets      	0x0000000110db9612 QTreeWidgetItem::setData(int, int, QVariant const&) + 1442
8   org.qt-project.QtWidgets      	0x0000000110db24c8 0x110ac4000 + 3073224
9   org.qt-project.QtWidgets      	0x0000000110d5e8d3 QStyledItemDelegate::setModelData(QWidget*, QAbstractItemModel*, QModelIndex const&) const + 275
10  org.qt-project.QtWidgets      	0x0000000110d3c601 QAbstractItemView::commitData(QWidget*) + 465
11  org.qt-project.QtCore         	0x00000001118b497a 0x1116b3000 + 2103674
12  org.qt-project.QtWidgets      	0x0000000110d57101 0x110ac4000 + 2699521
13  org.qt-project.QtCore         	0x0000000111886e68 QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) + 248
14  org.qt-project.QtWidgets      	0x0000000110ad4bac QApplicationPrivate::notify_helper(QObject*, QEvent*) + 236
15  org.qt-project.QtWidgets      	0x0000000110ad5fe4 QApplication::notify(QObject*, QEvent*) + 484
16  org.qt-project.QtCore         	0x0000000111886b99 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 169
17  org.qt-project.QtWidgets      	0x0000000110ad22f6 QApplicationPrivate::setFocusWidget(QWidget*, Qt::FocusReason) + 294
18  org.qt-project.QtWidgets      	0x0000000110b0c083 QWidget::setFocus(Qt::FocusReason) + 611
19  org.qt-project.QtWidgets      	0x0000000110ad8810 QApplicationPrivate::giveFocusAccordingToFocusPolicy(QWidget*, QEvent*, QPoint) + 688
20  org.qt-project.QtWidgets      	0x0000000110ad6057 QApplication::notify(QObject*, QEvent*) + 599
21  org.qt-project.QtCore         	0x0000000111886b99 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 169
22  org.qt-project.QtWidgets      	0x0000000110ad557e QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) + 846
23  org.qt-project.QtWidgets      	0x0000000110b2d620 0x110ac4000 + 431648
24  org.qt-project.QtWidgets      	0x0000000110b2c21b 0x110ac4000 + 426523
25  org.qt-project.QtWidgets      	0x0000000110ad4bc0 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 256
26  org.qt-project.QtWidgets      	0x0000000110ad5fe4 QApplication::notify(QObject*, QEvent*) + 484
27  org.qt-project.QtCore         	0x0000000111886b99 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 169
28  org.qt-project.QtGui          	0x00000001110cf19d QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) + 3069
29  org.qt-project.QtGui          	0x00000001110b5a6b QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 235
30  libqcocoa.dylib               	0x0000000113f86a28 0x113f48000 + 256552
31  com.apple.CoreFoundation      	0x00007fff204b8cdc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
32  com.apple.CoreFoundation      	0x00007fff204b8c44 __CFRunLoopDoSource0 + 180
33  com.apple.CoreFoundation      	0x00007fff204b89c4 __CFRunLoopDoSources0 + 242
34  com.apple.CoreFoundation      	0x00007fff204b73ec __CFRunLoopRun + 893
35  com.apple.CoreFoundation      	0x00007fff204b69ac CFRunLoopRunSpecific + 563
36  com.apple.HIToolbox           	0x00007fff287011f3 RunCurrentEventLoopInMode + 292
37  com.apple.HIToolbox           	0x00007fff28700e26 ReceiveNextEventCommon + 284
38  com.apple.HIToolbox           	0x00007fff28700cf3 _BlockUntilNextEventMatchingListInModeWithFilter + 70
39  com.apple.AppKit              	0x00007fff22cc0ad2 _DPSNextEvent + 864
40  com.apple.AppKit              	0x00007fff22cbf2a5 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1364
41  com.apple.AppKit              	0x00007fff22f977b6 -[NSApplication _doModalLoop:peek:] + 301
42  com.apple.AppKit              	0x00007fff23121efe __33-[NSApplication runModalSession:]_block_invoke_2 + 69
43  com.apple.AppKit              	0x00007fff23121ea6 __33-[NSApplication runModalSession:]_block_invoke + 78
44  com.apple.AppKit              	0x00007fff22f95d80 _NSTryRunModal + 100
45  com.apple.AppKit              	0x00007fff23121da1 -[NSApplication runModalSession:] + 128
46  libqcocoa.dylib               	0x0000000113f855c7 0x113f48000 + 251335
47  org.qt-project.QtCore         	0x00000001118836b6 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 502
48  org.qt-project.QtWidgets      	0x0000000110ccd8bf QDialog::exec() + 511
49  net.sourceforge.sqlitebrowser 	0x0000000110053547 MainWindow::editObject() + 1111
50  org.qt-project.QtCore         	0x00000001118b497a 0x1116b3000 + 2103674
51  org.qt-project.QtWidgets      	0x0000000110acbae7 QAction::activate(QAction::ActionEvent) + 311
52  org.qt-project.QtWidgets      	0x0000000110bb7789 0x110ac4000 + 997257
53  org.qt-project.QtWidgets      	0x0000000110bb8b0f QAbstractButton::mouseReleaseEvent(QMouseEvent*) + 271
54  org.qt-project.QtWidgets      	0x0000000110cb255f QToolButton::mouseReleaseEvent(QMouseEvent*) + 15
55  org.qt-project.QtWidgets      	0x0000000110b10022 QWidget::event(QEvent*) + 514
56  org.qt-project.QtWidgets      	0x0000000110cb2d19 QToolButton::event(QEvent*) + 313
57  org.qt-project.QtWidgets      	0x0000000110ad4bc0 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 256
58  org.qt-project.QtWidgets      	0x0000000110ad7a21 QApplication::notify(QObject*, QEvent*) + 7201
59  org.qt-project.QtCore         	0x0000000111886b99 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 169
60  org.qt-project.QtWidgets      	0x0000000110ad557e QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) + 846
61  org.qt-project.Qt

Prevention against duplicate issues

  • I have searched for similar issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions