c++ allocator error in ios - c++

My iPhone app is using a 3rd party software written in c++.
I have received many error reports with such a stack trace:
0 libsystem_kernel.dylib
__pthread_kill + 8
1
libsystem_pthread.dylib
pthread_kill + 58
2
libsystem_c.dylib
abort + 76
3
libc++abi.dylib
abort_message + 74
4
libc++abi.dylib
default_terminate_handler() + 198
5
libobjc.A.dylib
_objc_terminate() + 228
6
libc++abi.dylib
std::__terminate(void (*)()) + 78
7
libc++abi.dylib
__cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*)
8 libc++abi.dylib
operator new(unsigned long, std::nothrow_t const&)
9
MyApp
new_allocator.h line 91
void std::vector<unsigned char, std::allocator<unsigned char> >::_M_range_insert<char const*>(__gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char> > >, char const*, char const*, std::forward_iterator_tag)
This is the relevant part of the code:
void FileDownloadClient::__OnDataArrival( const char * pData ,int nDataLen )
{
....
m_received_data.insert(m_received_data.end(),pData,pData+nDataLen); //Offending line that crashes
....
}
m_received_data is declared as an instance variable of type std::vector<uint8>
Does anyone know what might be the problem or how to approach this problem at all?
Let me know if you need other information. Thanks a lot for any help!

Related

SwiftUI Crash in AG::LayoutDescriptor::Builder::Emitter

I'm trying to find the problem that causes this crash only on iOS 13.2 - 13.3 devices:
3
AttributeGraph
AG::precondition_failure(char const*, ...) + 192
4
AttributeGraph
AG::LayoutDescriptor::Builder::Emitter<AG::vector<unsigned char, 512ul> >::operator()(AG::LayoutDescriptor::Builder::EqualsItem const&) + 214
5
AttributeGraph
AG::LayoutDescriptor::Builder::Emitter<AG::vector<unsigned char, 512ul> >::operator()(AG::LayoutDescriptor::Builder::EqualsItem const&) + 124
6
AttributeGraph
AG::LayoutDescriptor::Builder::commit(AG::swift::metadata const*) + 152
7
AttributeGraph
AG::LayoutDescriptor::make_layout(AG::swift::metadata const*, AGComparisonMode, AG::LayoutDescriptor::HeapMode) + 320
8
AttributeGraph
AG::(anonymous namespace)::LayoutCache::drain_queue(void*) + 152
Does anyone know what might cause this issue?
Update: I fixed this issue by conforming the rootView to Equatable protocol.

SwiftUI Decode HTML Entities Error: Simultaneous accesses to 0x7ff43ff29b50, but modification requires exclusive access

I get a error when i decode html entites using NSAttributedString. I use Swift 5. I want only html to string. I don't want webview.
SwiftUI Text
Text("It&#39s a party!".decoded)
String Extension
extension String {
var decoded: String {
let attr = try? NSAttributedString(data: Data(utf8), options: [
.documentType: NSAttributedString.DocumentType.html,
.characterEncoding: String.Encoding.utf8.rawValue
], documentAttributes: nil)
return attr?.string ?? self
}
}
Error Log
== AttributeGraph: cycle detected through attribute 123464 ===
=== AttributeGraph: cycle detected through attribute 143224 ===
=== AttributeGraph: cycle detected through attribute 128744 ===
Simultaneous accesses to 0x7ff43ff29b50, but modification requires exclusive access.
Previous access (a modification) started at SwiftUI`LayoutComputer.EngineDelegate.spacing() + 44 (0x7fff566b85dc).
Current access (a modification) started at:
0 libswiftCore.dylib 0x00007fff2f41fe90 swift_beginAccess + 568
1 SwiftUI 0x00007fff566b85b0 LayoutComputer.EngineDelegate.spacing() + 44
2 SwiftUI 0x00007fff56657140 accumulateSpacing #1 (ofChild:) in StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:resizeChildrenWithTrailingOverflow:) + 289
3 SwiftUI 0x00007fff56656bf0 StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:resizeChildrenWithTrailingOverflow:) + 414
4 SwiftUI 0x00007fff561d9d00 specialized ManagedBufferPointer.init(bufferClass:minimumCapacity:makingHeaderWith:) + 296
5 SwiftUI 0x00007fff561da140 specialized closure #2 in HVStack.updateLayoutComputer<A>(rule:layoutContext:children:) + 142
6 SwiftUI 0x00007fff5626cce0 specialized closure #2 in HVStack.updateLayoutComputer<A>(rule:layoutContext:children:) + 41
7 SwiftUI 0x00007fff56278590 partial apply for specialized closure #2 in HVStack.updateLayoutComputer<A>(rule:layoutContext:children:) + 43
8 SwiftUI 0x00007fff561da3e0 specialized static LayoutComputerDelegate.update<A>(_:maybeInPlace:create:) + 136
9 SwiftUI 0x00007fff56139060 specialized StatefulRule<>.updateLayoutComputer<A>(layout:environment:layoutComputers:) + 176
10 SwiftUI 0x00007fff562692a0 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 236
11 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
12 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
13 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
14 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
15 SwiftUI 0x00007fff56030ec0 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 32
16 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
17 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
18 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
19 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
20 SwiftUI 0x00007fff56438660 DynamicLayoutViewChildGeometry.childGeometries.getter + 53
21 SwiftUI 0x00007fff56438740 DynamicLayoutViewChildGeometry.updateValue() + 201
22 SwiftUI 0x00007fff5626e730 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 15
23 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
24 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
25 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
26 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
27 SwiftUI 0x00007fff55f66120 specialized UnaryChildGeometry.parentSize.getter + 28
28 SwiftUI 0x00007fff55f66920 specialized UnaryChildGeometry.value.getter + 91
29 SwiftUI 0x00007fff56035830 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 28
30 SwiftUI 0x00007fff5605a690 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 20
31 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
32 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
33 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
34 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
35 SwiftUI 0x00007fff55f66120 specialized UnaryChildGeometry.parentSize.getter + 28
36 SwiftUI 0x00007fff55f666b0 specialized UnaryChildGeometry.value.getter + 91
37 SwiftUI 0x00007fff56035830 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 28
38 SwiftUI 0x00007fff56040ed0 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 20
39 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
40 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
41 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
42 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
43 SwiftUI 0x00007fff55f66120 specialized UnaryChildGeometry.parentSize.getter + 28
44 SwiftUI 0x00007fff55f666b0 specialized UnaryChildGeometry.value.getter + 91
45 SwiftUI 0x00007fff56035830 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 28
46 SwiftUI 0x00007fff56040ed0 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 20
47 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
48 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
49 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
50 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
51 SwiftUI 0x00007fff55f66120 specialized UnaryChildGeometry.parentSize.getter + 28
52 SwiftUI 0x00007fff55f66440 specialized UnaryChildGeometry.value.getter + 91
53 SwiftUI 0x00007fff56035830 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 28
54 SwiftUI 0x00007fff5604f800 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 20
55 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
56 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
57 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
58 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
59 SwiftUI 0x00007fff55f66120 specialized UnaryChildGeometry.parentSize.getter + 28
60 SwiftUI 0x00007fff55f666b0 specialized UnaryChildGeometry.value.getter + 91
61 SwiftUI 0x00007fff56035830 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 28
62 SwiftUI 0x00007fff56040ed0 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 20
63 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
64 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
65 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
66 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
67 SwiftUI 0x00007fff56030ec0 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 55
68 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
69 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
70 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
71 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
72 SwiftUI 0x00007fff56438660 DynamicLayoutViewChildGeometry.childGeometries.getter + 53
73 SwiftUI 0x00007fff56438740 DynamicLayoutViewChildGeometry.updateValue() + 201
74 SwiftUI 0x00007fff5626e730 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 15
75 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
76 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
77 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
78 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
79 SwiftUI 0x00007fff56030ec0 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 55
80 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
81 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
82 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
83 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
84 SwiftUI 0x00007fff56033ef0 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 63
85 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
86 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
87 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
88 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
89 SwiftUI 0x00007fff568536f0 StyledTextChildGeometry.parentSize.getter + 27
90 SwiftUI 0x00007fff560324b0 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 41
91 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
92 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
93 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
94 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
95 SwiftUI 0x00007fff5608cb10 LayoutPositionQuery.localPosition.getter + 22
96 SwiftUI 0x00007fff5608cbd0 LayoutPositionQuery.updateValue() + 32
97 SwiftUI 0x00007fff5628dab0 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 15
98 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
99 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
100 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
101 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
102 SwiftUI 0x00007fff568cd9e0 AnimatableFrameAttribute.updateValue() + 45
103 SwiftUI 0x00007fff5628e5c0 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 15
104 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
105 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
106 AttributeGraph 0x00007fff4be91884 AG::Subgraph::update(unsigned int) + 781
107 SwiftUI 0x00007fff5693a5f0 GraphHost.runTransaction() + 186
108 SwiftUI 0x00007fff5640e3c0 ViewGraph.updateOutputs(at:) + 90
109 SwiftUI 0x00007fff5689a880 closure #1 in ViewRendererHost.render(interval:updateDisplayList:) + 1305
110 SwiftUI 0x00007fff5688dc20 ViewRendererHost.render(interval:updateDisplayList:) + 340
111 SwiftUI 0x00007fff56a0a640 _UIHostingView.layoutSubviews() + 241
112 SwiftUI 0x00007fff56a0a740 #objc _UIHostingView.layoutSubviews() + 21
113 UIKitCore 0x00007fff24bd69a0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2924
114 QuartzCore 0x00007fff27a7708d -[CALayer layoutSublayers] + 258
115 QuartzCore 0x00007fff27a7d402 CA::Layer::layout_if_needed(CA::Transaction*) + 575
116 QuartzCore 0x00007fff27a89358 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 65
117 QuartzCore 0x00007fff279c8f24 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 496
118 QuartzCore 0x00007fff279ffba0 CA::Transaction::commit() + 783
119 QuartzCore 0x00007fff27a0101c CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 79
120 CoreFoundation 0x00007fff2038b1d1 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
121 CoreFoundation 0x00007fff20385844 __CFRunLoopDoObservers + 547
122 CoreFoundation 0x00007fff2038548f CFRunLoopRunSpecific + 691
123 UIFoundation 0x00007fff23a483bd -[NSHTMLReader _loadUsingWebKit] + 1847
124 UIFoundation 0x00007fff23a49a13 -[NSHTMLReader attributedString] + 22
125 UIFoundation 0x00007fff239c835a _NSReadAttributedStringFromURLOrData + 9439
126 UIFoundation 0x00007fff239c8255 -[NSAttributedString(NSAttributedStringUIFoundationAdditions) initWithData:options:documentAttributes:error:] + 144
(lldb)
NSAttributedString processes the run loop when it parses HTML. You can see it at the call to CFRUnLoopRunSpecific inside of the call to initWithData:. This is a very old problem with NSAttributedString. (I think I first encountered it around OS X 10.5, but I'm sure it's older than that.)
Because it processes the run loop, all kinds of things can happen in the middle of evaluating an HTML string. Timers can fire. Delayed selectors can be called. And in SwiftUI, that means that the UI might try to update. It's a mess. And it generates race conditions inside of apparently safe code. You're actually a bit lucky that Swift catches this kind of problem and crashes. The other common symptoms are even harder to debug ("impossible" deadlocks due to code reentrance is the most common I've encountered).
The short answer is that it's not safe to use NSAttributedString to evaluate HTML synchronously. The docs don't warn you about this, and the name of the method gives no hint about it. But you can't. Some folks will tell you to just make sure you evaluate this on the main thread, but even that doesn't guarantee you won't have really bizarre reentrance bugs if you have anything else pending on the run loop.
You'll need to evaluate this string another way. For example, see Martin R's answer to How do I decode HTML entities in Swift?
For a quick example of how even running this on the main thread can get you in trouble, consider the following code:
func delayed() {
print("Should be last")
}
func dothing() {
// Run this on the next runloop
DispatchQueue.main.async { self.delayed() }
// These should print in order
print("Prints first")
print("It&#39s a party!".decoded)
}
// somewhere on the main queue. There's no background threads needed
dothing()
This outputs:
Prints first
2020-12-20 22:16:07.976101-0500 test[84698:5693517] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600000bb8520> F8BB1C28-BAE8-11D6-9C31-00039315CD46
Should be last
It's a party!
If delayed mutates any state, then things may change out from under you, even though everything is on the main thread.
(The weird error is there because I tested this in didFinishLaunching, and that means that the runloop gets processed before the app finishes launching. That's exactly the kind of bugs you get with this.)

Qt5: Application crash on exit

I have a c++ program written in Qt5 5.14.1.
It also use privoxy source code inside.
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
abort() called
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff6b8e17fa __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff6b99ebc1 pthread_kill + 432
2 libsystem_c.dylib 0x00007fff6b868ab6 __abort + 139
3 libsystem_c.dylib 0x00007fff6b868a2b abort + 135
4 org.qt-project.QtCore 0x000000010b807de9 qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) + 9
5 org.qt-project.QtCore 0x000000010b809534 QMessageLogger::fatal(char const*, ...) const + 202
6 org.qt-project.QtCore 0x000000010b81060d QThread::~QThread() + 189
7 com.yourcompany.xxxxxxxx 0x00000001099cc935 PrivoxyThread::~PrivoxyThread() + 21 (privoxythread.cpp:17)
8 com.yourcompany.xxxxxxxx 0x00000001099cc955 PrivoxyThread::~PrivoxyThread() + 21 (privoxythread.cpp:17)
9 com.yourcompany.xxxxxxxx 0x00000001099cc979 PrivoxyThread::~PrivoxyThread() + 25 (privoxythread.cpp:15)
10 org.qt-project.QtCore 0x000000010ba0f394 QObjectPrivate::deleteChildren() + 228
11 org.qt-project.QtCore 0x000000010ba0f128 QObject::~QObject() + 2088
12 com.yourcompany.xxxxxxxx 0x00000001099e4598 Connection::~Connection() + 88 (connection.cpp:38)
13 com.yourcompany.xxxxxxxx 0x00000001099e4695 Connection::~Connection() + 21 (connection.cpp:38)
14 com.yourcompany.xxxxxxxx 0x00000001099e4819 Connection::~Connection() + 25 (connection.cpp:36)
15 org.qt-project.QtCore 0x000000010ba0f394 QObjectPrivate::deleteChildren() + 228
16 org.qt-project.QtCore 0x000000010ba0f128 QObject::~QObject() + 2088
17 com.yourcompany.xxxxxxxx 0x0000000109b9bd75 ConnectionItem::~ConnectionItem() + 21 (connectionitem.h:26)
18 com.yourcompany.xxxxxxxx 0x0000000109b9a0c5 ConnectionItem::~ConnectionItem() + 21 (connectionitem.h:26)
19 com.yourcompany.xxxxxxxx 0x0000000109b9a0e9 ConnectionItem::~ConnectionItem() + 25 (connectionitem.h:26)
20 org.qt-project.QtCore 0x000000010ba0f394 QObjectPrivate::deleteChildren() + 228
21 org.qt-project.QtCore 0x000000010ba0f128 QObject::~QObject() + 2088
22 com.yourcompany.xxxxxxxx 0x00000001099efe1d ConnectionTableModel::~ConnectionTableModel() + 61 (connectiontablemodel.cpp:8)
23 com.yourcompany.xxxxxxxx 0x00000001099efe65 ConnectionTableModel::~ConnectionTableModel() + 21 (connectiontablemodel.cpp:8)
24 com.yourcompany.xxxxxxxx 0x00000001099efe89 ConnectionTableModel::~ConnectionTableModel() + 25 (connectiontablemodel.cpp:8)
25 org.qt-project.QtCore 0x000000010ba0f394 QObjectPrivate::deleteChildren() + 228
26 org.qt-project.QtWidgets 0x000000010a9f7dae QWidget::~QWidget() + 1006
27 com.yourcompany.xxxxxxxx 0x0000000109a0c789 MainWindow::~MainWindow() + 409 (mainwindow.cpp:166)
28 com.yourcompany.xxxxxxxx 0x0000000109a0c825 MainWindow::~MainWindow() + 21 (mainwindow.cpp:166)
29 com.yourcompany.xxxxxxxx 0x00000001099fefcb main + 1339 (main.cpp:98)
30 libdyld.dylib 0x00007fff6b79a7fd start + 1
Each time I click quit, or Command + Q. It will quit and crash.
Is there a way to determine what cause the issue?
Apple Will pop a window when application crash, this is very annoying.

Clang crash with multiple hierarchical classes and structs?

My project consists of multiple hierarchical structs and classes, the maximum hierarchy of some being around 900. Clang seems to not take this well and crashes. Upon re-compiling, it continues compilation but crashes again with a similar output.
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 clang 0x0000000107e52305 clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(clang::CodeGen::Address, clang::CXXRecordDecl const*, clang::CXXBaseSpecifier const* const*, clang::CXXBaseSpecifier const* const*, bool, clang::SourceLocation) + 117
1 clang 0x000000010706afc1 clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(clang::Expr const*, clang::CodeGen::LValueBaseInfo*, clang::CodeGen::TBAAAccessInfo*) + 929
2 clang 0x000000010704e3cf (anonymous namespace)::ScalarExprEmitter::VisitCastExpr(clang::CastExpr*) + 1103
3 clang 0x000000010704703e clang::CodeGen::CodeGenFunction::EmitScalarInit(clang::Expr const*, clang::ValueDecl const*, clang::CodeGen::LValue, bool) + 494
4 clang 0x0000000107046c4a clang::CodeGen::CodeGenFunction::EmitExprAsInit(clang::Expr const*, clang::ValueDecl const*, clang::CodeGen::LValue, bool) + 186
5 clang 0x0000000107e4fb1b clang::CodeGen::CodeGenFunction::EmitInitializerForField(clang::FieldDecl*, clang::CodeGen::LValue, clang::Expr*) + 139
6 clang 0x0000000107e4f333 EmitMemberInitializer(clang::CodeGen::CodeGenFunction&, clang::CXXRecordDecl const*, clang::CXXCtorInitializer*, clang::CXXConstructorDecl const*, clang::CodeGen::FunctionArgList&) + 451
7 clang 0x0000000107e4e7ba clang::CodeGen::CodeGenFunction::EmitCtorPrologue(clang::CXXConstructorDecl const*, clang::CXXCtorType, clang::CodeGen::FunctionArgList&) + 2762
8 clang 0x0000000107e4d248 clang::CodeGen::CodeGenFunction::EmitConstructorBody(clang::CodeGen::FunctionArgList&) + 264
9 clang 0x0000000107015e6e clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 734
10 clang 0x0000000107e4cf86 clang::CodeGen::CodeGenModule::codegenCXXStructor(clang::CXXMethodDecl const*, clang::CodeGen::StructorType) + 374
11 clang 0x0000000107e4cb77 (anonymous namespace)::ItaniumCXXABI::emitCXXStructor(clang::CXXMethodDecl const*, clang::CodeGen::StructorType) + 807
12 clang 0x0000000106ff88e2 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) + 258
13 clang 0x00000001070c08c7 clang::CodeGen::CodeGenModule::EmitDeferred() + 183
14 clang 0x00000001070c08ef clang::CodeGen::CodeGenModule::EmitDeferred() + 223
15 clang 0x00000001070bd24c clang::CodeGen::CodeGenModule::Release() + 28
16 clang 0x00000001070bd1d8 (anonymous namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&) + 40
17 clang 0x00000001070bcabb clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 59
18 clang 0x0000000106e29e79 clang::ParseAST(clang::Sema&, bool, bool) + 249
19 clang 0x0000000106e2733a clang::FrontendAction::Execute() + 42
20 clang 0x0000000106dec9fc clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 524
21 clang 0x0000000106dea58e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2974
22 clang 0x0000000106dc3b47 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 1591
23 clang 0x0000000106dbed86 main + 5638
24 libdyld.dylib 0x00007fff60a22085 start + 1
From what I've read, the language allows up to 16,384 direct and indirect base classes mentioned here - https://stackoverflow.com/a/20405380/1514605
Is this a clang or design problem?

Qt GroupedDragging crashes

I am using Qt 5.7 under MacOS Sierra, and I was experimenting with Qt's GroupedDragging in docks. However, this crashes my app a lot when I'm moving my docks around. It's quite random so I cant reproduce the error.
This is how I set my dock options:
setDockOptions(DockOptions( QMainWindow::GroupedDragging) );
I already tried enabling and disabling animations, tabbedDocks, etc, nothing seems to work.
Is there anything I can do?
This is the stacktrace:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 org.qt-project.QtWidgets 0x0000000102209fbd QLayout::activateRecursiveHelper(QLayoutItem*) + 13
1 org.qt-project.QtWidgets 0x0000000102209ff8 QLayout::activateRecursiveHelper(QLayoutItem*) + 72
2 org.qt-project.QtWidgets 0x0000000102208f76 QLayout::activate() + 102
3 org.qt-project.QtWidgets 0x00000001022282a6 QWidget::setVisible(bool) + 678
4 org.qt-project.QtWidgets 0x0000000102341fcf QMainWindowLayout::animationFinished(QWidget*) + 2447
5 org.qt-project.QtCore 0x000000010307f923 QMetaObject::activate(QObject*, int, int, void**) + 883
6 org.qt-project.QtCore 0x0000000102e70562 QAbstractAnimationPrivate::setState(QAbstractAnimation::State) + 578
7 org.qt-project.QtCore 0x0000000102e6f223 QAbstractAnimation::setCurrentTime(int) + 387
8 org.qt-project.QtCore 0x0000000102e6f058 QAnimationTimer::updateAnimationsTime(long long) + 104
9 org.qt-project.QtCore 0x0000000102e6db67 QUnifiedTimer::updateAnimationTimers(long long) + 295
10 org.qt-project.QtCore 0x0000000102e6ffec QAnimationDriver::advance() + 28
11 org.qt-project.QtCore 0x0000000103078980 QObject::event(QEvent*) + 48
12 org.qt-project.QtWidgets 0x00000001021e8edd QApplicationPrivate::notify_helper(QObject*, QEvent*) + 269
13 org.qt-project.QtWidgets 0x00000001021eb822 QApplication::notify(QObject*, QEvent*) + 5906
14 org.qt-project.QtCore 0x000000010304eaa4 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 164
15 org.qt-project.QtCore 0x00000001030a2ee6 QTimerInfoList::activateTimers() + 1142
16 libqcocoa.dylib 0x00000001056db932 QCocoaEventDispatcherPrivate::activateTimersSourceCallback(void*) + 18