# \[Resolved\] Crash trying to play event after reloading bank

**URL:** <https://qa.fmod.com/t/resolved-crash-trying-to-play-event-after-reloading-bank/10999>\
**Category:** FMOD Studio\
**Created:** [June 4, 2013, 8:48pm UTC](https://qa.fmod.com/t/resolved-crash-trying-to-play-event-after-reloading-bank/10999 "2013-06-04T20:48:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![clevijoki](https://avatars.discourse-cdn.com/v4/letter/c/e0b2c6/32.png) [@clevijoki](https://qa.fmod.com/u/clevijoki)\
**Post date:** [June 4, 2013, 8:48pm UTC](https://qa.fmod.com/t/resolved-crash-trying-to-play-event-after-reloading-bank/10999/1 "2013-06-04T20:48:57Z")

</div>

fmodstudio.dll!FMOD::PlaylistInstance::getNextInstrument(FMOD::IDFMOD::InstrumentModel \* instrumentID) Line 1924 C++  
fmodstudio.dll!FMOD::PlaylistInstrumentState::scheduleInstrument(unsigned int localTime, unsigned int localEnd, unsigned int seek) Line 1636 C++  
fmodstudio.dll!FMOD::MultiInstrumentStrategy::startHook(unsigned int time, unsigned int end, unsigned int seek, unsigned int scheduleDelay, bool loop) Line 2116 C++  
fmodstudio.dll!FMOD::PlaylistInstrumentInstance::startHook(unsigned int time, unsigned int end, unsigned int seek, bool loop) Line 2531 C++  
fmodstudio.dll!FMOD::InstrumentInstance::start(unsigned int parentClock, unsigned int time, unsigned int end, unsigned int seek, bool loop) Line 795 C++  
fmodstudio.dll!FMOD::InstrumentInstanceManager::scheduleInstrument(FMOD::InstrumentModel \* instrument, unsigned int time, unsigned int end, unsigned int seek, bool loopOverride, FMOD::InstrumentInstance \* \* instanceOut) Line 3506 C++  
fmodstudio.dll!FMOD::EventInstance::incrementTriggerCount(FMOD::InstrumentTriggerState \* state, const FMOD::Scheduler & scheduler) Line 6697 C++  
fmodstudio.dll!FMOD::ParameterLayoutInstance::scheduleInstrument(const FMOD::IDFMOD::InstrumentModel & id) Line 5821 C++  
fmodstudio.dll!FMOD::ParameterLayoutInstance::start() Line 5618 C++  
fmodstudio.dll!FMOD::EventInstance::start() Line 6078 C++  
fmodstudio.dll!FMOD::Studio::EventInstance::start() Line 3217 C++

0xC0000005: Access violation reading location 0x00000004.

It unloads the bank, loads it again, re-creates the EventDescription, and re-creates the EventInstance without error, but starting the new EventInstance crashes with the above callstack

---

<div class="post-metadata">

**Author:** ![clevijoki](https://avatars.discourse-cdn.com/v4/letter/c/e0b2c6/32.png) [@clevijoki](https://qa.fmod.com/u/clevijoki)\
**Post date:** [June 4, 2013, 9:54pm UTC](https://qa.fmod.com/t/resolved-crash-trying-to-play-event-after-reloading-bank/10999/2 "2013-06-04T21:54:54Z")

</div>

I thought perhaps it would never be safe if I unloaded the master bank, so I optimized the reloading code to only reload banks that changed. It still crashes with the same callstack.

It only crashes if I have played an event from that bank at some point in the past however. If it was loaded but no event instances were created, and then unloaded/loaded it won’t crash.

This makes me think the bank is not unloading correctly.

---

<div class="post-metadata">

**Author:** ![Guest1](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@Guest1](https://qa.fmod.com/u/Guest1)\
**Post date:** [June 4, 2013, 10:46pm UTC](https://qa.fmod.com/t/resolved-crash-trying-to-play-event-after-reloading-bank/10999/3 "2013-06-04T22:46:05Z")

</div>

Thanks for the report, this bug has been fixed for the next release.
