For Thomas: C++ problems in pyqt

39 views
Skip to first unread message

Edward K. Ream

unread,
Apr 1, 2020, 6:37:34 PM4/1/20
to leo-editor
Here's the link. I found it while cleaning out my bookmarks :-)


Maybe it will help find the memory problems in vr3.py.

Edward

Thomas Passin

unread,
Apr 1, 2020, 8:14:04 PM4/1/20
to leo-editor
Thanks, that looks like it could be relevant.

Thomas Passin

unread,
Apr 1, 2020, 9:43:33 PM4/1/20
to leo-editor
According to your linked page, deleteLater() can lead to problems that give the very exception we are seeing. The places it shows up are in code that I inherited from VR/VR2, and just left in because I didn't really know why we needed it but supposed that someone before me had.

Most if not all cases relate to hiding the render pane.  So that gives me a place to look.  Why did someone think that the pane needs deleting after it is hidden?  Hmm...  Well, at least we always get a toolbar that behaves normally even after the error message. That's good!

Edward K. Ream

unread,
Apr 2, 2020, 5:20:01 AM4/2/20
to leo-editor
On Wed, Apr 1, 2020 at 7:14 PM Thomas Passin <tbp1...@gmail.com> wrote:
Thanks, that looks like it could be relevant.

You're welcome.

Edward

Edward K. Ream

unread,
Apr 2, 2020, 5:54:31 AM4/2/20
to leo-editor
On Wed, Apr 1, 2020 at 8:43 PM Thomas Passin <tbp1...@gmail.com> wrote:

According to your linked page, deleteLater() can lead to problems that give the very exception we are seeing. The places it shows up are in code that I inherited from VR/VR2, and just left in because I didn't really know why we needed it but supposed that someone before me had.

Glad you found a likely culprit.

Most if not all cases relate to hiding the render pane.  So that gives me a place to look.  Why did someone think that the pane needs deleting after it is hidden?

My brother and I have a standing joke. We keep saying, "Who wrote this crap? Oh yeah, I did."

Edward

Thomas Passin

unread,
Apr 2, 2020, 8:22:03 AM4/2/20
to leo-editor
As an experiment, I commented out the code for hiding the toolbar.  This was used for "kinds" that didn't need a toolbar.  The main one used to be TEXT, but now we've decided that TEXT nodes ought to have the toolbar after all.  Since I commented out the code, I haven't seen any of these error messages.  This is preliminary and not in the version you just brought into devel by hand.

I'm supposing that the problem will still show itself for other node types where having a toolbar doesn't make sense, like "@pyplot", "@svg"  nodes and the like.  I will probably remove them in a future version, since we won't need many of them, but a few probably need to stay.  So there will be more work ahead on this issue, but maybe this fix will take care of most of the cases.

Edward K. Ream

unread,
Apr 2, 2020, 8:44:05 AM4/2/20
to leo-editor
On Thu, Apr 2, 2020 at 7:22 AM Thomas Passin <tbp1...@gmail.com> wrote:
As an experiment, I commented out the code for hiding the toolbar.  This was used for "kinds" that didn't need a toolbar.  The main one used to be TEXT, but now we've decided that TEXT nodes ought to have the toolbar after all.  Since I commented out the code, I haven't seen any of these error messages.  This is preliminary and not in the version you just brought into devel by hand.

I'm supposing that the problem will still show itself for other node types where having a toolbar doesn't make sense, like "@pyplot", "@svg"  nodes and the like.  I will probably remove them in a future version, since we won't need many of them, but a few probably need to stay.  So there will be more work ahead on this issue, but maybe this fix will take care of most of the cases.

Sounds good.

Edward
Reply all
Reply to author
Forward
0 new messages