Community
Participate
Working Groups
Build Identifier: 20110916-0149 When parsing the MainWindow source file, WindowBuilder reports: Internal Error WindowBuilder encountered unexpected internal error. This could be caused by a WindowBuilder bug or by a misconfiguration issue, conflict, partial update, etc. java.lang.IllegalArgumentException: Width (0) and height (49) cannot be <= 0 The funny thing is, when I comment out lines 140-141 in the source file, the file parses ok. The code in question is: this.genotypeCanvas = new Canvas(); this.scrollPane.setRowHeaderView(this.genotypeCanvas); What's even more interesting, commenting out two similar lines initializing two other canvas (for the column header and for the viewport itself) does not help at all. The full WindowBuilder report (including the source file in question) is attached. Reproducible: Always Steps to Reproduce: 1. Open the MainWindow.java file in WindowBuilder, 2. ...voila! 3. You can switch to the source view, and recreate the crash easily by switching back to the design view. Try to comment out the two lines mentioned above, and the crash disappears.
Created attachment 208646 [details] The full crash report. What really matters here is the MainWindow.java file.
Use code hiding tags for a simple work around... http://code.google.com/javadevtools/wbpro/preferences/preferences_code_parsing.html
True, Eric, the code hiding tags do work, so the bug is not as severe as I thought it was. That said, the bug is still there.
Fixed in trunk. We already have tweak in WindowBuilder to create image 1x1 instead of 0x0, but actually we should not even try to create image of such component and can just return such 1x1 image as is, empty. Because some components may just fail when we ask them to paint with size 0x0.