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

MD5.Create() Method causes "BUG: Unreferenced static string to 0" on MetaQuest2 #89864

Closed
krisutofu opened this issue Mar 24, 2024 · 2 comments
Closed

Comments

@krisutofu
Copy link

Tested versions

  • Reproducible in 4.2.1.stable, 4.2.2.rc1, 4.2.2.rc2, 4.3-dev5 (Mono versions)
  • not tested below 4.2 due to different tooling/project setup for XR

System information

Garuda Linux #1 ZEN SMP PREEMPT_DYNAMIC Sat, 16 Mar 2024 17:15:23 +0000 - X11 - Vulkan (Mobile) - integrated Intel(R) Xe Graphics (TGL GT2) () - 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz (8 Threads)

Issue description

Executing MD5.Create() in a C#-Script causes one or multiple of the below errors to appear in the Android Logcat during remote debugging with Meta Quest 2 (Android export template) – depending on the code that was executed before:

USER ERROR: BUG: Unreferenced static string to 0: XRRuntimeVersion
   at: unref (core/string/string_name.cpp:127)
USER ERROR: BUG: Unreferenced static string to 0: XRRuntimeName
   at: unref (core/string/string_name.cpp:127)
USER ERROR: BUG: Unreferenced static string to 0: _compression
   at: unref (core/string/string_name.cpp:127)
USER ERROR: BUG: Unreferenced static string to 0: @export_enum
   at: unref (core/string/string_name.cpp:129)
USER ERROR: BUG: Unreferenced static string to 0: @export_node_path
   at: unref (core/string/string_name.cpp:129)
USER ERROR: BUG: Unreferenced static string to 0: @export_flags
   at: unref (core/string/string_name.cpp:129)
USER ERROR: BUG: Unreferenced static string to 0: @export_placeholder
   at: unref (core/string/string_name.cpp:129)
USER ERROR: BUG: Unreferenced static string to 0: @export
   at: unref (core/string/string_name.cpp:129)
USER ERROR: BUG: Unreferenced static string to 0: @export_multiline
   at: unref (core/string/string_name.cpp:129)
USER ERROR: BUG: Unreferenced static string to 0: @export_range
   at: unref (core/string/string_name.cpp:129)
USER ERROR: BUG: Unreferenced static string to 0: @warning_ignore
   at: unref (core/string/string_name.cpp:129)
USER ERROR: BUG: Unreferenced static string to 0: Variant
   at: unref (core/string/string_name.cpp:127)
USER ERROR: BUG: Unreferenced static string to 0: @export_group
   at: unref (core/string/string_name.cpp:129)
USER ERROR: BUG: Unreferenced static string to 0: ShaderCompilation
   at: unref (core/string/string_name.cpp:127)

Either, there is a bug in the implementation of MD5.Create() on Android which destroys references to static StringNames, a buffer overflow, or something else is off from the Godot side.

Target Framework net8.0 produces the same error.

This incident makes the app crash or terminate itself.

Steps to reproduce

Create a running XR project for Meta Quest 2.
Generate a C# Script.
Add var md5Hasher = System.Security.Cryptography.MD5.Create();.

Minimal reproduction project (MRP)

When opening the project, please add the Godot XR Vendors plugin and install the export template. (Meta Plugin needs to be enabled in the export settings after adding the plugin.)
md5_bug_godot_4.2.1-stable.zip

@krisutofu
Copy link
Author

PS: this seems to be related to the HashAlgorithm class in general. I get the same problem with SHA1 and SHA256.

@raulsntos
Copy link
Member

@raulsntos raulsntos closed this as not planned Won't fix, can't repro, duplicate, stale Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants