schir1964 Posted November 12, 2021 Report Share Posted November 12, 2021 I think the RTF code is too large (12 Megabytes) and is causing the program to run out of space for processing. Here's the exception being thrown. Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space at java.lang.StringCoding$StringDecoder.decode(Unknown Source) at java.lang.StringCoding.decode(Unknown Source) at java.lang.StringCoding.decode(Unknown Source) at java.lang.String.<init>(Unknown Source) at java.lang.String.<init>(Unknown Source) at com.hero.util.HTMLWriter.<init>(Unknown Source) at com.hero.HeroDesigner.exportActiveCharacter(Unknown Source) at com.hero.HeroDesigner.access$500(Unknown Source) at com.hero.HeroDesigner$18.actionPerformed(Unknown Source) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.AbstractButton.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) The plan was to just dump out the original RTF untouched to see if looked okay and then start replacing the hard coded values with Export Tags. The dump worked but it was corrupted with the empty line prepended to it due to the Export Tags being remove (the file description and so forth). I then went to remove the spaces the from file using the Regular Expression Replace tags. That's when this error began being thrown. Even after I removed the replacement tags it still threw the out of memory error. Even after shutting everything down and restarting it throws the error now. <!--TEMPLATE_NAME-->6th Edition RTF Export - Two Column<!--/TEMPLATE_NAME--> <!--TEMPLATE_DESCRIPTION--> <span style="font-weight: bold;">Author:</span> Christopher Mullins<br> <span style="font-weight: bold;">Version:</span> 1.0.2<br> <span style="font-weight: bold;">Date:</span> (11/11/2021)<br> <hr> <span style="color: maroon; font-weight: bold; text-decoration: underline;">Important!</span><br> DreadDomains created this character sheet style and format.<br> I just used one his sample RTF files to fill in the HeroDesigner export fields to create the template. <br> <span style="font-weight: bold; text-decoration: underline;">Notes</span><br> For character image you need to edit the RTF file in Word or some other program and add it yourself. RTF requires the image be encoded and embedded in the RTF file.not get split in half if it overflows the existing page. <!--/TEMPLATE_DESCRIPTION--> <!--FILE_EXTENSION-->rtf<!--/FILE_EXTENSION--> {RTF Code} Any thoughts? trace.log appPrefs.xml Quote Link to comment Share on other sites More sharing options...
Simon Posted November 12, 2021 Report Share Posted November 12, 2021 There are no errors shown in that trace.log file. Either the trace.log file is not from the HD installation that's throwing the error or the error is due to HD/Java not having access to the directory that you're trying to run from. Quote Link to comment Share on other sites More sharing options...
schir1964 Posted November 12, 2021 Author Report Share Posted November 12, 2021 Sorry, I was thinking the trace.log was only created when an error occurred. I wiped out the error when I updated this post. So it does seem related to the RTF Export Template. I'll reproduce the error and update this thread appropriately. Quote Link to comment Share on other sites More sharing options...
schir1964 Posted November 12, 2021 Author Report Share Posted November 12, 2021 I've reproduce the error and updated the post accordingly. Quote Link to comment Share on other sites More sharing options...
Simon Posted November 12, 2021 Report Share Posted November 12, 2021 Increase the memory available to HD (under app preferences) Quote Link to comment Share on other sites More sharing options...
schir1964 Posted November 12, 2021 Author Report Share Posted November 12, 2021 Just confirmed my theory. If I trim down the RTF Code the Exception isn't thrown and the file is generated. Guess I got lucky the first time I ran the export. Quote Link to comment Share on other sites More sharing options...
schir1964 Posted November 12, 2021 Author Report Share Posted November 12, 2021 31 minutes ago, Simon said: Increase the memory available to HD (under app preferences) Thanks, I'll try that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.