This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
reproducible with b17.
may be java 1.6 issue
It may be reproducible on linux only.
I'm not able to reproduce this problem using jdk1.6 on linux fc3 system. Please provide detail on how to reproduce this problem.
removed REGRESSION keyword since this is not a regression. It exists because JDK 1.6 is used.
I have tested on all platforms including a different linux fc3 system but still have not been able to reproduce this problem. I think this might be machine specific issue.
for me Bug is reproducible on several FC3 machines even on jdk1.5 So mark it as regression with dependency to jdk1.6 Bug may be caused by problems with graphics library. It looks loke issue 82405 has the same root cause.
correction: it is a REGRESSION with NO dependency to jdk1.6
There is a problem with graphics library. This problem should be catched and user should be informed instead of silent generation of jpg files of zero size. There is an exception in log caused by (full log is attached): Caused by: java.lang.ClassCastException: sun.awt.image.DataBufferNative at sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:405) at sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:228)
Created attachment 33107 [details] message log with jpg generation exception
*** Issue 82405 has been marked as a duplicate of this issue. ***
Related bugs filed against jdk: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4908153 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4908153 Suggested workaround: Changing colour depth ... to 16bit makes it go away.
Also: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4987560
Just found the same problem on Solaris 10 x64 using daily build 061019_4. Exporting diagram to jpg file results in zero file size and InvocationTargetException exists in ide logfile as in the original attachement.
Workaround, export to jpg image with "Current Zoom Level" and "Visible Window Only" options, then it'll work. Of course, generating report would not have this option.
coco_stopper, should be in coco rn (both: about report and about export image)
*** Issue 87370 has been marked as a duplicate of this issue. ***
Steps to reproduce: - create a uml project of any type - create a diagram of any type, eg, class diagram - create and name some elements in the diagram - save the diagram - from the project tree, right click on the uml project and select Generate Model Report Result: the model report is opened to a default web browser. Clicking on the diagram from the navigation shows an empty diagram on the right.
Another way to reproduce: - create a uml project of any type - create a diagram of any type, eg, class diagram - create and name some elements in the diagram - save the diagram - from the diagram toolbar, click on the "Export as Image" button - from the Export as Image dialog, select "JPEG Image (*.jpg)" image type - enter a filename or use the default name - click on OK with other default settings - open your jpg image file or look at the file size from an external application
*** Issue 89914 has been marked as a duplicate of this issue. ***
different types of internal java2d buffers suggests that we again face the same java2d specifics - could you please try (on local or remote display - it doesn't really matter) with -J-Dsun.java2d.pmoffscreen=false . I tried with jdk1.6 on linux FC3 and it works fine with the switch.
did you use system with 16bit color depth of 32? I can reproduce with/without flag with 061124 build on linux, 32bit(millions) color depth, java 1.5.0_06. I can't verify with 1.6 now, because we are testing coco.
the ray of hope was generated by the fact that it didn't work without the flag on the machine where i tried and did work with the flag. Looks like it isn't a common case.
I'm experiencing this problem as well on Mac OSX 10.4.8 on a MacBook Pro, 2.16GHz Intel Core Duo with 2GB of memory.
lot of customers meet the problem
JPEG images don't work on Ubuntu Linux - and there is no UI to change the color depth for an average Linux user. Simply editing /etc/X11/xorg.conf to change 24 bit color depth to 16 results in a brocken X11 on an IBM Thinkpad. Is there no other solution - like generating .png in place of .jpg files?
*** Issue 104073 has been marked as a duplicate of this issue. ***
Workaround: Looks like adding the following flag to netbeans_default_options in {ide-install-dir}/etc/netbeans.conf is a workaround on both Solaris and Linux platforms from my testing with both jdk 1.5 and jdk 1.6. Not sure about Mac OS X platform yet. I'll have to try it to see. I'll update this issue after I try it out.
flag suggested by petersl is -J-Dsun.java2d.pmoffscreen=false
Another workaround besides the property (which, btw, will affect rendering performance) is to use javax.imageio.ImageIO.write instead of the (soon to be removed from the jdk) JPEGImageEncoder. Also, it is typically better to use png than jpeg for diagrams and such. Dmitri
Dmitri,thanks for the info. We now managed to bypass TomSawyer library that uses JPEGImageEncoder, re-implemented the logic to save diagram using ImageIO, it works great for all platforms now.
Forgot to mention that png is now default image format for web report, the file size is much smaller than jpg, and png is lossless. We used to have performance issue with png generation (com.keypoint.PngEncoder), that's why jpg was used for report, I believe png performance issue should also go away with the latest API changes, please verify.
*** Issue 105529 has been marked as a duplicate of this issue. ***
verified in build netbeans-hudson-trunk-346-full.zip (20070606) on the following platforms: ubuntu linux local & remote using vnc solaris 10 x86 local & remote using vnc mac os x using vnc windows xp exporting diagrams to png format on local and remote using vnc also requires no more -J-Dsun.java2d.pmoffscreen=false flag.
for documentation purpose. the fix for this bug also fixed other issues (97300, 78312, 78574) not listed as duplicates in this issue.
*** Issue 108737 has been marked as a duplicate of this issue. ***
Fix of the issue was backported into release55_fixes branch and presents builds starting with Build070630. RCS file: /cvs/uml/webreport/manifest.mf,v old revision 1.1.2.6 new revision 1.1.2.6.2.1 RCS file: /cvs/uml/webreport/src/org/netbeans/modules/uml/reporting/dataobjects/DiagramData.java,v old revision 1.1.2.8 new revision 1.1.2.8.4.1 RCS file: /cvs/uml/webreport/src/org/netbeans/modules/uml/reporting/templates/help.html,v old revision 1.1.2.4 new revision 1.1.2.4.8.1 RCS file: /cvs/uml/webreport/src/org/netbeans/modules/uml/reporting/ReportTask.java,v old revision 1.1.2.15 new revision 1.1.2.15.4.1 RCS file: /cvs/uml/core/manifest.mf,v old revision 1.1.2.6.2.2 new revision 1.1.2.6.2.3 RCS file: /cvs/uml/core/src/org/netbeans/modules/uml/ui/products/ad/viewfactory/ETEGraphImageEncoder.java,v old revision 1.1.2.3 new revision 1.1.2.3.8.1 RCS file: /cvs/uml/core/src/org/netbeans/modules/uml/ui/swing/drawingarea/ADDrawingAreaControl.java,v old revision 1.1.2.24.4.2 new revision 1.1.2.24.4.3
For the record, backporting has been verified in the following platforms. Solaris 10 x86 local & remote using vnc: NB5.5, NB5.5.1 Ubuntu Linux 6.10 local & remote using vnc: NB5.5, NB5.5.1 Windows XP: NB5.5, NB5.5.1
Also verified on Mac OS.