[Interest] ASSERT: "m_engines.contains(engine)" in file qqmlenginedebugservice.cpp, line 802 qqmlenginedebugservice.cpp: 802

Jérôme Godbout jerome at bodycad.com
Fri Dec 8 19:29:43 CET 2017


I did that for background processing or some sort, but I have hit a
limitation myself:
qmldir singleton are create only once and won't be usable on other
QQmlEngine, C++ singleton you can control and create an instance per
QQmlEngine/thread with the callback, but no luck for those qml singleton on
the scripted side. (Wish it wasn't the case, cause this would have been
awesome to swap object until created/loaded from other thread with it's own
engine wihtout affecting the main ui thread.

Just take care what you do there.

[image: bodycad] <https://www.bodycad.com/>
Jerome Godbout
Software Developer
2035 rue du Haut-Bord, Québec, QC, Canada. G1N 4R7
T:  +1 418 527-1388
E: jerome at bodycad.com
www.bodycad.com

The contents of this email message and any attachments are intended solely
for the addressee(s) and may contain confidential and/or privileged
information and may be legally protected from disclosure. If you are not
the intended recipient of this message or their agent, or if this message
has been addressed to you in error, please immediately alert the sender by
reply email and then delete this message and any attachments. If you are
not the intended recipient, you are hereby notified that any use,
dissemination, copying, or storage of this message or its attachments is
strictly prohibited.

Le contenu de ce message et les pièces jointes sont destinés uniquement
pour le(s) destinataire(s) et peuvent contenir des informations
confidentielles et / ou privilégiées qui peuvent être protégées légalement
contre toute divulgation. Si vous n'êtes pas le destinataire de ce message
ou son agent, ou si ce message vous a été adressé par erreur, s’il vous
plaît avertir immédiatement l'expéditeur par courriel de réponse, puis
supprimer ce message et les pièces jointes. Si vous n'êtes pas le
destinataire prévu, vous êtes par la présente informé que toute
utilisation, diffusion, copie, ou stockage de ce message ou de ses pièces
jointes est strictement interdit.

On Fri, Dec 8, 2017 at 11:32 AM, Alexander Ivash <elderorb at gmail.com> wrote:

> Just in case if anyone care, creation QQmlEngine in UI thread and then
> moving to background thread resolved the issue. Moreover QML debugger
> works with both threads!
>
> 2017-12-08 14:43 GMT+03:00 Alexander Ivash <elderorb at gmail.com>:
> > Well, as I said it seems to be working, at least in very simple
> > scenarios, like reading file & doing JSON.parse from separate thread.
> > So, if this is artificial limitation of QML Debugger, then would be
> > great to get it fixed. Can I at least silence that assert by somehow
> > excluding QQmlEngine in thread from debugging?
> >
> > P.S. Yes, I understand that what I'm doing is against QML ideology
> > (make everything in C++, make UI-only in QML, bind C++ with QML etc.
> > etc. etc.) But sometimes you are just too lazy to write JSON.parse :).
> > Also, I would be more than happy to use existing WorkerScript but with
> > its current limitations it is a bit useless for all the scenarios
> > besides model update)
> >
> > 2017-12-08 14:32 GMT+03:00 Ulf Hermann <ulf.hermann at qt.io>:
> >>> What needs to be done to get rid of this assertion (is it possible at
> >>> all or QmlDebugger is always expect single QQmlEngine? )
> >>
> >>
> >> You can have multiple QML engines attached to the debugger, but the
> current
> >> assumption is indeed that they all live in the GUI thread. This can
> probably
> >> be fixed, but are you sure that you don't hit any other limitations with
> >> this? For example, the type loader also does interesting things with
> threads
> >> and locking.
> >>
> >> br,
> >> Ulf
> >> _______________________________________________
> >> Interest mailing list
> >> Interest at qt-project.org
> >> http://lists.qt-project.org/mailman/listinfo/interest
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20171208/79325241/attachment.html>


More information about the Interest mailing list