Sound object crashes sometimes when I try to load another .wav with load_resource. Seems like it depends on wav size.
wav = sys.load_resource("/_resources/sound/" .. type .. ".wav")
soundSlot = go.get("sound#psound", "sound")
resource.set_sound(soundSlot, wav)
sound.play("sound#psound", {delay = 0, gain = settings.sound, pan = 0, speed = 1, loop = looping})
ERROR:CRASH: CALL STACK:
ERROR:CRASH: 0 0x7FF7AAD852C0 memcpy_repmovs d:\agent\_work\4\s\src\vctools\crt\vcruntime\src\string\amd64\memcpy.asm:114
ERROR:CRASH: 1 0x7FF7AAA30EB0 dmSoundCodec::WavDecodeStream D:\a\defold\defold\engine\sound\src\decoders\decoder_wav.cpp:222
ERROR:CRASH: 2 0x7FF7AAAC05A0 dmSoundCodec::Decode D:\a\defold\defold\engine\sound\src\sound_codec.cpp:101
ERROR:CRASH: 3 0x7FF7AAA48950 dmSound::MixInstance D:\a\defold\defold\engine\sound\src\sound.cpp:1161
ERROR:CRASH: 4 0x7FF7AAA48DC0 dmSound::MixInstances D:\a\defold\defold\engine\sound\src\sound.cpp:1272
ERROR:CRASH: 5 0x7FF7AAA454B0 dmSound::SoundThread D:\a\defold\defold\engine\sound\src\sound.cpp:1466
ERROR:CRASH: 6 0x7FFF35857020 BaseThreadInitThunk <unknown>:0
ERROR:CRASH: 7 0x7FFF359C2630 RtlUserThreadStart <unknown>:0
ERROR:CRASH:
INFO:CRASH: Successfully wrote MiniDump to file: C:\Users\....\AppData\Roaming\Defold/_crash.dmp
crash_dmp.zip (19.1 KB)