Re: Mac OS crash report

2023-08-21 Thread Thiago Macieira via subsurface
On Monday, 21 August 2023 17:52:36 PDT MAX ERENBERG via subsurface wrote:
> VM Region Info: 0x58 is not in any region.  Bytes before following region:
> 140737487097768

> 0   QtCore 0x10b61bdaa
> QCoreApplication::notifyInternal2(QObject*, QEvent*) + 138 
> 1   QtCore0x10b7a7a01 QTimerInfoList::activateTimers() + 961

This is a null-pointer dereference activating a timer. The crash is 0x58 past 
the null pointer. Comparing to my local build and assuming the structures in 
question haven't  changed sizes between those two versions, offset 0x58 shows 
up here:

QObjectPrivate *d = receiver->d_func();
QThreadData *threadData = d->threadData.loadAcquire();

d->threadData is 0x58 bytes into the QObjectPrivate object, which indicates 
that d is the null variable.

This is of course not supposed to happen: this receiver object must be a 
dangling pointer. The problem is that the receiver is coming from 
QTimerInfoList, so it's not the application's fault. Unless it deleted the 
object from another thread, but I don't see any of the threads as being the 
likely culprit and if this happened, there should be a warning.

I have a vague memory of a bug report like this, but I can't recall the 
details. Searching for QTimerInfoList::activateTimers() doesn't find anything 
meaningful. What I do remember is that this function has some convoluted code 
to deal with reentrancy in the same thread, which turned up in a recent 
refactoring but has unfortunately has gone nowhere. I'm not convinced the 
current code works.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering



___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Mac OS crash report

2023-08-21 Thread MAX ERENBERG via subsurface
Not sure if this is helpful but wanted to send incase it is.
Trying to down load a shearwater predix AI, the deep6 excursion with new tech 
lite software won’t 

Translated Report (Full Report Below)
-

Process:   Subsurface [58452]
Path:  /Applications/Subsurface 
5.0.10.213TB.app/Contents/MacOS/Subsurface
Identifier:org.subsurface-divelog
Version:   5.0.10-213-g83e7f537fbac (5.0.10-213-g83e7f537fbac)
Code Type: X86-64 (Native)
Parent Process:launchd [1]
User ID:   501

Date/Time: 2023-08-21 19:47:05.7181 -0500
OS Version:macOS 13.4.1 (22F770820d)
Report Version:12
Anonymous UUID:4BC00A0A-F4DA-EA99-3871-B5D83B1BB2EC

Sleep/Wake UUID:   E7C30B1B-C405-45E8-9061-7722A42002AC

Time Awake Since Boot: 110 seconds
Time Since Wake:   3174 seconds

System Integrity Protection: enabled

Crashed Thread:0  Dispatch queue: com.apple.main-thread

Exception Type:EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:   KERN_INVALID_ADDRESS at 0x0058
Exception Codes:   0x0001, 0x0058

Termination Reason:Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [58452]

VM Region Info: 0x58 is not in any region.  Bytes before following region: 
140737487097768
  REGION TYPESTART - END [ VSIZE] PRT/MAX 
SHRMOD  REGION DETAIL
  UNUSED SPACE AT START
--->  
  shared memory7fecd000-7fece000 [4K] r-x/r-x 
SM=SHM  

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   QtCore 0x10b61bdaa 
QCoreApplication::notifyInternal2(QObject*, QEvent*) + 138
1   QtCore 0x10b7a7a01 
QTimerInfoList::activateTimers() + 961
2   libqcocoa.dylib0x10a7f4885 0x10a7dc000 + 100485
3   CoreFoundation  0x7ff81af25f2a 
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
4   CoreFoundation  0x7ff81af25ecc __CFRunLoopDoSource0 
+ 157
5   CoreFoundation  0x7ff81af25ca5 
__CFRunLoopDoSources0 + 217
6   CoreFoundation  0x7ff81af2492f __CFRunLoopRun + 916
7   CoreFoundation  0x7ff81af23f31 CFRunLoopRunSpecific 
+ 560
8   HIToolbox   0x7ff82499fdad 
RunCurrentEventLoopInMode + 292
9   HIToolbox   0x7ff82499fbbe 
ReceiveNextEventCommon + 657
10  HIToolbox   0x7ff82499f918 
_BlockUntilNextEventMatchingListInModeWithFilter + 64
11  AppKit  0x7ff81dfb85d0 _DPSNextEvent + 858
12  AppKit  0x7ff81dfb747a 
-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] 
+ 1214
13  libqcocoa.dylib0x10a7f4ec5 0x10a7dc000 + 102085
14  QtCore 0x10b625516 
QEventLoop::exec(QFlags) + 486
15  QtWidgets  0x10ab4ff58 QDialog::exec() + 504
16  Subsurface 0x107f8ee26 
MainWindow::on_actionDownloadDC_triggered() + 38
17  Subsurface 0x107eb3fce 
MainWindow::qt_metacall(QMetaObject::Call, int, void**) + 62
18  QtCore 0x10b66c9e7 0x10b5b + 772583
19  QtGui  0x10a0fd6ad 
QAction::activate(QAction::ActionEvent) + 397
20  QtCore 0x10b664e19 
QObject::event(QEvent*) + 729
21  QtWidgets  0x10a8fa067 
QApplicationPrivate::notify_helper(QObject*, QEvent*) + 247
22  QtWidgets  0x10a8fb023 
QApplication::notify(QObject*, QEvent*) + 499
23  QtCore 0x10b61bdca 
QCoreApplication::notifyInternal2(QObject*, QEvent*) + 170
24  QtCore 0x10b61cf00 
QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 800
25  libqcocoa.dylib0x10a7f5f6b 0x10a7dc000 + 106347
26  libqcocoa.dylib0x10a7f667b 0x10a7dc000 + 108155
27  CoreFoundation  0x7ff81af25f2a 
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
28  CoreFoundation  0x7ff81af25ecc __CFRunLoopDoSource0 
+ 157
29  CoreFoundation  0x7ff81af25ca5 
__CFRunLoopDoSources0 + 217
30  CoreFoundation  0x7ff81af2492f __CFRunLoopRun + 916
31  CoreFoundation  0x7ff81af23f31 CFRunLoopRunSpecific 
+ 560
32  HIToolbox   0x7ff82499fdad 
RunCurrentEventLoopInMode + 292
33  HIToolbox   0x7ff82499f9f4