[Done] invalid memory access with playing mono flac files

Post bugreports for the Windows version here
nsstudios
Enthusiast
Enthusiast
Posts: 274
Joined: Wed Aug 28, 2019 1:01 pm
Location: Serbia
Contact:

[Done] invalid memory access with playing mono flac files

Post by nsstudios »

Hi,

Noticed I'd get random invalid memory access errors when playing flacs, so rendered both mono and stereo flac files of all compression levels to test them out, as well as a little program to automate trying every file with LoadSound.
As far as I can see, all stereo 44.1khz 16bit files work, but all mono ones fail.
I've tried on Windows 10 22h2, pb v6 lts asm and c, x64 and x86.
I didn't try on MacOS or Linux (yet).
Here's the zip with flac files and tester (exe and source), hope it helps.

Not a huge problem considering the files can be losslessly converted to stereo, but I think it would make PB even better.
BTW, is there any official plan to switch sound library to Miniaudio?
Last edited by nsstudios on Sun Oct 22, 2023 6:32 am, edited 1 time in total.
juergenkulow
Enthusiast
Enthusiast
Posts: 540
Joined: Wed Sep 25, 2019 10:18 am

Re: invalid memory access with playing mono flac files

Post by juergenkulow »

[

Code: Select all

; .flac
InitSound()
UseFLACSoundDecoder()
LoadSound(0,"/home/kulow/Downloads/1c0.flac")
; [07:41:19] Waiting For executable To start...
; [07:41:19] Executable type: Linux - x64  (64bit, Unicode)
; [07:41:20] Executable started.
; [07:41:20] [ERROR] Line: 4
; [07:41:20] [ERROR] Invalid memory access.

Code: Select all

;.flac
InitSound()           
UseFLACSoundDecoder() 
LoadSound(0, "D:\1c10.flac")
End 
; [09:48:14] Warte auf den Start des Executable...
; [09:48:14] Executable-Typ: Windows - x64  (64bit, Unicode)
; [09:48:14] Executable gestartet.
; [09:48:14] [ERROR] flac.pb (Zeile: 4)
; [09:48:14] [ERROR] Ungültiger Speicherzugriff. (Lesefehler an der Adresse 4752)

; 0000000140002564 | 0FB70402                 | movzx eax,word ptr ds:[rdx+rax]                               |

; RAX : 0000000000000000
; RDX : 0000000000001290
Edit: Executable-Typ: Windows with x64dbg
Please ask your questions, because switch on the cognition apparatus decides on the only known life in the universe.Wersten :DDüsseldorf NRW Germany Europe Earth Solar System Flake Bubble Orionarm
Milky Way Local_Group Virgo Supercluster Laniakea Universe
nsstudios
Enthusiast
Enthusiast
Posts: 274
Joined: Wed Aug 28, 2019 1:01 pm
Location: Serbia
Contact:

Re: invalid memory access with playing mono flac files

Post by nsstudios »

Thank you for testing, Juergenkulow!
The source I provided should be cross-platform, I hope.
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: invalid memory access with playing mono flac files

Post by luis »

nsstudios wrote: Wed Nov 30, 2022 9:20 pm BTW, is there any official plan to switch sound library to Miniaudio?
Fred mentioned the intention of doing so here -> viewtopic.php?p=586358#p586358

Would be nice because the current one honestly it's pretty ancient, especially on Linux, and doesn't work consistently on the different platforms (some things are supported on one but not the other, the same audio file work on one but not the other, etc.).
"Have you tried turning it off and on again ?"
A little PureBasic review
Fred
Administrator
Administrator
Posts: 16581
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [Done] invalid memory access with playing mono flac files

Post by Fred »

Fixed.
Post Reply