Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected pop of Start page and crash when Start page is closed #16616

Open
2 tasks done
pinkavaj opened this issue Sep 17, 2024 · 18 comments
Open
2 tasks done

Unexpected pop of Start page and crash when Start page is closed #16616

pinkavaj opened this issue Sep 17, 2024 · 18 comments
Labels
Mod: Start Related to the Start Workbench Status: Needs confirmation Missing confirmation from other testers Status: Needs diagnosis Missing diagnosis from devs Type: Bug This issue or PR is related to a bug Type: Crash For issues describing crashes or PRs fixing one

Comments

@pinkavaj
Copy link
Contributor

pinkavaj commented Sep 17, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

The Freecad exhibits unexpected behaviour by switching from current document to Start page and crashes when the Start page is closed.

Reproduction: (See comments for more precise instructions!)

  • start Freecad
  • create new document and select it in tree view
  • go to Property View dialog
  • Edit any value and finish the editing by enter
  • pres tab 2x -> the Start page tab becomes visible (WIERD)
  • close the Start page -> crash

By the second , button on Status bar is activated (gets focus), but the focus is lost once the Start page pops-up.

Note: when the original document is selected (becomes visible) and then the tab with Start page is closed, there is no crash.

Full version info

OS: Arch Linux (KDE)
Word size of FreeCAD: 64-bit
Version: 1.1.0dev.38779 (Git)
Build type: Release
Branch: makepkg
Hash: 4f83896290d8ffbab9b563872dfb281fbfcbc5af
Python 3.12.6, Qt 6.7.2, Coin 4.0.3, Vtk 9.3.1, OCC 7.8.1
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: FreeCAD Dark.qss/FreeCAD Dark/

Subproject(s) affected?

None

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@pinkavaj pinkavaj added the Status: Needs triage Missing triage label Sep 17, 2024
@pinkavaj pinkavaj changed the title Unexpected pop or Start page and crash when Start page is closed Unexpected pop of Start page and crash when Start page is closed Sep 17, 2024
@pinkavaj
Copy link
Contributor Author

pinkavaj commented Sep 17, 2024

Backtrack:

Program received signal SIGSEGV, Segmentation fault.
#0  /usr/lib/libc.so.6( 0x3d1d0) [0x97a61d0]
#1  /usr/lib/libQt6Widgets.so.6( 0x2b3f9a) [0x81f1f9a]
#2  /usr/lib/libQt6Widgets.so.6( 0x2b4eab) [0x81f2eab]
#3  0x81f5b78 in QMdiArea::resizeEvent(QResizeEvent*) from /usr/lib/libQt6Widgets.so.6 0x298
#4  0x808b0b7 in QWidget::event(QEvent*) from /usr/lib/libQt6Widgets.so.6 0x977
#5  0x8122a78 in QFrame::event(QEvent*) from /usr/lib/libQt6Widgets.so.6 0x38
#6  0x8ff1ef8 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) from /usr/lib/libQt6Core.so.6 0x118
#7  0x803a8bc in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/libQt6Widgets.so.6 0x8c
#8  0x4f12139 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad/lib/libFreeCADGui.so 0x99
#9  0x8ff2aa8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/libQt6Core.so.6 0x158
#10  0x808072f in QWidgetPrivate::setGeometry_sys(int, int, int, int, bool) from /usr/lib/libQt6Widgets.so.6 0x25f
#11  0x8081a92 in QWidget::setGeometry(QRect const&) from /usr/lib/libQt6Widgets.so.6 0x1b2
#12  /usr/lib/libQt6Widgets.so.6( 0x1e371b) [0x812171b]
#13  /usr/lib/libQt6Widgets.so.6( 0x1e3d7c) [0x8121d7c]
#14  /usr/lib/libQt6Widgets.so.6( 0x2b6944) [0x81f4944]
#15  /usr/lib/libQt6Widgets.so.6( 0x2b6cb8) [0x81f4cb8]
#16  0x81f4fdb in QMdiArea::viewportEvent(QEvent*) from /usr/lib/libQt6Widgets.so.6 0x21b
#17  0x8ff1ef8 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) from /usr/lib/libQt6Core.so.6 0x118
#18  0x803a8bc in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/libQt6Widgets.so.6 0x8c
#19  0x4f12139 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad/lib/libFreeCADGui.so 0x99
#20  0x8ff2aa8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/libQt6Core.so.6 0x158
#21  0x820427e in QMdiSubWindow::closeEvent(QCloseEvent*) from /usr/lib/libQt6Widgets.so.6 0xde
#22  0x808abbc in QWidget::event(QEvent*) from /usr/lib/libQt6Widgets.so.6 0x47c
#23  0x803a8cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/libQt6Widgets.so.6 0x9c
#24  0x4f12139 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad/lib/libFreeCADGui.so 0x99
#25  0x8ff2aa8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/libQt6Core.so.6 0x158
#26  0x80858e3 in QWidgetPrivate::handleClose(QWidgetPrivate::CloseMode) from /usr/lib/libQt6Widgets.so.6 0x143
#27  /usr/lib/libQt6Core.so.6( 0x1a35ea) [0x90505ea]
#28  0x824fc44 in QTabBarPrivate::closeTab() from /usr/lib/libQt6Widgets.so.6 0xd4
#29  /usr/lib/libQt6Core.so.6( 0x1a3397) [0x9050397]
#30  /usr/lib/libQt6Widgets.so.6( 0x21064b) [0x814e64b]
#31  /usr/lib/libQt6Widgets.so.6( 0x210b48) [0x814eb48]
#32  0x815b58e in QAbstractButton::mouseReleaseEvent(QMouseEvent*) from /usr/lib/libQt6Widgets.so.6 0xde
#33  0x808b376 in QWidget::event(QEvent*) from /usr/lib/libQt6Widgets.so.6 0xc36
#34  0x803a8cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/libQt6Widgets.so.6 0x9c
#35  0x803fe59 in QApplication::notify(QObject*, QEvent*) from /usr/lib/libQt6Widgets.so.6 0x10f9
#36  0x4f12139 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad/lib/libFreeCADGui.so 0x99
#37  0x8ff2aa8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/libQt6Core.so.6 0x158
#38  0x8031f9d in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) from /usr/lib/libQt6Widgets.so.6 0x21d
#39  /usr/lib/libQt6Widgets.so.6( 0x1635c2) [0x80a15c2]
#40  /usr/lib/libQt6Widgets.so.6( 0x164c20) [0x80a2c20]
#41  0x803a8cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/libQt6Widgets.so.6 0x9c
#42  0x4f12139 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad/lib/libFreeCADGui.so 0x99
#43  0x8ff2aa8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/libQt6Core.so.6 0x158
#44  0x87c5140 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) from /usr/lib/libQt6Gui.so.6 0x8d0
#45  0x8834724 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/libQt6Gui.so.6 0x304
#46  /usr/lib/libQt6Gui.so.6( 0x6041e4) [0x8c511e4]
#47  /usr/lib/libglib-2.0.so.0( 0x5d299) [0xaeb9299]
#48  /usr/lib/libglib-2.0.so.0( 0xbfec7) [0xaf1bec7]
#49  /usr/lib/libglib-2.0.so.0(g_main_context_iteration 0x35) [0xaeb8795]
#50  0x92552bd in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/libQt6Core.so.6 0x8d
#51  0x8ffcf66 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/libQt6Core.so.6 0x1a6
#52  0x8ff711d in QCoreApplication::exec() from /usr/lib/libQt6Core.so.6 0x8d
#53  0x4e1feb0 in Gui::Application::runApplication() from /usr/lib/freecad/lib/libFreeCADGui.so 0xc40
#54  freecad( 0x7d7a) [0x10fd7a]
#55  /usr/lib/libc.so.6( 0x25e08) [0x978ee08]
#56  /usr/lib/libc.so.6(__libc_start_main 0x8c) [0x978eecc]
#57  freecad( 0x81e5) [0x1101e5]
```

@pinkavaj
Copy link
Contributor Author

pinkavaj commented Sep 17, 2024

valgrind --trace-children=yes --error-limit=no --track-origins=yes --num-callers=100 freecad output, note the FreeCad did not crashes with such crazy valgrind configuration.

@pinkavaj
Copy link
Contributor Author

valgrind-log.txt

@luzpaz
Copy link
Contributor

luzpaz commented Sep 17, 2024

Thanks for the super thorough bug report 👍

@luzpaz luzpaz added Type: Bug This issue or PR is related to a bug Status: Needs confirmation Missing confirmation from other testers Type: Crash For issues describing crashes or PRs fixing one Mod: Start Related to the Start Workbench Status: Needs diagnosis Missing diagnosis from devs and removed Status: Needs triage Missing triage labels Sep 17, 2024
@xtemp09
Copy link
Contributor

xtemp09 commented Sep 18, 2024

go to Property View dialog

Data tab?

Edit any value and finish the editing by
pres 2x -> the Start page tab becomes visible (WIERD)

What is that? My first thought was "press Enter twice," but it does not give this result. "press the second edit box(?)", "type "2x"?"

@pinkavaj
Copy link
Contributor Author

go to Property View dialog

Data tab?

Edit any value and finish the editing by
pres 2x -> the Start page tab becomes visible (WIERD)

What is that? My first thought was "press Enter twice," but it does not give this result. "press the second edit box(?)", "type "2x"?"

Ahhh, sorry fixed. I put the key in <..>, but that resulted in (invalid) HTLM ...

@xtemp09
Copy link
Contributor

xtemp09 commented Sep 18, 2024

I cannot reproduce.

OS: Ubuntu 24.04.1 LTS (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 1.1.0dev.38740 (Git)
Build type: Debug
Branch: master
Hash: b4923d1c584a4dce794d91a4b090a5293569223a
Python 3.12.3, Qt 5.15.13, Coin 4.0.2, Vtk , OCC 7.6.3
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: unset/FreeCAD Classic/Qt default
OS: Windows 10 build 19045
Word size of FreeCAD: 64-bit
Version: 1.1.0dev.38728 (Git)
Build type: Release
Branch: main
Hash: 9de78e27f4148e8032863788a9804486e769388b
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: Russian/Russia (ru_RU)
Stylesheet/Theme/QtStyle: unset/FreeCAD Classic/Qt default

@pinkavaj
Copy link
Contributor Author

The same code with Qt5 5.15.15 does not crash for mee, seems Qt6 related. Can someone pls verify that?

@pinkavaj
Copy link
Contributor Author

@xtemp09 Can you pls test again with the following (updated) instructions:

  • Do equivalent of rm -rf ~/.config/FreeCAD ~/.cache/FreeCAD ~/.local/share/FreeCAD
  • Start FreeCad
  • Select Dark theme in the initial screen -> click done
  • Go to Edit -> Preferences -> Tree view and Propery view mode -> select Independent -> Ok
  • Restart dialog pops-up -> click OK, restart the FreeCad
  • start FreeCad
  • Create new document
  • Select the document in TreeView
  • Go to Property View and start editing Label, finished the editing with Enter
  • Press Tab Tab (2x tab key) -> Start page should pop-up (unexpected)
  • Close the Start page -> crash

@xtemp09
Copy link
Contributor

xtemp09 commented Sep 20, 2024

@pinkavaj, still no crash.

Start page should pop-up (unexpected)

Why on Earth activation of the Start page is unexpected? The tab receives keyboard focus, therefore activates, it happens eveywhere all the time.

OS: Ubuntu 24.04.1 LTS (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 1.1.0dev.38740 (Git)
Build type: Debug
Branch: master
Hash: b4923d1c584a4dce794d91a4b090a5293569223a
Python 3.12.3, Qt 5.15.13, Coin 4.0.2, Vtk , OCC 7.6.3
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: FreeCAD Dark.qss/FreeCAD Dark/Fusion
OS: Windows 10 build 19045
Word size of FreeCAD: 64-bit
Version: 1.1.0dev.38728 (Git)
Build type: Release
Branch: main
Hash: 9de78e27f4148e8032863788a9804486e769388b
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: Russian/Russia (ru_RU)
Stylesheet/Theme/QtStyle: FreeCAD Dark.qss/FreeCAD Dark/Fusion

@xtemp09
Copy link
Contributor

xtemp09 commented Sep 20, 2024

When Qt 6.7.3 is released, I'll try to reproduce the crash with it.

@pinkavaj
Copy link
Contributor Author

@pinkavaj, still no crash.

Start page should pop-up (unexpected)

Why on Earth activation of the Start page is unexpected? The tab receives keyboard focus, therefore activates, it happens eveywhere all the time.

Thx for verification, really seems Qt6 related.

Hmm, the activation of Start page does not hapend to me when I build with Qt5. The tab just jumps over the navigation elements, I need to press enter or click to activate them. IMHO just pressing tab key (on keyboard) should not change the active tab on window, especially not on the one who does not have focus.

Mey-be better to add screencast, gimme few minutes ...

@pinkavaj
Copy link
Contributor Author

@xtemp09 Added screencast. I did more testing and with Qt5, the Start page after pressing tab key button pop-ups and sometime not, but it never crashes and valgrind is not complaining. The bahevior depends on the panels layout

start-issue.mp4

@xtemp09
Copy link
Contributor

xtemp09 commented Sep 22, 2024

@pinkavaj, your video shows normal crashless workflow. The Start page does not always show up because changing mode from Independent to Combined (or back) also changes MainWindow's tab order.

@pinkavaj
Copy link
Contributor Author

@xtemp09 I have update the screencast to make it clear the FreeCad crashes

  • Key strokes are printed on screen
  • Terminal with freecad command output added
  • Use 1.0.0RC1 from distribution (Arch Linux) (instead of my build of main)

The similar behavior can be reproduced with latest main. There is one important difference, with my build of main is needed to press the Tab key 2x, with the "official" 1.0.0RC1 just pressing Enter key pop-ups the Start page. The backtrace after the try of closing the Start page is pretty the same.

freecad-start-crash.mp4

@xtemp09
Copy link
Contributor

xtemp09 commented Sep 24, 2024

I managed to reproduce the crash, though, I have to press Tab 18 times. The crash occures only if I select Dark theme first.

OS: Ubuntu 24.04.1 LTS (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 1.1.0dev.38830 (Git)
Build type: Debug
Branch: master
Hash: b38c42262f58cf0587b627e7a866d3756da34dc4
Python 3.12.3, Qt 6.7.2, Coin 4.0.2, Vtk , OCC 7.6.3
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: unset/FreeCAD Classic/fusion

@pinkavaj
Copy link
Contributor Author

I can reproduce it for Light theme too (but not for classic).

@xtemp09
Copy link
Contributor

xtemp09 commented Sep 26, 2024

Yes, it is reproducible with Qt 6. Qt 5 works fine.

Qt must have undergone some internal changes during the transition from 5 to 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mod: Start Related to the Start Workbench Status: Needs confirmation Missing confirmation from other testers Status: Needs diagnosis Missing diagnosis from devs Type: Bug This issue or PR is related to a bug Type: Crash For issues describing crashes or PRs fixing one
Projects
None yet
Development

No branches or pull requests

3 participants