Bug #45660 Printing in Workbench 5.1.14 crashes under Ubuntu 9.04
Submitted: 22 Jun 2009 15:55 Modified: 3 Jun 2010 14:05
Reporter: Brannon Smith Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S1 (Critical)
Version:5.1.18 OS:Linux (Ubuntu 9.04 x86)
Assigned to: Assigned Account CPU Architecture:Any
Tags: crash, diagram, printing

[22 Jun 2009 15:55] Brannon Smith
Description:
Attempts to print a one page ER diagram on Ubuntu 8.10 desktop fails and causes a seg fault. Dump to follow.

How to repeat:
Open/Create an ER diagram, attempt to print
[22 Jun 2009 15:56] Brannon Smith
Seg fault dump

Attachment: mysql-workbench.script (application/octet-stream, text), 45.92 KiB.

[23 Jun 2009 13:15] MySQL Verification Team
Thank you for the bug report.
[24 Jun 2009 9:34] Maksym Yehorov
I can not repeat it on 8.04, 8.10, 9.04.
[24 Jun 2009 9:38] Maksym Yehorov
What was the way you installed workbench? Was it via .deb package, or compiled from source?
[24 Jun 2009 14:00] Brannon Smith
Installed from latest RC .deb file
[29 Jun 2009 11:47] Johannes Taxacher
could you give our latest release - 5.1.15 - a try, because we are not able to reproduce that on out test/dev machines.

thx
[1 Jul 2009 21:38] Brannon Smith
Still getting errors (no verbose call stack though):

** Message: item_activated: 0xa8c0068 -> 'plugin:wb.print.print'
** Message: unhandled message 4: wb.print.print finished in 0.00s

** Message: rebuild options
Segmentation fault
[2 Jul 2009 14:14] Michael G. Zinner
Please try to verify this with the latest release. The stack-trace you submitted shows a call to the PaperType.height as the problem.

/usr/lib/mysql-workbench/plugins/wb.printing.wbp.so(_ZNK13app_PaperType6heightEv+0x2a)[0xabad1ece]

This issue has been fixed as of 5.1.15 so what you are seeing now is a different issue. Also, please make sure to delete your user data located in ~/.mysql/workbench

Thanks!
[2 Jul 2009 14:25] Brannon Smith
Deleted user prefs as instructed.

Still getting error for both PS file printing:
** Message: item_activated: 0x988f900 -> 'plugin:wb.print.printToPSFile'
Segmentation fault

and printing to printer:

** Message: item_activated: 0x973c7b8 -> 'plugin:wb.print.print'
** Message: unhandled message 4: wb.print.print finished in 0.00s

** Message: rebuild options
Segmentation fault
[9 Jul 2009 10:45] Susanne Ebrecht
Unfortuntately, I am not able to repeat this segmentation fault.

But when I print into PS file the result is an empty page.

Gtk-CRITICAL **: gtk_tree_view_unref_tree_helper: assertion `node != NULL' failed
** Message: item_activated: 0x307cee0 -> 'plugin:wb.print.print'
** Message: unhandled message 4: wb.print.print finished in 0,00s

** Message: rebuild options
** Message: on_begin_print 209,900000 297,000000, scale 5,000000

** (mysql-workbench-bin:22735): WARNING **: UI creation function from /home/miracee/wb51/lib/mysql-workbench/plugins/wb.printing.wbp.so returned 0

miracee@swedishchef:~/wb51$ ** Message: item_activated: 0x261fb00 -> 'plugin:wb.print.printToPSFile'
** Message: unhandled message 4: wb.print.printToPSFile finished in 0,07s

** Message: rebuild options
** Message: item_activated: 0x2d19820 -> 'plugin:wb.print.print'
** Message: unhandled message 4: wb.print.print finished in 0,00s

** Message: rebuild options
** Message: on_begin_print 209,900000 297,000000, scale 5,000000

** (mysql-workbench-bin:22735): WARNING **: UI creation function from /home/miracee/wb51/lib/mysql-workbench/plugins/wb.printing.wbp.so returned 0

I don't have a printer and so I wasn't able to test to print directly to a printer.
[20 Jul 2009 11:16] Craig Fowler
I believe I am also affected by this.

I am using Kubuntu Jaunty/Workbench 5.1.16 (.deb installer)

I can make it crash just by clicking File » Print Setup » Apply

No stack trace but will attach some STDOUT
[20 Jul 2009 11:18] Craig Fowler
STDOUT from workbench - created by choosing File » Page Setup » Apply

Attachment: workbench-log-2009-07-20_12.10.txt (text/plain), 3.38 KiB.

[20 Jul 2009 11:20] Craig Fowler
Oops - sorry to have to post again, I just spotted that it only crashes like this if I have a model actively open.  If I perform the page setup on the 'start page' of an empty project there is no crash.
[27 Jul 2009 10:08] Susanne Ebrecht
Verified as described
[6 Aug 2009 2:36] Jean-Philippe Blais
I have seg fault also when I'm trying to print.
Ubuntu 8.10
mysql-workbench-oss-5.1.16-1-i386.deb
Also with 5.1.16 from src (mysql-workbench-oss-5.1.16.tar.gz)
[14 Aug 2009 14:13] Johannes Taxacher
we cannot reproduce the problem with current source version.
please try again with upcoming version 5.1.17 (will be out later today)
[17 Aug 2009 14:23] Brannon Smith
PDF print still fails with:

(mysql-workbench-bin:21138): Gtk-CRITICAL **: gtk_tree_view_unref_tree_helper: assertion `node != NULL' failed
** Message: item_activated: 0xad07530 -> 'plugin:wb.print.printToPDFFile'
Segmentation fault

Print to printer also still fails with:

(mysql-workbench-bin:21138): Gtk-CRITICAL **: gtk_tree_view_unref_tree_helper: assertion `node != NULL' failed
** Message: item_activated: 0xad07530 -> 'plugin:wb.print.printToPDFFile'
Segmentation fault
[18 Aug 2009 10:43] Susanne Ebrecht
Seems to be related to 64bit
[28 Aug 2009 17:28] Craig Fowler
Have just tried some interactive testing with 'akojima' over IRC - here are the results:

I'm using WB 5.1.17 on Kubuntu Jaunty (that's 9.04) on x86 and installed using the new Ubuntu 9.04 .deb installer.

I can still reproduce the problem by opening a model and clicking:
File » Page Setup and then choosing "Apply"

I also suffer what appears to be the same problem by choosing:
File » Print to PDF

File » Export » Single Page PDF works just fine though
[28 Aug 2009 17:34] Craig Fowler
Output from: File » Page Setup » Apply (new copy in case it changed between versions - see my last post for my platform info)

Attachment: workbench-segfault-28-9-09.txt (text/plain), 4.44 KiB.

[10 Sep 2009 19:27] Brannon Smith
Problem persists with 5.1.18 on Ubu 9.04...

===================
Postscript:
** (mysql-workbench-bin:22704): WARNING **: /tmp/<MYFILE>.mwbd3/document.mwb.xml:3675: link '7af33018-6004-11de-8498-00219b3a47f4' <object GrtObject> key=owner could not be resolved
** Message: unhandled message 4: wb.file.openRecentModel finished in 0.18s

** Message: item_activated: 0x9657d58 -> 'plugin:wb.print.printToPSFile'
Segmentation fault

===================
PDF:
** (mysql-workbench-bin:22689): WARNING **: /tmp/<MYFILE>.mwbd2/document.mwb.xml:3675: link '7af33018-6004-11de-8498-00219b3a47f4' <object GrtObject> key=owner could not be resolved
** Message: unhandled message 4: wb.file.openRecentModel finished in 0.15s

** Message: item_activated: 0x8d53018 -> 'plugin:wb.print.printToPDFFile'
Segmentation fault

===================
Printer:
** (mysql-workbench-bin:22743): WARNING **: /tmp/<MYFILE>.mwbd4/document.mwb.xml:3675: link '7af33018-6004-11de-8498-00219b3a47f4' <object GrtObject> key=owner could not be resolved
** Message: unhandled message 4: wb.file.openRecentModel finished in 0.16s

** Message: item_activated: 0x9862a00 -> 'plugin:wb.print.print'
** Message: unhandled message 4: wb.print.print finished in 0.00s

Segmentation fault
[25 Nov 2009 13:04] Craig Fowler
Just tried reproducing this on 5.2.8 at jtaxacher's request over IRC.

I was able to reproduce it on Debian Squeeze/x86 (installed using the .deb installer for Ubuntu 9.04)

Reproduced by:

Start wb » Open a model file » File » Page Setup » [made no changes] » Apply

STDOUT from that crash to follow ...
[25 Nov 2009 13:05] Craig Fowler
STDOUT from reproducing the crash bug (may or may not differ from previously posted info)

Attachment: stdout-workbench-crash.txt (text/plain), 58.88 KiB.

[14 Dec 2009 16:12] Craig Fowler
I have just noticed that I ca't reproduce this issue on a new model that I have recently created natively in 5.2.10.  The model that I was always reproducing this crash on is an old one that has now been forward-converted through several versions of workbench.

The main thing I noticed is that the page sizes for diagrams seems far smaller on the new model, even though both models say that they are using A4 paper size (and I can't find any other settings differences between them).

Screenshots to illustrate what I mean, and then a copy of the "bad" model file to follow.
[14 Dec 2009 16:14] Craig Fowler
This is a screenshot from the 'bad' model file.  WB reports the page size is A4 but that's not the right aspect ratio for A4

Attachment: print-screenshot-1.png (image/png, text), 14.23 KiB.

[14 Dec 2009 16:15] Craig Fowler
Screenshot from a newly-created model, where I cannot reproduce the crash.  The page size looks more like an A4 aspect ratio

Attachment: print-screenshot-2.png (image/png, text), 11.80 KiB.

[3 May 2010 14:05] Alfredo Kojima
Can anyone repeat the original issue reported by George (crash on print, not page setup) with 5.2.20?
[4 May 2010 8:44] Craig Fowler
Confirmed on 5.2.20/32-bit Linux (using the .deb for Ubuntu 9.10).

I can't reproduce the problem (either problem - crash on print or on page setup) using a recently-created model file or on a new model file.

I can reproduce it with a really old (18 months?) model file - see the notes above including private .mwb attachment.  However - that model is troublesome in a few ways, so I am not really worried if it never gets solved.  I have no real plans to print from it anyway and if I really need to then I can just export to .sql and then reverse-engineer into a fresh .mwb, and that should solve my issues.

One thing I did spot on that older model file is that the page size (paper size) seemed very strange - whilst page setup was reporting it as A4 (a standard UK paper size) the aspect ratio of the page was certainly not A4.  On more recent models it did actually appear to be the correct aspect ratio.  This leads me to believe that the crash might be related to an invalid/impossible paper size selected.  On the old model, I can't change paper size though since WB crashes as I leave Page Setup.
[4 May 2010 8:52] Craig Fowler
Sorry for the noise - just realised I was unclear in that comment:

"a really old (18 months?) model file"

I mean a really old model file that has been forward-converted a few times over several releases of Workbench (if anyone is REALLY interested - I have the model file in git so I could go get version 1 of that .mwb if you wanted it)
[3 Jun 2010 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".