f



Publish to PDF crashes on Java memory error

When we try to publish to PDF, we get the following error(s):

Error using xslt (line 95)
Java exception occurred:
java.lang.OutOfMemoryError: Java heap space
	at org.apache.fop.layoutmgr.inline.TextLayoutManager.addElementsForASpace(Unknown Source)
	at org.apache.fop.layoutmgr.inline.TextLayoutManager.processLeftoverAreaInfo(Unknown Source)
	at org.apache.fop.layoutmgr.inline.TextLayoutManager.getNextKnuthElements(Unknown Source)
	at org.apache.fop.layoutmgr.inline.InlineLayoutManager.getNextKnuthElements(Unknown Source)
	at org.apache.fop.layoutmgr.inline.InlineLayoutManager.getNextKnuthElements(Unknown Source)
	at org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthElements(Unknown
        Source)
	at org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(Unknown Source)
	at org.apache.fop.layoutmgr.BlockLayoutManager.getNextChildElements(Unknown Source)
	at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(Unknown Source)
	at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(Unknown Source)
	at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(Unknown Source)
	at org.apache.fop.layoutmgr.BlockLayoutManager.getNextChildElements(Unknown Source)
	at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(Unknown Source)
	at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(Unknown Source)
	at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(Unknown Source)
	at org.apache.fop.layoutmgr.FlowLayoutManager.getNextChildElements(Unknown Source)
	at org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(Unknown Source)
	at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(Unknown Source)
	at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(Unknown Source)
	at org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(Unknown Source)
	at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(Unknown Source)
	at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(Unknown Source)
	at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(Unknown Source)
	at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(Unknown Source)
	at org.apache.fop.layoutmgr.PageBreaker.doLayout(Unknown Source)
	at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(Unknown Source)
	at org.apache.fop.area.AreaTreeHandler.endPageSequence(Unknown Source)
	at org.apache.fop.fo.pagination.PageSequence.endOfNode(Unknown Source)
	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(Unknown Source)
	at org.apache.fop.fo.FOTreeBuilder.endElement(Unknown Source)
	at com.icl.saxon.output.ContentHandlerProxy.endElement(ContentHandlerProxy.java:147)
	at com.icl.saxon.output.ProxyEmitter.endElement(ProxyEmitter.java:90)

Error in publish>publishToPdf (line 534)
xslt(saxSource,getPdfStylesheet(options,noToc),xsltDestination);

Error in publish (line 198)
        publishToPdf(dom,options,outputAbsoluteFilename)

Error in mdbpublish (line 55)
outputPath = publish(file, options);
 
Exception in thread "BayeuxServer@1702892531" Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
	at java.util.concurrent.ConcurrentHashMap$Values.iterator(ConcurrentHashMap.java:1449)
	at org.cometd.server.BayeuxServerImpl.sweep(BayeuxServerImpl.java:1149)
	at org.cometd.server.BayeuxServerImpl$2.run(BayeuxServerImpl.java:179)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:2219)
	at java.util.ArrayList.toArray(ArrayList.java:358)
	at java.util.ArrayList.<init>(ArrayList.java:164)
	at com.mathworks.toolstrip.plaf.ToolstripTabLayout.layoutContainer(ToolstripTabLayout.java:224)
	at java.awt.Container.layout(Container.java:1503)
	at java.awt.Container.doLayout(Container.java:1492)
	at java.awt.Container.validateTree(Container.java:1688)
	at java.awt.Container.validateTree(Container.java:1697)
	at java.awt.Container.validateTree(Container.java:1697)
	at java.awt.Container.validateTree(Container.java:1697)
	at java.awt.Container.validateTree(Container.java:1697)
	at java.awt.Container.validateTree(Container.java:1697)
	at java.awt.Container.validateTree(Container.java:1697)
	at java.awt.Container.validate(Container.java:1623)
	at javax.swing.RepaintManager$2.run(RepaintManager.java:691)
	at javax.swing.RepaintManager$2.run(RepaintManager.java:689)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:688)
	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1676)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:694)
	at java.awt.EventQueue$3.run(EventQueue.java:692)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
Error using open (line 68)
NAME must contain a single string.
 
>> 






This has happened in 2013a on Linux and 2014b on Macintosh. It seems to work on all the version we've tried on Windows. The problem happens no matter what we are publishing; we've started with different .m files with different numbers of figures, and while publishing to HTML works fine, going to PDF always fails. There is no change when we re-use the figure windows to save memory.

Since this happens across multiple versions of Matlab, I'm guessing there's a setting somewhere that needs to be changed, but I haven't been able to find an explanation for what that setting may be.
0
Mike
3/4/2015 2:10:40 PM
comp.soft-sys.matlab 211264 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

2 Replies
735 Views

Similar Articles

[PageSpeed] 58


"Mike VanHorn" <michael.vanhorn@wright.edu> wrote in message 
news:md73p0$ii7$1@newscl01ah.mathworks.com...
>
> When we try to publish to PDF, we get the following error(s):
>
> Error using xslt (line 95)
> Java exception occurred:
> java.lang.OutOfMemoryError: Java heap space

My first thought is that the figure you're trying to publish has many 
graphics objects on it, or one or two very large/complicated ones, but I'm 
not certain. Please send the code that you're trying to publish to Technical 
Support for investigation. Also check the Java heap setting in the 
Preferences; it should be under MATLAB in the General category.

*snip*

-- 
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on 
http://www.mathworks.com 

0
Steven
3/7/2015 5:17:17 AM
"Steven Lord" <Steven_Lord@mathworks.com> wrote in message <mde1l3$cvn$1@newscl01ah.mathworks.com>...
> 
> 
> "Mike VanHorn" <michael.vanhorn@wright.edu> wrote in message 
> news:md73p0$ii7$1@newscl01ah.mathworks.com...
> >
> > When we try to publish to PDF, we get the following error(s):
> >
> > Error using xslt (line 95)
> > Java exception occurred:
> > java.lang.OutOfMemoryError: Java heap space
> 

I notice the new graphic engine in 2014B is quite unstable and throw out often java error for reasonable animated graphics. Very annoying.

I have switched back to R2012A for this reason.
0
Bruno
3/7/2015 8:51:49 AM
Reply:

Similar Artilces:

How to solve "Memory out Error" or "Memory allocation Error" in MATLAB?? I am using, MATLAB 7.9.0(R2009b(64-bit
When I am running my MATLAB-Simulink Model,after sometimes it indicates that "Memory out Error" or "Memory allocation Error". How can I overcome these problems and run my model properly... On 3/13/2013 2:14 AM, chittaranjan pradhan wrote: > When I am running my MATLAB-Simulink Model,after sometimes it indicates >that "Memory out Error" or "Memory allocation Error". How can I overcome >these problems and run my model properly... > I think when you get "Memory out Error" then it most likely means you need to acquire more mem...

Matlab 2012a Crash with Java Error
Dear Friends I am facing a big problem of "Not Responding" Matlab 2012a. When i close it with task manager to end the program, matlab 2012a is giving some java error. In this way, everything in workspace gone and I cannot continue my experiment in matlab. Kindly, if anyone of you knows the solution, Please guide me that I continue my experiment in matlab. I will be highly thankful. Best Regards KK "Mark Gul" <mykhalidiqbal@gmail.com> wrote in message news:kbr6e8$55d$1@newscl01ah.mathworks.com... > Dear Friends > I am facing a big problem ...

Matlab crashes on start...java errors?
I've installed the Matlab student version on my computer (an AMD Athlon 64 x2 running windows XP Pro). When I go to start the program it immediately gives me an error window (which closes very quickly on its own) that contains references to a variety of java related classes...such as: javax.swing.border.....(Unknown Source) java.awt..... (Unknown Source) and it continues for about 40 such entries. Has anybody else had this issue and solved it? I have the most recent version of Java installed on my computer. I've installed and reinstalled the software a couple of times and that didn&#...

matlab in JAVA or java in MATLAB?
Hi guys I am now experencing a great difficulty in the interation between java and matlab. I have an objective function written in JAVA with has method return an numerical number, i call it 'profit'. The nature of this obtive function (ObjFun.java) is that it takes an parameter input, say C, with different C value, the returned profit value is different. Eventually I want to find the optimized C value which produce the maximun profit (C will be under constrains). Initially I want to use linprog or fminsearch in matlab. So I tried the command in matlab that excutes my ObjFun.ja...

matlab in JAVA or java in MATLAB? #2
Hi guys I am now experencing a great difficulty in the interation between java and matlab. I have an objective function written in JAVA with has method return an numerical number, i call it 'profit'. The nature of this obtive function (ObjFun.java) is that it takes an parameter input, say C, with different C value, the returned profit value is different. Eventually I want to find the optimized C value which produce the maximun profit (C will be under constrains). Initially I want to use linprog or fminsearch in matlab. So I tried the command in matlab that excutes my ObjFun.ja...

Java Out of memory error
I'm developing a voice recognition system totally with MATLAB 6.5. I've made some GUI's with GUIDE, and some CPU intensive algorithms to do the recognition. The system appears to work well. But suddenly, it sends the following messages to the command window: " Exception occurred during event dispatching: java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start(Native Method) at com.mathworks.mwt.MWScrollbar.mousePressed(MWScrollbar.java:1258) at java.awt.Component.processMouseEvent(Unknown Source) at com.mathworks.mwt.MWComponen...

OUT OF MEMORY ERROR FOR MATLAB
hello for matlab 7 when i try to load a file containing 3000000 strings and floats the matlab give java.lang.out of memory error. the total file size is 31mb can any one tell me how to deal with this? "akshay bhat" <akshayubhat@gmail.com> wrote in message news:1192961568.182066.319490@v29g2000prd.googlegroups.com... > hello > for matlab 7 > when i try to load a file containing 3000000 strings and floats the > matlab give java.lang.out of memory error. > the total file size is 31mb > can any one tell me how to deal with this? > 31 MB is not that big to ...

out of memory error of Java
here is my code for j2=1:m sqlstr=['INSERT INTO test() VALUES()']; kk=kk+1; stmt.addBatch(sqlstr); if kk==100000 disp('send....'); stmt.executeBatch; stmt.close; kk=0; end m is a big number, I got out of memory after two "send". Since each send, there is the same size of data, I assume each send should use the same memory. How after two send, there is error of out of memeory. After each send, there is a stmt.close. ...

Matlab memory error
Hi, I am running a simulation on matlab (using simulink) and after a couple of iterations I get the error "Warning: Running low on memory. Simulation will terminate in approximately 0 steps}." and "??? Error using ==> sim Memory allocation error." I am currently using a desktop with 3gb RAM, so I cant pin point the reason for lack of memory. ...

error when publishing to pdf
Hi guys, when trying to publish to a pdf I receive the following error messages: ??? Undefined variable "rptgen" or class "rptgen.file2urn". Error in ==> publish>fopInitialize at 548 fopFactory.setHyphenBaseURL(rptgen.file2urn( ... Error in ==> publish>publishToPdf at 501 [fopDriver, fopOutputStream] = fopInitialize(outputAbsoluteFilename); Error in ==> publish at 193 publishToPdf(dom,options,outputAbsoluteFilename) Error in ==> TestPublishHelloWorld at 11 pdfpublished = publish('HelloWorld.m','pdf'); ...

Out of memory error in matlab
i am pensharpening an image using princomp. i rotated the image b4 princomp thn applied it and now whn rotating back image by muliplying it with PC matiric of size (1048576x4), m getting this out of memory adress. i have fragmented the disk and increased Virtual memory size but its still there????? ...

ERROR: Error starting reference:file:/C:/MATLAB/R2010b/java/jar/toolbox/simulink.jar
java.lang.ClassNotFoundException: com.mathworks.comparisons.plugin.ComparisonPlugin at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at com.mathworks.util.osgi.Servic...

java matlab error: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Hello Im using matlab 2010 and 2007 with windows 7 and i have install the new java. Matlab array editor doesnt work right even though i can see the values of an array in the workspace when i try to edit them in the variable editor i cant see the values and i get an error: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.mathworks.mlwidgets.array.ValueTableModel.setValuesAt(ValueTableModel.java:195) at com.mathworks.mlwidgets.array.ValueTableModel.setValueAt(ValueTableModel.java:190) at com.mathworks.widgets.spreadsheet.ResizingTableModelWrapper.s...

Get a result from Matlab to Java (Call Matlab from JAVA
Hi all, I am having trouble getting the return value from matlab to JAVA. I have tried Kamin Whitehouse 's code(matlabcontrol.java) and get working for eval and feval, but having trouble using blockingFeval function which returnts the value of matlab. The problem I am having is it returns some value valid only in matlab workspace and when I play around with the return value in matlab, it works fine but in Java program it is just junk data. I corresponded with Kamin and he thinks that jmi.jar has been changed since he developed the class. The matlab library now returns the handle of t...

Web resources about - Publish to PDF crashes on Java memory error - comp.soft-sys.matlab

Publish and Subscribe (Mac OS) - Wikipedia, the free encyclopedia
it extended the existing cut and paste editing model with a notification system; "subscribers" could include parts of "published" documents within ...

Mac OS X Users Can Publish To Facebook Directly From Desktops With Moment App
Mac users running OS X now have a way to publish to Facebook directly from their desktops with Tapmates ’ release of its Moment application. ...

Report: Facebook Personal Profiles To Soon Get Twitter Publish Feature
The latest part to Facebook’s open strategy is about to arrive, according to TechCrunch: Users will be able to post to Twitter from their Facebook ...

Quick Publish for iPhone, iPod touch, and iPad on the iTunes App Store
Get Quick Publish on the App Store. See screenshots and ratings, and read customer reviews.

BandPage Announces BandPage Everywhere: Update Once, Publish Everywhere - YouTube
When we built BandPage on Facebook, a lot of you asked if you could "take it with you" to your Website and blog. So we created BandPage Everywhere ...

Hockey wrong: ATO did publish tax dodgers' names
The Tax Commissioner says publishing taxpayers' personal details would be &quot;unprecedented&quot;, the treasurer says &quot;confidentiality ...

'Publish or perish' diminishing scientific returns
Australia's research output is being hampered by a "creative recession" that is independent of funding cuts.

Woman's Day to publish pregnant Duchess of Cambridge photos
... can reveal that Woman's Day will run the controversial shots in Monday's edition. The Italian gossip magazine Chi has already published the ...

Undercover journalists publish firsthand account of asylum seeker journey to Australia
An undercover journalist has detailed how he and a photographer posed as asylum seekers and took an epic journey from Afghanistan's shady currency ...

The 19-year fight to publish uncensored photos from Australia's Senate
It means we can't take photographs of senators sitting down - something they spend a great deal of time doing

Resources last updated: 2/12/2016 5:53:22 AM