Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DirectEntry with both backgroundFocus=1 and overflow=1 leave hanging events after being destroyed, causing a segmentation fault #1650

Open
Wizzerinus opened this issue Apr 28, 2024 · 2 comments

Comments

@Wizzerinus
Copy link
Contributor

Wizzerinus commented Apr 28, 2024

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
@BMaxV
Copy link
Contributor

BMaxV commented Apr 29, 2024

I can't reproduce this.

  • OS: Ubuntu 22.04 jammy
  • Kernel: x86_64 Linux 5.15.0-105-generic
  • panda3d.version: '1.11.0.dev3233'
  • Python 3.10.12
  • install method pip? but I used the prebuilt one.

@ArsThaumaturgis
Copy link
Contributor

Conversely, it reproduces as described on my system.

OS: Ubuntu 22.04.4
Panda version: 1.10.14
Python version: 3.10.12
Install method: Pip, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants