Bug #78202 Data export and import lead to unhandled expection in mforms
Submitted: 25 Aug 2015 9:10 Modified: 22 Dec 2016 11:15
Reporter: Jonathan Gruber Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S2 (Serious)
Version:6.3.4.0 build 828 (64 bits) OS:Linux (Arch Linux)
Assigned to: CPU Architecture:Any
Tags: export, import, mforms

[25 Aug 2015 9:10] Jonathan Gruber
Description:
When either using data export or import the following error message is immediately shown after clicking on the "Start Export / Import" button:

Unhandled exception: Wrong number or type of arguments for overloaded function 'TextBox_append_text_and_scroll'.
  Possible C/C++ prototypes are:
    mforms::TextBox::append_text_and_scroll(std::string const &,bool)
    mforms::TextBox::append_text_and_scroll(std::string const &)

I expected the Workbench to simply perform the desired dump or import actions, however it will export the data only partially. This means that, it will begin to write the file if "self contained file" is chosen, but does not always succeeds in performing a complete dump. It simply aborts at a specific point. Importing data seems to work in principle, but the error message shows up just as well and the user has no visual feedback of the progress.

After closing the error dialogue, the user interface indicates that the import or export respectively would still be running, even though nothing seems to happen afterwards. When clicking on the "stop" button the application freezes and gets unresponsive. In this case all I could think of is simply to kill it.

If you need further information, please let me know.

How to repeat:
1) Choose "Data Export" or "Data Import" in the management tab and select database tables to export or a SQL file to import respectively. 

2) Click on "Start Import" or "Start Export".

3) The above exception is immediately shown in an error dialogue.

4) Click on the "Ok" button in the error dialoge.

5) The application and user interface gets unresponsive and no further actions seems possible.

Suggested fix:
The call of mforms::TextBox::append_text_and_scroll should be analysed.
[25 Aug 2015 9:14] Jonathan Gruber
In addition I just encountered the same error message, when clicking on the "New..." button in the Data Import dialogue in the fieldset "Default Schema to be Imported to".
[2 Sep 2015 13:05] Giorgio Premi
Same problem for me on Gentoo.

I looked into the code, and found a conditional statement which suggest the problem relate to the swig library. Here a relevant part from file "library/forms/mforms/textbox.h":

#ifdef SWIG
#if SWIG_VERSION < 0x030003   // starting with SWIG v3.0.3, this is no longer necessary (https://github.com/swig/swig/pull/201)
//workaround for problem with unicode strings and default args in swig
%rename(append_text_and_scroll) append_text(const std::string &text, bool scroll_to_end);
%rename(append_text) append_text(const std::string &text);

%rename(append_text_with_encoding_and_scroll) append_text_with_encoding(const std::string &text, const std::string &encoding, bool scroll_to_end);
%rename(append_text_with_encoding) append_text_with_encoding(const std::string &text, const std::string &encoding);
#endif
#endif

mysql-workbench-6.3.4
swig-3.0.5

Bug #78212 is a duplicate of this one.
[3 Sep 2015 9:07] Giorgio Premi
Workaround for Swig 3.0.5 (at least)

Attachment: swig.patch (text/x-patch), 1.71 KiB.

[3 Sep 2015 9:10] Giorgio Premi
I've removed the conditions for Swig > 3.0.3 from source the source code and everything seems to work correctly with Swig 3.0.5.

So the fix from https://github.com/swig/swig/pull/201 probably don't work correctly/as expected, or it is introduced in another version of the software.
[13 Nov 2015 2:39] Nguyen Hiep
I have the same problem with mySQL workbench 6.3. I run mySQL workbench on ubuntu 15.10
[14 Nov 2015 19:54] MySQL Verification Team
http://bugs.mysql.com/bug.php?id=78212 marked as duplicate of this one.
[25 Feb 2016 16:35] Michael Mol
I'm seeing the same behavior when I attempt to export.

MySQL Workbench 6.3

Version 6.3.4.0 build 828 (64 bits)  Community

Gentoo 64-bit.

<pre>

mikemol@serenity ~ $ eix workbench
[I] dev-db/mysql-workbench
     Available versions:  6.3.3 ~6.3.4 6.3.4-r1 ~6.3.4-r2 {debug doc gnome-keyring PYTHON_TARGETS="python2_7"}
     Installed versions:  6.3.4-r1(01:39:16 AM 01/04/2016)(gnome-keyring -debug -doc PYTHON_TARGETS="python2_7")
     Homepage:            http://dev.mysql.com/workbench/
     Description:         MySQL Workbench
</pre>
[24 Mar 2016 20:24] MySQL Verification Team
http://bugs.mysql.com/bug.php?id=80855 marked as duplicate of this one.
[24 Mar 2016 20:44] André verwijs
i've upgraded to 6.3.6 build 511 CE and seems to work correctly....

André
[10 Apr 2016 12:17] Adam Scheller
I was experiencing the same issue with 6.3.4. I have just compiled 6.3.6 (downloaded from the website) and the issue is not present in this version.

I am using Gentoo Linux.
[22 Nov 2016 11:15] MySQL Verification Team
Please try version 6.3.8. Thanks.
[23 Dec 2016 1: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".