Skip to content

Conversation

@eyzdh
Copy link

@eyzdh eyzdh commented Dec 28, 2025

What is the linked issue for this pull request:

QMS-#817

What you have done:

Solve macOS problems.

  1. Crash closing process.
  2. a deactivated Map, when you refresh map reactivates again
  3. a deactivated DEM, when you refresh DEM reactivates again
  4. Routino loss after restart QMS the storage location
  5. Map views that were closed upon restart are restored.

Copy link
Collaborator

@kiozen kiozen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is more change than expected. Imho many of the fixed issues are simply issues because QMapShack crashed when closing. QMapShack will store it's last state properly when closed without crash. And it shouldn't store it's state when crashing, as the state could be the reason for the crash resulting in an unrecoverable situation.

Can you please describe what part fixed the crash. Isolate it from the rest and test if all the other "fixes" are really necessary?

Some code changes seem to be introduced by different formatting/ indentation. This is defined by the file .clang-format. Please make sure all formatting is done by clang-format.

There are many meaningless comments and debug output in German. No one except Germans will understand that stuff. Please strictly use English and avoid meaningless one line comments that state the obvious. Instead document why these changes are necessary. Especially as so far non of them seemed to be necessary.

@eyzdh eyzdh requested a review from kiozen December 29, 2025 15:18
@eyzdh
Copy link
Author

eyzdh commented Dec 29, 2025

I wrote you an e-Mail on Thursday, you know that AI for me because I can't coding. That's why comments Output is in Germany, That's why I need your help more than other people.
I understand you with English and .clan-format, the good thing you can easier see the changes but that is no excuse.
The Problem is, that I think the OMS MacOS community is to small that someone professional will looking for.
Without someone is looking for QMS MacOS, has no future for MacOS and that's why i tried it. Sorry that you has more to do than with a professional programmer.
The Problem is the, when we close QMS, QT will do that together = crash.
My changes was in CmainWindow.h and CmainWindow.cpp and yes the other fixes are necessary for macOS
Fix with closing was In CmainWindow.cpp from line 1600 in CmainWindow.h was little changes.
I will ask what Linux OS do use? I have the possibility to us a VM to try before in Linux.
I nee to say, now works fine for macOS, Nobody has cared about Ges Tickers #817 since it opened because they cannot reproduce the error without macOS.

@eyzdh
Copy link
Author

eyzdh commented Dec 30, 2025

I did a test with qt6.11.0 Beta 1 (works now with macOS26), the original code has the same issue like #817 when closing the app: EXC_BAD_ACCESS (A bad access to memory terminated the process) - just to know and wiith the code what ai did, it works fine but perhaps there is another solution to fix the problem.

@JFritzle
Copy link
Contributor

JFritzle commented Jan 4, 2026

Maybe this call stack helps? QMS created today with MacOSX/build-all.sh script from recent dev branch.

(lldb) process attach --pid 27994
Executable module set to "/Users/user/QMapShack/release/QMapShack.app/Contents/MacOS/QMapShack".
Architecture set to: x86_64h-apple-macosx-.
(lldb) continue
Process 27994 resuming
Process 27994 stopped
* thread #1, name = 'CrBrowserMain', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x68)
    frame #0: 0x0000000110c0abdb QtWidgets`QWidget::hide() + 11
QtWidgets`QWidget::hide:
->  0x110c0abdb <+11>: movq   0x68(%rax), %rax
    0x110c0abdf <+15>: xorl   %esi, %esi
    0x110c0abe1 <+17>: popq   %rbp
    0x110c0abe2 <+18>: jmpq   *%rax
Target 0: (QMapShack) stopped.
(lldb) thread backtrace
* thread #1, name = 'CrBrowserMain', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x68)
  * frame #0: 0x0000000110c0abdb QtWidgets`QWidget::hide() + 11
    frame #1: 0x0000000110ea5820 QtWidgets`QAbstractItemView::updateEditorGeometries() + 1360
    frame #2: 0x0000000110ea5a3b QtWidgets`QAbstractItemView::updateGeometries() + 27
    frame #3: 0x0000000110f276b3 QtWidgets`QTreeView::updateGeometries() + 307
    frame #4: 0x0000000111305aeb QtCore`___lldb_unnamed_symbol10385 + 1579
    frame #5: 0x0000000110ec3218 QtWidgets`QHeaderView::viewportEvent(QEvent*) + 184
    frame #6: 0x00000001112ac110 QtCore`QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) + 240
    frame #7: 0x0000000110bb45c4 QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 292
    frame #8: 0x0000000110bb55cc QtWidgets`QApplication::notify(QObject*, QEvent*) + 508
    frame #9: 0x00000001112ac8d7 QtCore`QCoreApplication::sendEvent(QObject*, QEvent*) + 151
    frame #10: 0x0000000110bfda83 QtWidgets`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 595
    frame #11: 0x0000000110bfd7dd QtWidgets`QWidgetPrivate::inheritStyle() + 509
    frame #12: 0x0000000110bfd9f0 QtWidgets`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 448
    frame #13: 0x0000000110bfd7dd QtWidgets`QWidgetPrivate::inheritStyle() + 509
    frame #14: 0x0000000110bfd9f0 QtWidgets`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 448
    frame #15: 0x0000000110bfd7dd QtWidgets`QWidgetPrivate::inheritStyle() + 509
    frame #16: 0x0000000110bfd9f0 QtWidgets`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 448
    frame #17: 0x0000000110bfd7dd QtWidgets`QWidgetPrivate::inheritStyle() + 509
    frame #18: 0x0000000110bfd9f0 QtWidgets`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 448
    frame #19: 0x0000000110bfd7dd QtWidgets`QWidgetPrivate::inheritStyle() + 509
    frame #20: 0x0000000110bfd9f0 QtWidgets`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 448
    frame #21: 0x0000000110bfd7dd QtWidgets`QWidgetPrivate::inheritStyle() + 509
    frame #22: 0x0000000110bfd9f0 QtWidgets`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 448
    frame #23: 0x0000000110bfd7dd QtWidgets`QWidgetPrivate::inheritStyle() + 509
    frame #24: 0x0000000110bfd9f0 QtWidgets`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 448
    frame #25: 0x0000000110bfd7dd QtWidgets`QWidgetPrivate::inheritStyle() + 509
    frame #26: 0x0000000110bf4db9 QtWidgets`QWidget::setParent(QWidget*, QFlags<Qt::WindowType>) + 1705
    frame #27: 0x0000000110d2f034 QtWidgets`QDockWidget::~QDockWidget() + 52
    frame #28: 0x00000001112fc111 QtCore`QObjectPrivate::deleteChildren() + 145
    frame #29: 0x0000000110bf8a89 QtWidgets`QWidget::~QWidget() + 1289
    frame #30: 0x000000010bb90375 QMapShack`CMainWindow::~CMainWindow() + 3349
    frame #31: 0x000000010be8e376 QMapShack`main + 1270
    frame #32: 0x00007ff81323f345 dyld`start + 1909

Last debug output before crash:
[debug] CDemDraw::saveDemPath(cfg)
Poi path has not been configured. Therefore no CPoiDraw::savePoiPath(cfg) line.

@kiozen
Copy link
Collaborator

kiozen commented Jan 9, 2026

This traceback is without debug info. No chance to get a hint out of that.

I spent quite some time on this code and gave up. This is too much change without proper root cause analysis. I am sure the AI gave explanations but the transcript of the whole process is missing.

From what I read in the code: Shutting down QMapShack crashes because in the dtor of CMainWidget objects are destroyed and that might trigger signals or other stuff on objects already destroyed.

Without knowing the real culprit this is hard to fix the easy way. Probably that was the same conclusion of the AI. As a result it moved some code into the closeEvent() handler. And tried to block many signals in the dtor (in a very stupid, and code excessive way). And it did a lot of other stuff I do not know why. In fact some of it is against the concepts of QMapShack.

The only chance I see: Someone is compiling a proper debug version for MacOS and starts to analyze the tracebacks. When we understand the root cause we can decide on a small and easy fix. Or on the large solution similar to what the AI did, but less brutal code.

Right now this is too much of a change with too much questions on the code. I am sorry but that can not be merged.

@eyzdh
Copy link
Author

eyzdh commented Jan 9, 2026

@kiozen
I have an other maybe better solution, what need I to do?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants