Godot Version
GODOT 4.4.1 .net
Question
Android App is crashing after godot splash screen when c# script is attached to the bare minimal node
I created project in c# godot and now needs to expand the features involving the android platform. Errors showed up, and couln’t find the cause and later created a simple minimal project. Works fine with gd script atached but when i add the c# script to node, it crashes out with errors related to memory leak and others.
Production Step:
Create a control node with 2 color rects child and a label.
Script
using Godot;
using System;
public partial class Main : Control
{
[Export] private ColorRect colorRect;
[Export] private Label title;
public override void _Ready()
{
GD.Print("Hello world");
colorRect.GuiInput += UpdateLabel;
}
private void UpdateLabel(InputEvent @event)
{
title.Text = "This is new text";
}
}
Error logs:
2025-08-16 15:39:53.463 1936-1958 ActivityManager system_server I Displayed com.example.demo/com.godot.game.GodotApp: +10s598ms
2025-08-16 15:39:53.478 26678-26758 eglCodecCommon com.example.demo D setVertexArrayObject: set vao to 2 (2) 0 0
2025-08-16 15:39:53.478 26678-26758 eglCodecCommon com.example.demo D setVertexArrayObject: set vao to 0 (0) 0 0
2025-08-16 15:39:53.652 1774-1796 SurfaceFlinger surfaceflinger W Attempting to set client state on removed layer: Splash Screen com.example.demo#0
2025-08-16 15:39:53.653 1774-1796 SurfaceFlinger surfaceflinger W Attempting to destroy on removed layer: Splash Screen com.example.demo#0
2025-08-16 15:39:54.474 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: current_animation_changed
2025-08-16 15:39:54.474 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:142)
2025-08-16 15:39:54.476 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: autoshrink_changed
2025-08-16 15:39:54.476 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:142)
2025-08-16 15:39:54.476 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: interface_added
2025-08-16 15:39:54.476 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:144)
2025-08-16 15:39:54.477 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: size_changed
2025-08-16 15:39:54.477 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:144)
2025-08-16 15:39:54.479 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: SceneReplicationInterface
2025-08-16 15:39:54.479 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:144)
2025-08-16 15:39:54.481 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: bus_renamed
2025-08-16 15:39:54.481 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:144)
2025-08-16 15:39:54.481 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: bus_layout_changed
2025-08-16 15:39:54.481 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:144)
2025-08-16 15:39:54.482 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: node_changed
2025-08-16 15:39:54.482 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:142)
2025-08-16 15:39:54.483 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: SceneCacheInterface
2025-08-16 15:39:54.483 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:144)
2025-08-16 15:39:54.483 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: ThemeContext
2025-08-16 15:39:54.483 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:144)
2025-08-16 15:39:54.485 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: SceneRPCInterface
2025-08-16 15:39:54.485 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:144)
2025-08-16 15:39:54.486 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: animation_player_changed
2025-08-16 15:39:54.486 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:142)
2025-08-16 15:39:54.486 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: fallback_changed
2025-08-16 15:39:54.487 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:144)
2025-08-16 15:39:54.488 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: animation_libraries_updated
2025-08-16 15:39:54.488 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:142)
2025-08-16 15:39:54.488 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: mixer_applied
2025-08-16 15:39:54.488 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:142)
2025-08-16 15:39:54.488 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: mixer_updated
2025-08-16 15:39:54.488 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:142)
2025-08-16 15:39:54.488 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: animation_list_changed
2025-08-16 15:39:54.488 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:142)
2025-08-16 15:39:54.488 26678-26758 godot com.example.demo E ERROR: BUG: Unreferenced static string to 0: caches_cleared
2025-08-16 15:39:54.488 26678-26758 godot com.example.demo E at: unref (core/string/string_name.cpp:142)
2025-08-16 15:39:54.490 26678-26758 godot com.example.demo E ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketLargeE
2025-08-16 15:39:54.491 26678-26758 godot com.example.demo E at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
2025-08-16 15:39:54.491 26678-26758 godot com.example.demo E ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools12BucketMediumE
2025-08-16 15:39:54.491 26678-26758 godot com.example.demo E at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
2025-08-16 15:39:54.491 26678-26758 godot com.example.demo E ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketSmallE
2025-08-16 15:39:54.491 26678-26758 godot com.example.demo E at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
2025-08-16 15:39:54.491 26678-26758 godot com.example.demo E ERROR: 6 RID allocations of type '23NavMeshGeometryParser3D' were leaked at exit.
2025-08-16 15:39:54.492 26678-26758 libc com.example.demo A FORTIFY: pthread_mutex_lock called on a destroyed mutex (0xcd7e8b90)
2025-08-16 15:39:54.553 1936-8324 WindowManager system_server I WIN DEATH: Window{e28b994 u0 com.example.demo/com.godot.game.GodotApp}
2025-08-16 15:39:54.554 1936-2007 InputDispatcher system_server W channel 'e28b994 com.example.demo/com.godot.game.GodotApp (server)' ~ Consumer closed input channel or an error occurred. events=0x9
2025-08-16 15:39:54.556 1936-2007 InputDispatcher system_server E channel 'e28b994 com.example.demo/com.godot.game.GodotApp (server)' ~ Channel is unrecoverably broken and will be disposed!
2025-08-16 15:39:54.556 1936-8324 InputDispatcher system_server W Attempted to unregister already unregistered input channel 'e28b994 com.example.demo/com.godot.game.GodotApp (server)'
2025-08-16 15:39:54.560 1936-2294 ActivityManager system_server I Process com.example.demo (pid 26678) has died: fore TOP
2025-08-16 15:39:54.581 1936-2294 ActivityManager system_server W Force removing ActivityRecord{bd2c626 u0 com.example.demo/com.godot.game.GodotApp t88}: app died, no saved state
Note: Android export is working fine with gd script but fails in c#, even the bare minimal one. Mono version is as specified according to godot installation. works in the editor mode.
am i missing some settings or stuff that i need to include?