I’m using some large SVG files, some >300k, which Juce renders ok in an Mac OS X app, but in an iPod/iPhone port of the app, crash on the device. I’m using an 8GB iPod running iOS 4.0.
The crash happens in the XML parsing in the CreateFromSVG function.

Smaller SVG files, <100k, produced in the same way (with Illustrator) work fine on the device.
Because of this, could this be a problem with memory allocation within the XML data structures?

The XML structures are about as efficient as they could be, but the parser does need to load the whole thing into memory before it can start using it. The strings are held as 4-byte unicode and there’ll be space wasted for data alignment, etc, so a 300k file could easily eat up 2Mb of heap space. Still, 2MB isn’t an awful lot… I’m sure the ipod has at 96MB…?

I was working in debug, so I tried cleaning the release build, built release and it worked fine.
So I cleaned and rebuilt debug and strangely it now works fine… perhaps Xcode got out of sync somehow after rebuilding the resources with binarybuilder?