egg2bam Error code 8

Hi all,

I use large databases with a lot of included 3d objects (separate egg models). When I use:

egg2bam -ps rel dbase.egg dbase.bam

I get the following error:

Couldn’t allocate memory page of size 131072: Error code 8

I first tried this on a machine with 2 Gb memory and now I have tried it on a 4 GB machine (windows 7 professional). The funny thing is, that if I leave out a couple of 3d models, then there’s no problem (doesn’t matter which models, so its not an error in the egg models).

Is there a known way to allocate more memory ?

Windows imposes a 2GB limit on each 32-bit application, regardless of how much memory you actually have installed. Therefore, in order to use more than 2GB, you have two choices:

(1) Run the program on a non-Windows machine, such as a Mac or Linux.

(2) Compile Panda (and all of the needed thirdparty libraries) as a 64-bit library and use that. You will need to be fairly comfortable with compiler systems to do this successfully.

I’ve also heard rumors that you can configure Windows to allow slightly more than 2GB, though I don’t know the details there.

Your other choice is, of course, to bamify each of your egg files separately. This might be a more robust choice anyway.

David

That would be a nice solution.
I tried to include references to bam files in an egg file, as in:

    <Group> externobject000 {
      <SwitchCondition> {
        <Distance> { 500 0 <Vertex> { -49.916 -164.864 0 } }
      }
      <Group> g3780 {
        <Instance> {
          <Transform> {
            <Translate> { -49.916 -164.864 0 }
          }
          <File> {
            "objects/Palace1/Palace1.bam"
          }
        }
      }
    }

But this results in parse errors in egg2bam, when reading egg files after this.

for example:
parse error
Error in … .egg at line 0, column 2:
{ -0.38667 -0 {Z-Up}

So, if a reference to a *.bam file is included in the egg file, instead of references to other *.egg files, do all the references then have to be to *.bam files ?

I have tested this on both a windows XP professional machine with 2GB and on a windows 7 professional machine with 4 GB installed. In the second one, I think the limitation for a single application is 4 GB, and not 2 GB. In both cases the same error occurs with the egg2bam program. If I remove a number of reference to *.egg files, the error disappears, which suggests a memory limitation. But the windows 7 machine should be able to assign twice the amount of memory, so the error should not occur then.

Anyway. I bamified all egg files and included the *.bam references in the egg file, but this gives the parse errors I referred to before. Are you sure it is allowed to include references to bam files in an egg file that is input to egg2bam ?

You can try patching the binary if you are on a 64bit OS. There’s a flag in Windows (32) executables that will allow them to address upto 4GB RAM.

ntcore.com/4gb_patch.php

You can’t include references to bam files from within an egg file. When I said “bamify each file separately,” I meant to load up all of the individual bam files in your Python code, not to try to create one big egg file that references all of them.

David