NiftyGUI text wrapping OutOfMemoryError

Hey,



Have you guys had any problems with <text wrap=“true” … ?

When the text I am passing to it is about

“xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx” this big it gives me:

[java]

SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

java.lang.OutOfMemoryError: Java heap space

at java.util.Arrays.copyOf(Unknown Source)

at java.util.Arrays.copyOf(Unknown Source)

at java.util.ArrayList.ensureCapacity(Unknown Source)

at java.util.ArrayList.add(Unknown Source)

at de.lessvoid.nifty.elements.tools.TextBreak.processWords(TextBreak.java:47)

at de.lessvoid.nifty.elements.tools.TextBreak.split(TextBreak.java:24)

at de.lessvoid.nifty.elements.render.TextRenderer.bla(TextRenderer.java:394)

at de.lessvoid.nifty.elements.render.TextRenderer.setWidthConstraint(TextRenderer.java:407)

at de.lessvoid.nifty.elements.Element.processLayoutInternal(Element.java:563)

at de.lessvoid.nifty.elements.Element.processL(Element.java:569)

at de.lessvoid.nifty.elements.Element.layoutElements(Element.java:597)

at ee.kodu.solarsystemselect.MyEffect.setText(MyEffect.java:46)

at ee.kodu.solarsystemselect.MyEffect.execute(MyEffect.java:39)

at de.lessvoid.nifty.effects.Effect.execute(Effect.java:118)

at de.lessvoid.nifty.effects.EffectProcessor.renderPost(EffectProcessor.java:94)

at de.lessvoid.nifty.effects.EffectManager$2.render(EffectManager.java:138)

at de.lessvoid.nifty.effects.EffectManager.render(EffectManager.java:116)

at de.lessvoid.nifty.effects.EffectManager.renderPost(EffectManager.java:136)

at de.lessvoid.nifty.elements.Element.render(Element.java:441)

at de.lessvoid.nifty.elements.Element.renderInternalChildElements(Element.java:472)

at de.lessvoid.nifty.elements.Element.renderChildren(Element.java:466)

at de.lessvoid.nifty.elements.Element.render(Element.java:434)

at de.lessvoid.nifty.screen.Screen.renderLayers(Screen.java:256)

at de.lessvoid.nifty.Nifty.render(Nifty.java:167)

at com.jme3.niftygui.NiftyJmeDisplay.postQueue(NiftyJmeDisplay.java:138)

at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:714)

at com.jme3.renderer.RenderManager.render(RenderManager.java:742)

at com.jme3.app.SimpleApplication.update(SimpleApplication.java:244)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:146)

at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:141)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:208)

at java.lang.Thread.run(Unknown Source)

[/java]

haven’t had any problems myself. Could you send some more info on this? And maybe test if it also still happens with nifty 1.3?