Hi Felgo,
I spent some time and narrowed, as much as I could, some crashing issue on desktop.
Tested on Linux and Mac(didn’t test on Windows but expect similar issue, not sure).
Tested on Android device and couldn’t replicate it, at least not for now.
In video examples below I tried to show movement patterns, hopefully can help.
This is the example code: Github repo
Video where I show the issue on Linux: http://senkal.vipserv.org/linux-error.ogv
Video with issue on Linux with debug enabled: http://senkal.vipserv.org/linux-error-debug.ogv.(I hit here few times F5, to resume the flow)
Log from crash, last lines(from Mac this time):
Process: Debug-on-destroy-error [4136]
Path: /Users/USER/*/Debug-on-destroy-error.app/Contents/MacOS/Debug-on-destroy-error
Identifier: {hidden}.Debug-on-destroy-error
Version: 0
Code Type: X86-64 (Native)
Parent Process: Qt Creator [3094]
Responsible: Debug-on-destroy-error [4136]
User ID: 501
Date/Time: 2018-01-13 23:56:23.652 +0000
OS Version: Mac OS X 10.12.6 (16G29)
Report Version: 12
Anonymous UUID: 2F5F2F8B-CB5E-0BC6-5349-E558577183EF
Sleep/Wake UUID: 0BAB6584-AA6E-414D-9BCE-DCFBE384EF17
Time Awake Since Boot: 110000 seconds
Time Since Wake: 280 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000000010a213320
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Bus error: 10
Termination Reason: Namespace SIGNAL, Code 0xa
Terminating Process: exc handler [0]
VM Regions Near 0x10a213320:
mapped file 000000010a15e000-000000010a1af000 [ 324K] r--/rwx SM=COW
--> JS garbage collector 000000010a1af000-000000010a5af000 [ 4096K] rw-/rwx SM=COW
JS VM register file 000000010a5af000-000000010a5b0000 [ 4K] ---/rwx SM=NUL
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 ??? 0x000000010a213320 0 + 4464915232
1 org.qt-project.QtQml 0x0000000102eb0a47 QV4::MemoryManager::runGC() + 167
2 org.qt-project.QtQml 0x0000000102eb0944 QV4::MemoryManager::allocString(unsigned long) + 260
3 org.qt-project.QtQml 0x0000000102f876ad QV4::ExecutionEngine::newString(QString const&) + 77
4 org.qt-project.QtQml 0x0000000103007b07 QV4::QObjectWrapper::getProperty(QV4::ExecutionEngine*, QObject*, QQmlPropertyData*, bool) + 2423
5 org.qt-project.QtQml 0x0000000103006fc6 QV4::QObjectWrapper::getQmlProperty(QQmlContextData*, QV4::String*, QV4::QObjectWrapper::RevisionMode, bool*, bool) const + 774
6 org.qt-project.QtQml 0x000000010301f83f QV4::Runtime::method_getProperty(QV4::ExecutionEngine*, QV4::Value const&, int) + 255
7 ??? 0x000000010b07b0cb 0 + 4480020683
8 org.qt-project.QtQml 0x0000000102f91da3 QV4::ExecutionContext::simpleCall(QV4::Scope&, QV4::CallData*, QV4::Function*) + 483
9 org.qt-project.QtQml 0x0000000102fb176a 0x102e99000 + 1148778
10 org.qt-project.QtQml 0x000000010301ec5e QV4::Runtime::method_callProperty(QV4::ExecutionEngine*, int, QV4::CallData*) + 798
11 ??? 0x000000010b0734bb 0 + 4479988923
12 org.qt-project.QtQml 0x0000000102f91da3 QV4::ExecutionContext::simpleCall(QV4::Scope&, QV4::CallData*, QV4::Function*) + 483
13 org.qt-project.QtQml 0x0000000102fb176a 0x102e99000 + 1148778
14 org.qt-project.QtQml 0x000000010301ec5e QV4::Runtime::method_callProperty(QV4::ExecutionEngine*, int, QV4::CallData*) + 798
15 ??? 0x000000010b06867e 0 + 4479944318
16 org.qt-project.QtQml 0x0000000102f91da3 QV4::ExecutionContext::simpleCall(QV4::Scope&, QV4::CallData*, QV4::Function*) + 483
17 org.qt-project.QtQml 0x00000001030b7465 QQmlJavaScriptExpression::evaluate(QV4::CallData*, bool*, QV4::Scope&) + 597
18 org.qt-project.QtQml 0x0000000103052f68 QQmlBoundSignalExpression::evaluate(void**) + 1128
19 org.qt-project.QtQml 0x000000010305374d 0x102e99000 + 1812301
20 org.qt-project.QtQml 0x000000010309a245 QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) + 757
21 org.qt-project.QtCore 0x000000010357042d QMetaObject::activate(QObject*, int, int, void**) + 125
22 org.qt-project.QtQml 0x00000001030cde9d 0x102e99000 + 2313885
23 org.qt-project.QtQml 0x0000000103049899 QQmlComponentPrivate::complete(QQmlEnginePrivate*, QQmlComponentPrivate::ConstructionState*) + 73
24 org.qt-project.QtQml 0x0000000103047519 QQmlComponentPrivate::completeCreate() + 41
In general I could have removed more JS function from the files, but the more I removed the harder was to trigger the crash.
Since my app is much more JS heavy it happens much faster.
Looks like it is a combination of moving player while entities are removed.
In this example I move player by applying forces but with different way or moving(QtQuick animations for example) it also happens.
There are some not called JS functions but, like I said before, preferred to leave them.
Bottom line: looks like it happens only on desktop but don’t want to risk that at some point my mobile builds will be affected.
Can be tricky to replicate, happens on around 25~50 items created and destroyed.
Please check it 2-3 times to be sure that you can’t replicate it.
PS. Don’t ask why on Mac the app starts with “Trial/No license splash screen” when on Linux it doesn’t. Don’t know why.
PS. If you find out that Felgo has nothing to do with the issue, sorry, for my it looked like removeEntity() matters, for example the one in ScreenBottom.qml