exportgraphics causing strange messages in terminal only for Compiled version of App

When running my app after it has been compiled, exportgraphics calls seem to cause the following messages (or similar) to output in the terminal window:
<</ID[<05208558C807F1784140FF8D8426A497><05208558C807F1784140FF8D8426A497>]/Info 1 0 R/Root 40 0 R/Size 41>>
<</ID[<DD2F4FE7DF1F30092B20485DA2514F38><DD2F4FE7DF1F30092B20485DA2514F38>]/Info 1 0 R/Root 26 0 R/Size 27>>
Fixing references in 41 0 R by 40
Fixing references in 42 0 R by 40
Fixing references in 43 0 R by 40
Fixing references in 44 0 R by 40
Fixing references in 45 0 R by 40
Fixing references in 46 0 R by 40
Fixing references in 47 0 R by 40
Fixing references in 48 0 R by 40
Fixing references in 49 0 R by 40
Fixing references in 50 0 R by 40
Fixing references in 51 0 R by 40
Fixing references in 52 0 R by 40
Fixing references in 53 0 R by 40
Fixing references in 54 0 R by 40
Fixing references in 55 0 R by 40
Fixing references in 56 0 R by 40
Fixing references in 57 0 R by 40
Fixing references in 58 0 R by 40
Fixing references in 59 0 R by 40
Fixing references in 60 0 R by 40
Fixing references in 61 0 R by 40
Fixing references in 62 0 R by 40
Fixing references in 63 0 R by 40
Fixing references in 64 0 R by 40
Fixing references in 65 0 R by 40
Fixing references in 66 0 R by 40
These messages are not to my knowledge actually causing any failures within the program, as the plots still export to the pdf and seem the same as when generated outisde of the compiled version. But similar messages post every time exportgraphics is called. If remove the exportgraphics calls from the code and nothing else no messages appear.
These messages do not appear when running the app from App Designer as a .mlapp file.
Some further testing reveals that the above messages do not appear for the first exportgraphics call, but does appear for all subsequent calls with the "fixing references" numbers called out increasing for each call.

2 Comments

Could you share the ".mlapp" file so that I can reproduce the issue?
If I did I think I wouldn't have a job for much longer unfortunately... I can tell you though that it is only exporting relatively simple 2D vectorized plots to a pdf, and the compiled program gives no complaints when the exportgraphics calls are commented out.

Sign in to comment.

 Accepted Answer

This issue was fixed in R2024a.
The problem occurred when setting append to true in exportgraphics.

9 Comments

Thank you for this nice answer. Could you provide a link of the bug-fixed report from MATLAB?
BTW, if I am using an old version of MATLAB, is there anyway to prevent this by some simple hacking?
Thanks!
Hello Cunxin, this issue was not included in the published bug report. See the FAQ page to learn more about our published bug reports.
Unfortunately there is no workaround to suppress the logging information in older MATLAB releases. It's coming from a 3rd-party library used internally.
Hi Adam,
Thank you for your reply and kind answer! But now I am writing a small package in my research area and I really do not want my user to observe these messages in terminal (maybe they will think it is a bug). Is there any suggestion such that I can learn and "hack" the 3rd-party library?
Thanks again!
I know that for sure and I have updated MATLAB. But since I am developing a MATLAB package, there is no reason to force all my users to use the latest version.
The problem occurs only in compiled applications. Are you saying that you are providing MATLAB source code to your users for them to compile?
No. My package is consist of pure MATLAB code and does not need to be complied. This problem appears if a user open MATLAB via 'nodesktop' mode.
Could you confirm that when users run your uncompiled code via 'nodesktop' that reports about 'Fixing references' are generated?
Yes.
I just tried one simpler test: I only use 'exportgraphics' to 'Append' a figure to one pdf under 'nodesktop' mode, and it prints as follows (part of the information).
>> exportgraphics(fig_perf_hist, pdf_perf_hist_summary, 'ContentType', 'vector', 'Append', true)
<</ID[<E3CD9412008804AD2C2FD9117F6D632E><E3CD9412008804AD2C2FD9117F6D632E>]/Info 1 0 R/Root 44 0 R/Size 45>>
<</ID[<2D2251A6ACCB5B72863990CFE1BE1671><2D2251A6ACCB5B72863990CFE1BE1671>]/Info 1 0 R/Root 44 0 R/Size 45>>
Fixing references in 45 0 R by 44
Fixing references in 46 0 R by 44
Fixing references in 47 0 R by 44
I really don't know how to deal with it.
By the way, I appreciate all your help and attention to this problem.

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2021b

Asked:

on 27 Aug 2024

Commented:

on 11 Dec 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!