Skip to content

(Bug): Natron crashes after repeatedly opening and closing a custom pypanel with a simple QPushButton #1029

Open
@Emmett-Brown82

Description

@Emmett-Brown82

Make sure to follow our issue report guidelines

  • I'm using the latest version of Natron (not required but recommended)
  • I've restarted Natron and the issue persists
  • I've run Natron via the command line and the issue persists
  • I've followed the contributing guidelines to the best of my understanding
  • My issue is not on the issue tracker or in a pull request already (go search for it and dig around a little bit!)
  • This bug is reproducible

Natron version

Natron 2.5.0

Operating system

Rocky Linux 8 (as a virtual machine with VMWare Workstation 17.5.2)

System specs

RAM: 32GB
Processor: AMD Ryzen
Graphics Card: Nvidia RTX 2050

Did you install Natron using the official installer?

  • Yes, I used the official installer
  • No, I installed from a binary archive
  • No, I compiled Natron from sources
  • No, I installed Natron via another method

Custom installation path

/opt/Natron-2.5.0

What were you trying to do?

Hi, i am trying to use the init.py and initGui.py scripts to register a custom pypanel. This custom pypanel only has a QPushButton and i add it through the self.addWidget(self.pushButton) method.

I do a stress test: opening and closing repeatedly the same tab with the button makes Natron crash at the 4th time. This is reproducible in windows and in Rocky linux 8 as well.

There seems to be a problem with the memory management between PySide 1.2.4 (Qt 4.8.7) and Python 3.10.5 (the one that ships with Natron 2.5.0)

The backtrace calls at some point the focusChanged signal of the QApplication. Seems the problem is there.

What did you expect to happen? What happened instead?

(C) 2018-2022 The Natron developers
(C) 2013-2018 INRIA and Alexandre Gauthier-Foichat

Use the --help or -h option to print usage.<<<
Info: init.py script found and loaded at /home/mmcfly/mcfly/mcfly/engine_provider/engine_plugins/natronlib/init.py
Info: initGui.py script found and loaded at /home/mmcfly/mcfly/mcfly/engine_provider/engine_plugins/natronlib/initGui.py
Caught segmentation fault (SIGSEGV) from thread Main(0x252eb50), faulty address is 0x7fd21ba5be07 from 0xf4240
Backtrace:
[Frame 1]: /lib64/libstdc++.so.6(__dynamic_cast+0x27) [0x7fd21ba5be07]
[Frame 2]: /lib64/libstdc++.so.6(__dynamic_cast+0x27) [0x7fd21ba5be07]
[Frame 3]: /opt/Natron-2.50/bin/Natron() [0x85adfd]
[Frame 4]: /opt/Natron-2.50/bin/Natron() [0x85aeb9]
[Frame 5]: /opt/Natron-2.50/bin/Natron() [0x85af3e]
[Frame 6]: /opt/Natron-2.50/bin/../lib/libQtCore.so.4(_ZN11QMetaObject8activateEP7QObjectPKS_iPPv+0x700) [0x7fd21c391530]
[Frame 7]: /opt/Natron-2.50/bin/../lib/libQtGui.so.4(ZN12QApplication12focusChangedEP7QWidgetS1+0x3e) [0x7fd21c856a1e]
[Frame 8]: /opt/Natron-2.50/bin/../lib/libQtGui.so.4(_ZN7QWidget8setFocusEN2Qt11FocusReasonE+0x1a2) [0x7fd21c8a48f2]
[Frame 9]: /opt/Natron-2.50/bin/Natron() [0x621c0d]
[Frame 10]: /opt/Natron-2.50/bin/../lib/libQtGui.so.4(_ZN7QWidget5eventEP6QEvent+0x19e) [0x7fd21c8a8bce]
[Frame 11]: /opt/Natron-2.50/bin/../lib/libQtGui.so.4(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x7d) [0x7fd21c85769d]
[Frame 12]: /opt/Natron-2.50/bin/../lib/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0xc3) [0x7fd21c380403]
[Frame 13]: /opt/Natron-2.50/bin/../lib/libQtGui.so.4(ZN19QApplicationPrivate18dispatchEnterLeaveEP7QWidgetS1+0x4a4) [0x7fd21c85c9a4]
[Frame 14]: /opt/Natron-2.50/bin/../lib/libQtGui.so.4(_ZN12QApplication15x11ProcessEventEP7_XEvent+0x121b) [0x7fd21c8cc56b]
[Frame 15]: /opt/Natron-2.50/bin/../lib/libQtGui.so.4(+0x2d7226) [0x7fd21c8f1226]
Natron Version 2.5

Step-by-step reproduction instructions

  1. Start Natron
  2. register a pypanel as specified in the docs in the pane2 (next to properties tab)
  3. close the tab
  4. open it again
  5. close the tab
  6. open it again.
  7. close the tab --> the tab closes and so does Natron, with the provided backtrace dumped to a file or console.

Additional details

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions