audinowho / PMDODump

All content generation for PMDO. BEWARE SPOILERS.
MIT License
61 stars 13 forks source link

Segfault on bad music file #433

Open issuebotaudinowho[bot] opened 8 months ago

issuebotaudinowho[bot] commented 8 months ago

Discord: shitpost_sunkern#0 <@292039958829727744>

Playing this track appears to cause a segfault. Re-exporting as OGG from Audacity fixed it.

Running file on it provides the interesting output Ogg data, Theora video instead of the usual Ogg data, Vorbis audio, stereo, 44100 Hz, ~160000 bps. It might be that this file is nonstandard? Either way, there should be a more graceful way of handling this than hard crashing the game

line 23: 71372 Segmentation fault: 11  ./PMDO -dev
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               PMDO [71372]
Path:                  /Users/USER/Documents/*/PMDO
Identifier:            PMDO
Version:               ???
Code Type:             X86-64 (Translated)
Parent Process:        Exited process [71362]
Responsible:           Terminal [60541]
User ID:               501

Date/Time:             2024-02-05 16:56:41.7341 -0500
OS Version:            macOS 12.7.3 (21H1015)
Report Version:        12
Anonymous UUID:        9606F798-9888-15F3-4801-3ED947DE6729

Sleep/Wake UUID:       CD22BA92-9CA9-4422-B955-CA7F08104460

Time Awake Since Boot: 140000 seconds
Time Since Wake:       4923 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [71372]

VM Region Info: 0 is not in any region.  Bytes before following region: 4333154304
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                      10246b000-102c9f000    [ 8400K] r-x/r-x SM=COW  ...uments/*/PMDO

image

audinowho commented 8 months ago

The failure occurs at FAudio.stb_vorbis_get_info, which is a wrapper of stb_vorbis_get_info https://github.com/nothings/stb/blob/master/stb_vorbis.c#L4305