# I can't play it module it just crashes with no error message

**URL:** <https://qa.fmod.com/t/i-cant-play-it-module-it-just-crashes-with-no-error-message/14031>\
**Category:** FMOD Engine\
**Created:** [August 3, 2018, 5:45pm UTC](https://qa.fmod.com/t/i-cant-play-it-module-it-just-crashes-with-no-error-message/14031 "2018-08-03T17:45:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cyndanera](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cyndanera/32/1532_2.png) [@Cyndanera](https://qa.fmod.com/u/Cyndanera)\
**Post date:** [August 3, 2018, 5:45pm UTC](https://qa.fmod.com/t/i-cant-play-it-module-it-just-crashes-with-no-error-message/14031/1 "2018-08-03T17:45:14Z")

</div>

```
    result = FMOD::System_Create(&system);
result = system->getVersion(&version);

if (version < FMOD_VERSION)
{
	std::cout << "FMOD lib version %08x doesn't match header version %08x" << std::endl;
}

result = system->createStream("bgm_boss.it", FMOD_LOOP_NORMAL | FMOD_2D, 0, &sound);

do {
	result = system->playSound(sound, 0, false, &channel);
	result = system->update();

} while (apprunning);
return 0;

```

}

---

<div class="post-metadata">

**Author:** ![Domarius](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/domarius/32/56_2.png) [@Domarius](https://qa.fmod.com/u/Domarius)\
**Post date:** [August 4, 2018, 2:00am UTC](https://qa.fmod.com/t/i-cant-play-it-module-it-just-crashes-with-no-error-message/14031/2 "2018-08-04T02:00:11Z")

</div>

I can’t see where you create your “sound” variable, make sure you include everything.

I’ve never used those options for “createStream”, just FMOD\_CREATESTREAM.

Eg. this works for me;

```
FMOD_RESULT result;
FMOD::System *system = NULL;
result = FMOD::System_Create(&system); // Create the main system object.
result = system->init(512, FMOD_INIT_NORMAL, 0); // Initialize FMOD.
FMOD::Sound *bg_music;
system->createSound("assets/castlevania_4_cv-1.xm", FMOD_CREATESTREAM, NULL, &bg_music);
FMOD::Channel *channel;
system->playSound(bg_music, NULL, false, &channel);
while(1);

```

The important thing is - have you tried it with other module files? Try a different .IT file, or a .MOD file, does it still crash? If it crashes with every file you try, then something is wrong with your code. If it only crashes with that one file, then perhaps it’s a problem with that file, and you can maybe load it into OpenMPT or MilkyTracker and re-save it, see if that fixes it, something like that.

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [August 4, 2018, 10:18am UTC](https://qa.fmod.com/t/i-cant-play-it-module-it-just-crashes-with-no-error-message/14031/3 "2018-08-04T10:18:28Z")

</div>

I’m guessing by ‘crash’ you mean hang? Because your inner loop is spamming calls to playSound, which means it will try and start the sound from the start a million times a second.

I would move your playSound outside of the loop, and replace it with a call to Sleep(10); to stop it hogging the CPU.

---

<div class="post-metadata">

**Author:** ![ChezJfrey](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@ChezJfrey](https://qa.fmod.com/u/ChezJfrey)\
**Post date:** [August 4, 2018, 4:28pm UTC](https://qa.fmod.com/t/i-cant-play-it-module-it-just-crashes-with-no-error-message/14031/4 "2018-08-04T16:28:55Z")

</div>

What Brett stated is exactly what I saw in the example code…an endless loop spamming the play call; it will be very fast, and many thousands of calls with no time in between to actually perform anything properly. I would think that can’t be a good thing and could very well cause problems.
