Description
Having a DirectEntry(backgroundFocus=1, overflow=1) sets up a hanging event on the Entry which triggers on any text input. When the Entry is destroyed, and then any key is pressed, the engine segfaults (specific way depends on the OS; Linux: python3: built/include/mutexPosixImpl.I:89: ReMutexPosixImpl::~ReMutexPosixImpl(): Assertion 'result == 0' failed.. Windows: window closes after 2-4 key presses. Mac: untested).
This can be fixed with an Entry.ignoreAll(), however due to the obscurity of the bug and difficulty to find it I am reporting it anyway.
Steps to Reproduce
Create this file:
from direct.gui.DirectEntry import DirectEntry
from direct.showbase.ShowBase import ShowBase
entry = DirectEntry(backgroundFocus=1, overflow=1)
entry.destroy()
ShowBase().run()
Then run it and press any key (YMMV since this is slightly harder to trigger on Windows)
Note that both backgroundFocus and overflow are required
Environment
- Operating system: Fedora Linux
- System architecture: x86_64
- Panda3D version: 1.11.0
- Installation method: build from source
- Python version (if using Python): 3.12
- Compiler (if using C++): gcc 13.2.1
Description
Having a
DirectEntry(backgroundFocus=1, overflow=1)sets up a hanging event on the Entry which triggers on any text input. When the Entry is destroyed, and then any key is pressed, the engine segfaults (specific way depends on the OS; Linux:python3: built/include/mutexPosixImpl.I:89: ReMutexPosixImpl::~ReMutexPosixImpl(): Assertion 'result == 0' failed.. Windows: window closes after 2-4 key presses. Mac: untested).This can be fixed with an
Entry.ignoreAll(), however due to the obscurity of the bug and difficulty to find it I am reporting it anyway.Steps to Reproduce
Create this file:
Then run it and press any key (YMMV since this is slightly harder to trigger on Windows)
Note that both
backgroundFocusandoverfloware requiredEnvironment