# createStream using FMOD\_OPENMEMORY on PS4 crashes

**URL:** <https://qa.fmod.com/t/createstream-using-fmod-openmemory-on-ps4-crashes/12716>\
**Category:** FMOD Studio\
**Created:** [September 26, 2016, 5:28pm UTC](https://qa.fmod.com/t/createstream-using-fmod-openmemory-on-ps4-crashes/12716 "2016-09-26T17:28:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamsporka](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/adamsporka/32/594_2.png) [@adamsporka](https://qa.fmod.com/u/adamsporka)\
**Post date:** [September 26, 2016, 5:28pm UTC](https://qa.fmod.com/t/createstream-using-fmod-openmemory-on-ps4-crashes/12716/1 "2016-09-26T17:28:38Z")

</div>

Hi,

I’m trying to call createStream on PS4. The call results in a crash. Visual Studio reports “Segmentation violation encountered at in libfmod.prx”. I’m using PS4 SDK 3.5. I made sure the data I was passing were an image of a valid sound file. I tried several, MP3 and OGG formats. I am running 1.08.12.

```
FMOD::Sound* m_pAudioDataSound;
m_pSampleBankItem->m_nDataLength = {{length of the sound file}}
m_pSampleBankItem->m_pData = {{pointer to the sound file buffer}}
....
....

FMOD_CREATESOUNDEXINFO info;
memset(&info, 0, sizeof(info));
info.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
info.length = m_pSampleBankItem->m_nDataLength;

FMOD_RESULT result;
result = pLowLevel->createStream((const char*)m_pSampleBankItem->m_pData,
  FMOD_OPENMEMORY, &info, &m_pAudioDataSound);

```

Call stack:

– libfmod.prx\_0x00000001BD884000!00000001BD8DE383  
– libfmod.prx\_0x00000001BD884000!00000001BD99080B  
– libfmod.prx\_0x00000001BD884000!00000001BD991DA8  
– libfmod.prx\_0x00000001BD884000!00000001BD97765A  
– libfmod.prx\_0x00000001BD884000!00000001BD96F65A  
– {{my calling function}}  
– …

Please can you suggest what to do?

Thanks much,  
Adam

---

<div class="post-metadata">

**Author:** ![nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nick1](https://qa.fmod.com/u/nick1)\
**Post date:** [October 3, 2016, 12:19am UTC](https://qa.fmod.com/t/createstream-using-fmod-openmemory-on-ps4-crashes/12716/2 "2016-10-03T00:19:52Z")

</div>

This was resolved as a stack overflow due to calling createStream inside the PCM read callback of a different stream. The stack for the stream thread can be configured using [FMOD::System::setAdvancedSettings](http://www.fmod.org/documentation/#content/generated/FMOD_System_SetAdvancedSettings.html)
