godotengine / godotengine/godot

AudioStreamRecorder with AudioStreamMicrophone turns off autoplay when the icon.svg is missing with a StaticBody3D node present

Open
#90,287 2 comments 0 reactions 0 assignees View on GitHub
bug needs testing
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

v4.3.dev3
v4.2.1.stable

### System information

Godot v4.3.dev (b09f793f5) - NixOS #1-NixOS SMP PREEMPT_DYNAMIC Wed Apr 3 13:11:59 UTC 2024 - Wayland - GLES3 (Compatibility) - Mesa Intel(R) Graphics (ADL GT2) - 12th Gen Intel(R) Core(TM) i5-1240P (16 Threads)

### Issue description

I had two different projects, one where the AudioStreamMicrophone worked (it plays on startup and you can hear it in reflected into your headphones), and one where the playing option would automatically switch off about 1.5 seconds after startup.

The differences remained after I deleted almost every single node from both projects until I found two tiny differences that should not have anything to do with it.

If the system is going to involuntarily switch off the `playing` flag in the UI after you had set the node as `autoplay` because of something it doesn't like, it should definitely report an error. (Not even a `finished()` signal is emitted when the checkbox is cleared.)

### Steps to reproduce

Step 1:
Run this project and the microphone will play back to the speakers.

Step 2:
Close project, delete `killedaudstream2/icon.svg` and re-open the project.

The Project Manager (not the project) will print the following error on the command line.
> ERROR: Error opening file '/home/julian/junk/killedaudstream2/icon.svg'.
> at: load_image (core/io/image_loader.cpp:90)

Run the project, and there will be no sound from the microphone in the speakers. If you view the remote debugger and quickly select the `AudioStreamRecorder` node, you can see the `Playing` option above the `Autoplay` in the Inspector turn itself off for no reported reason.

Step 3:
Delete the `StaticBody3D` node and run again. Now the microphone works again. Most other nodes don't affect it. It's just the `StaticBody3D` that seems to cause the microphone to switch off, which is of course ridiculous.

### Minimal reproduction project (MRP)

[killedaudstream2.zip](https://github.com/godotengine/godot/files/14891937/killedaudstream2.zip)

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with killedaudstream2.zip, first with icon.svg present and then missing, while comparing runs with and without the StaticBody3D node. Start from the reported error in core/io/image_loader.cpp:90 and trace why AudioStreamRecorder's Playing state changes; done means the microphone remains playable or the failure is reported clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
audio-video-rtc, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.