godot: Crash when running sqrt(-1) and log(-1)

Operating system or device - Godot version: Linux. Godot 2.1.4 at commit 171d8a5.

Issue description: Godot crashes when trying to run sqrt(-1) or log(-1).

Steps to reproduce:

  1. Create a new project, add a node and a script.
  2. Put print(sqrt(-1)) or print(log(-1)) under _ready().
  3. Run the scene.
  4. The editor will crash.

Additional info: Terminal output when trying to run the scene:

ERROR: operator[]: SEVERE: Index p_index out of size (size()).
   At: core/vector.h:136.

When I open godot, select the project and click the edit button, the same error appears and the program freezes.

This bug is not on 2.1.3.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (15 by maintainers)

Commits related to this issue

Most upvoted comments

alternatively sqrt and log can return a complex number variant 😄 (just kidding)