Hi
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?
Here’s the trace back:
0 libSystem.B.dylib 0x000ae500 wcslen + 8
1 MyApp 0x00068004 juce::CharacterFunctions::length(wchar_t const*) (juce_CharacterFunctions.cpp:53)
2 MyApp 0x000681d0 juce::String::length() const (juce_String.cpp:470)
3 MyApp 0x00079264 juce::String::operator[](int) const (juce_String.h:434)
4 MyApp 0x00174d94 juce::SVGState::parsePath(juce::XmlElement const&) const (juce_SVGParser.cpp:476)
5 MyApp 0x00176938 juce::SVGState::parseSubElements(juce::XmlElement const&, juce::DrawableComposite*) (juce_SVGParser.cpp:155)
6 MyApp 0x001779c4 juce::SVGState::parseGroupElement(juce::XmlElement const&) (juce_SVGParser.cpp:204)
7 MyApp 0x00176880 juce::SVGState::parseSubElements(juce::XmlElement const&, juce::DrawableComposite*) (juce_SVGParser.cpp:151)
8 MyApp 0x001779c4 juce::SVGState::parseGroupElement(juce::XmlElement const&) (juce_SVGParser.cpp:204)
9 MyApp 0x00176880 juce::SVGState::parseSubElements(juce::XmlElement const&, juce::DrawableComposite*) (juce_SVGParser.cpp:151)
10 MyApp 0x001779c4 juce::SVGState::parseGroupElement(juce::XmlElement const&) (juce_SVGParser.cpp:204)
11 MyApp 0x00177a6c juce::SVGState::parseSwitch(juce::XmlElement const&) (juce_SVGParser.cpp:184)
12 MyApp 0x00176c20 juce::SVGState::parseSubElements(juce::XmlElement const&, juce::DrawableComposite*) (juce_SVGParser.cpp:171)
13 MyApp 0x00177754 juce::SVGState::parseSVGElement(juce::XmlElement const&) (juce_SVGParser.cpp:131)
14 MyApp 0x000d0990 juce::Drawable::createFromSVG(juce::XmlElement const&) (juce_SVGParser.cpp:1302)
15 MyApp 0x000d0ca8 juce::Drawable::createFromImageData(void const*, unsigned long) (juce_Drawable.cpp:113)
Thanks!