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

Crash when passing empty string to loadFont function #1140

Closed
fireclawthefox opened this issue Apr 7, 2021 · 1 comment
Closed

Crash when passing empty string to loadFont function #1140

fireclawthefox opened this issue Apr 7, 2021 · 1 comment
Labels
Milestone

Comments

@fireclawthefox
Copy link
Contributor

Description

Passing an empty string to the loader.loadFont function results in an out of memory crash.

Steps to Reproduce

from direct.showbase.ShowBase import ShowBase
ShowBase()
loader.loadFont("")

Environment

  • Panda3D version: 1.10.9
  • Installation method: pip
  • Python version: 3.9
rdb added a commit that referenced this issue Apr 8, 2021
@rdb
Copy link
Member

rdb commented Apr 8, 2021

This appears to be a bug in Linux or perhaps the filesystem driver. What's happening is that it tries to load "path/to/current/directory/" + "" (ie. the directory it's in), and then tries to seek to the end to determine the size, but lseek is returning the odd value of 0x7fffffffffffffff.

@rdb rdb added this to the 1.10.10 milestone Apr 8, 2021
@rdb rdb added the bug label Apr 8, 2021
@rdb rdb closed this as completed in addbc8a Apr 8, 2021
rdb added a commit that referenced this issue Apr 9, 2021
See #1140 - I may revert this if someone can demonstrate a compelling use case (for current directory, you can use "." instead), but it seems to have the potential to cause unintuitive behavior.
lachbr pushed a commit to lachbr/panda3d that referenced this issue Jun 16, 2023
lachbr pushed a commit to lachbr/panda3d that referenced this issue Jun 16, 2023
See panda3d#1140 - I may revert this if someone can demonstrate a compelling use case (for current directory, you can use "." instead), but it seems to have the potential to cause unintuitive behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants