0
0

I’ve just upgraded my application from version 4.02.05 to the current 4.04.08 of FMOD, and I’ve stumbled on a new error: whenever I create a stream (with System::CreateSound() ) the return code is FMOD_ERR_MEMORY.

The same error is triggered by the "playstream" example in the downloaded bundle. This behaviour is independent of the audio file I’m loading and the amount of memory available in the system (if I open the same sounds with FMOD_SAMPLE or FMOD_COMPRESSEDSAMPLE no error occurs and playback is performed correctly).

The audio driver (OSS/ALSA/ESD) I’m using doesn’t look influent.

If you need some hardware details ore more specific information (backtraces/dumps) about the problem, I can supply them.

Thank you for answering

  Dario Saccavino
  • You must to post comments
0
0

if it said it is out of memory, it is out of memory. A malloc failed. You could try overriding fmod’s memory system and see for yourself.

  • You must to post comments
0
0

Is this happening with the playstream example that came with the sdk?

Also, make sure you aren’t building with the old version of fmod.h or anything like that still.

  • You must to post comments
0
0

Thanks for the reply.

I overloaded the memory system in the playstream example with the following:
[code:t3rd4tgr]void * F_CALLBACK my_alloc(unsigned int size)
{
void *p = malloc(size);

if (!p)
{
    printf("malloc() error\n");
}
else
{
    printf("Successfully allocated %i bytes\n", size);
}

return p;

}

void * F_CALLBACK my_realloc(void * ptr, unsigned int size)
{
void *p = realloc(ptr, size);

if (!p)
{
    printf("realloc() error\n");
}
else
{
    printf("Successfully reallocated %i bytes\n", size);
}

return p;

}

void F_CALLBACK my_free(void * ptr)
{
free(ptr);
}[/code:t3rd4tgr]
The output showed only successful memory allocations, but still gave the same error:
[code:t3rd4tgr]$ ./playstream
Successfully allocated 6496 bytes
Successfully allocated 936 bytes
Successfully allocated 296 bytes
Successfully allocated 296 bytes
Successfully allocated 296 bytes
Successfully allocated 296 bytes
Successfully allocated 296 bytes
Successfully allocated 296 bytes
Successfully allocated 296 bytes
Successfully allocated 176 bytes
Successfully allocated 176 bytes
Successfully allocated 176 bytes
Successfully allocated 176 bytes
Successfully allocated 176 bytes
Successfully allocated 176 bytes
Successfully allocated 176 bytes
Successfully allocated 176 bytes
Successfully allocated 176 bytes
Successfully allocated 176 bytes
Successfully allocated 176 bytes
Successfully allocated 176 bytes
Successfully allocated 176 bytes
Successfully allocated 176 bytes
Successfully allocated 176 bytes
Successfully allocated 176 bytes
Successfully allocated 176 bytes
Successfully allocated 232 bytes
Successfully allocated 232 bytes
Successfully allocated 232 bytes
Successfully allocated 232 bytes
Successfully allocated 232 bytes
Successfully allocated 232 bytes
Successfully allocated 232 bytes
Successfully allocated 232 bytes
Successfully allocated 232 bytes
Successfully allocated 232 bytes
Successfully allocated 232 bytes
Successfully allocated 232 bytes
Successfully allocated 232 bytes
Successfully allocated 232 bytes
Successfully allocated 232 bytes
Successfully allocated 232 bytes
Successfully allocated 232 bytes
Successfully allocated 176 bytes
Successfully allocated 1440 bytes
Successfully allocated 26 bytes
Successfully allocated 456 bytes
Successfully allocated 56 bytes
Successfully allocated 24608 bytes
Successfully allocated 24608 bytes
Successfully allocated 143376 bytes
Successfully allocated 36880 bytes
Successfully allocated 504 bytes
Successfully allocated 8224 bytes
Successfully allocated 488 bytes
Successfully allocated 24608 bytes
Successfully allocated 416 bytes
Successfully allocated 488 bytes
Successfully allocated 24608 bytes
Successfully allocated 48 bytes
Successfully allocated 528 bytes
Successfully allocated 76816 bytes
Successfully allocated 4112 bytes
Successfully allocated 456 bytes
Successfully allocated 48 bytes
Successfully allocated 24 bytes
Successfully allocated 208 bytes
Successfully allocated 496 bytes
Successfully allocated 56 bytes
Successfully allocated 56 bytes
Successfully allocated 56 bytes
Successfully allocated 56 bytes
Successfully allocated 88 bytes
Successfully allocated 488 bytes
Successfully allocated 2064 bytes
Successfully allocated 408 bytes
Successfully allocated 104 bytes
Successfully allocated 104 bytes
Successfully allocated 22 bytes
Successfully allocated 35 bytes
Successfully allocated 104 bytes
Successfully allocated 23 bytes
Successfully allocated 25 bytes
Successfully allocated 104 bytes
Successfully allocated 22 bytes
Successfully allocated 20 bytes
Successfully allocated 416 bytes
Successfully allocated 520 bytes
Successfully allocated 824 bytes
Successfully allocated 816 bytes
Successfully allocated 1552 bytes
Successfully allocated 408 bytes
Successfully allocated 440 bytes
Successfully allocated 4600 bytes
Successfully allocated 8408 bytes
Successfully allocated 2872 bytes
Successfully allocated 17912 bytes
Successfully allocated 15120 bytes
Successfully allocated 448 bytes
Successfully allocated 704 bytes
Successfully allocated 432 bytes
Successfully allocated 23320 bytes
Successfully allocated 312 bytes
Successfully allocated 352 bytes
Successfully allocated 272 bytes
Successfully allocated 448 bytes
Successfully allocated 32 bytes
Successfully allocated 69184 bytes
Successfully allocated 272 bytes
Successfully allocated 304 bytes
Successfully reallocated 32784 bytes
Successfully allocated 448 bytes
Successfully allocated 56 bytes
FMOD error! (40) Not enough memory or resources. [/code:t3rd4tgr]
Any other suggestions?

EDIT: Would a strace of it working (works about 10-20% of the time) and it not working be of any use?

  • You must to post comments
0
0

Yes, it also happens with the "playstream" sample program.

I compiled it by executing "make fmod_examples", and I’m sure the previous version isn’t affecting the compilation process because I’ve never installed it, and the two packages were unpacked in different directories.

I get the message

FMOD error! (37) Not enough memory or resources.

Dario Saccavino

  • You must to post comments
0
0

Another followup: I checked some of the older versions of FMOD Ex that I had lying around. The newest version that I have that doesn’t experience this issue is 4.03.02. I don’t have any of the builds between 4.03.02 and 4.04.30 so the offending change could be anywhere in between. I wish I could narrow it down a little further but I had no luck finding any of the versions in between.

  • You must to post comments
0
0

In case it helps, the error happens whatever output device I use (I’ve tried OSS, ALSA and ESD), both for a MP3 file and for a WAV file, the latter being quite small (under 200K). Both files are on a local filesystem.

I’m currently using gcc 4.1, from a suse 10.1 distro.

 Dario Saccavino
  • You must to post comments
0
0

Thanks for that version info, it was quite usefull. I think I may have found the problem.

I have uploaded a pre-release version (fmodapi40443linux.tar.gz). Can you give it a try and let me know how it goes? If it still doesn’t fix the problem, can you link to fmodexD.so.4.04.43 (basically the same as the release library but with debug logging) and let me know what the debug output is.

http://52.88.2.202/upload/development/ … nux.tar.gz

  • You must to post comments
0
0

I am getting the same error when attempting to play a stream, in my program and in the playstream sample. Curious if there’s a solution to this problem?

  • You must to post comments
0
0

chenpo: That works! Thanks.

  • You must to post comments
0
0

I’ve just downloaded version 4.04.20 of the SDK and I experience the very same error.

:(

  • You must to post comments
0
0

have you tried v23

  • You must to post comments
0
0

I’m still seeing it with v23. Although, I tried the playstream demo about 15 times and it worked twice. Not sure if it makes a difference, but its the 64bit one

  • You must to post comments
0
0

I’m porting my game to Linux using FMOD Ex 4.04.28, and I stumbled into the same exact problem as the original poster. Opening an OGG as a stream returns FMOD_ERR_MEMORY, but loading the whole thing into memory works fine. Same exact problem with the bundled examples (playstream gives a memory error, playsound works fine).

Interestingly, like the original poster I’m also using SuSE 10.1 and GCC 4.1 (can anyone else confirm this with another distro?). Has this been confirmed as a bug in FMOD and if so, when can we expect a fix?

Thanks.

  • You must to post comments
0
0

I am seeing this as well using Gentoo (amd64) and FMOD Ex 4.04.30. Trying it in my Gentoo x86 chroot also had the same result. Trying it in my Debian 32 bit chroot worked. All 3 of those are using gcc 4.1. Note that it (the playstream demo) would occasionally run on the Gentoo installs (I’d say about 10-20% of the time).

The thing that seemed to make the difference is that the Gentoo installs use glibc 2.4 (as does Suse 10.1) whereas the Debian install uses glibc 2.3.6. The problem was also present on the Gentoo install when I tried using gcc 3.4.6.

So, it looks like an issue when using FMOD Ex on a system which has glibc 2.4 installed.

EDIT: Tried with version 4.04.35. Same results as 4.04.30.

EDIT #2: Problem is in 4.04.37 too. Is there any info I can provide to help solve this?

  • You must to post comments
0
0

Is this problem being looked into? Still happening with 4.04.41 with the playstream example:
[code:24tm0pf0]$ ./playstream
FMOD error! (40) Not enough memory or resources.[/code:24tm0pf0]
If you need any more info feel free to ask.

  • You must to post comments
Showing 15 results
Your Answer

Please first to submit.