-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
g_extern.audio_data.data NULL on ios 8 with retroarch 1.0.0.2 / 1.0.3 #1067
Comments
I have found that it is being initialized correctly by adding some printfs: Sep 30 11:28:26 RetroArch[3036] : BEFORE Initializing g_extern.audio_data.data: 0000000000000000 But that by the time we go to flush, it has been zero'd Sep 30 11:28:26 RetroArch[3036] : Getting ready to flush to g_extern.audio_data.data: 0000000000000000 I also added some printfs in the uninit audio code and it is NOT getting uninitialized early. Any where else that audio_data could be effected? |
https://github.com/libretro/RetroArch/blob/master/retroarch.c#L2536 That's the line that kills it. Sep 30 11:55:00 Bleu RetroArch[3074] : BEFORE Initializing g_extern.audio_data.data: 0000000000000000 |
|
2820ab0b51 Merge pull request #1076 from KhronosGroup/bitcast-pre-330-glsl 63bcbd511e GLSL: Need extension to use bitcast on GLSL < 330. 9f3bebe3d0 Merge pull request #1075 from lifpan/master b11c20fc1d Remove unreasonable assertion for OpTypeImage Sampled parameter. 1a592b7c0f Merge pull request #1067 from cdavis5e/msl-scalar-block-layout 28454facbb MSL: Handle packed matrices. ea5c0ed82f MSL: Fix alignment of packed types. 44f688bf0b Merge pull request #1070 from KhronosGroup/fix-1066 25c74b324e Forget loop variable enables after emitting block chain. 6b010e0cbc Merge pull request #1069 from KhronosGroup/fix-1053 f6f849397e MSL: Re-roll array expressions in initializers. e5fa7edfd6 MSL: Support scalar block layout. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: 2820ab0b51bf5e4187435d904b34e762b988f48b
I'm building my own version for a non-Jailbroken device. I am using the latest git version as of yesterday.
I got lots of crashes that had stacks like this:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000
0 RetroArch 0x00013c88 audio_convert_s16_float_asm (utils_neon.S:63)
1 RetroArch 0x0006b476 audio_convert_s16_to_float_neon (utils.c:159)
2 RetroArch 0x000435d8 rarch_audio_flush (retroarch.c:483)
3 RetroArch 0x00042b46 audio_sample_batch (libretro_version_1.c:125)
To simplify debugging, I disabled the NEON assembly by changing utils.c:283 to
audio_convert_s16_to_float_arm = cpu & RETRO_SIMD_NEON & 0 ?
(notice the & 0)
This got me crashes like this:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000
0 RetroArch 0x0006b4fe audio_convert_s16_to_float_C (utils.c:35)
1 RetroArch 0x00043628 rarch_audio_flush (retroarch.c:483)
2 RetroArch 0x00042b96 audio_sample_batch (libretro_version_1.c:125)
Since that code dereferences out and in, I went back to rarch_audio_flush to look at its arguments. In retroarch.c:484-ish, it is called with:
out = g_extern.audio_data.data and in = data
I added this around line 481
if (!g_extern.audio_data.data)
return false;
to protect against it being NULL as an experiment. At this point, the crashes went away and I got the expected result of the game playing but not having any audio.
The initialization code from driver.c:1107 is wrapped in an rarch_assert, which is surprising because it is definitely NULL here.
Any ideas about how I might fix this problem or provide more useful debugging information?
The text was updated successfully, but these errors were encountered: