BUG DESCRIPTION:
----------------
Calling exportUI on a non dockable figure crashes scilab (5.5.1 and 6.0.0 beta1) on linux 64bits.
Is this related to bug 14502: https://bugzilla.scilab.org/show_bug.cgi?id=14502 ???
No problem with a dockable figure.
ERROR LOG:
----------
HOW TO REPRODUCE THE BUG:
-------------------------
//content of 2_bug_exportUI.sce
demo_fp = figure("dockable", "off");// kills scilab 5.5 and 6.0
// demo_fp = figure("dockable", "on"); // no problem
demo_fp.figure_id = 100001;
exportUI(100001);
OTHER INFORMATION:
------------------
Here are the error logs for both 5.5 and 6.0
// ERROR LOG 5.5.1
//
//exec('/home/myusername/simulations/2_bug_exportUI.sce', -1)
// exportUI(100001);
// !--error 42
//A fatal error has been detected by Scilab.
//Your instance will probably quit unexpectedly soon.
//If a graphic feature has been used, this might be caused by the system graphic drivers.
//Please try to update them and run this feature again.
//You can report a bug on http://bugzilla.scilab.org/ with:
//* a sample code which reproduces the issue
//* the result of [a, b] = getdebuginfo()
//* the following information:
//[mypc:28866] Signal: Aborted (6)
//[mypc:28866] Signal code: (-6)
//
//Call stack:
// 1: 0x36c37 <gsignal> (/lib/x86_64-linux-gnu/libc.so.6)
// 2: 0x3a028 <abort> (/lib/x86_64-linux-gnu/libc.so.6)
// 3: 0x5df7d < > (scilab-bin)
// 4: 0x589a6 < > (scilab-bin)
// 5: 0x589d3 < > (scilab-bin)
// 6: 0x5787e < > (scilab-bin)
// 7: 0x3e317 <org_scilab_modules_gui_bridge::CallScilabBridge::newExportFileChooser(JavaVM_*, int)> (/home/myusername/softs/scilab-5.5.0/lib/scilab/libscigui.so.5)
// 8: 0x4ff9f <exportUserInterface> (/home/myusername/softs/scilab-5.5.0/lib/scilab/libscigui.so.5)
// 9: 0x271b7 <sci_exportUI> (/home/myusername/softs/scilab-5.5.0/lib/scilab/libscigui.so.5)
// 10: 0x1acbd <gw_gui> (/home/myusername/softs/scilab-5.5.0/lib/scilab/libscigui.so.5)
// 11: 0x17ae88 <callinterf_> (/home/myusername/softs/scilab-5.5.0/lib/scilab/libscilab-cli.so.0)
// 12: 0x18ff19 <scirun_> (/home/myusername/softs/scilab-5.5.0/lib/scilab/libscilab-cli.so.0)
// 13: 0x18b288 <realmain> (/home/myusername/softs/scilab-5.5.0/lib/scilab/libscilab-cli.so.0)
// 14: 0x71c5 < > (scilab-bin)
// 15: 0x21f45 <__libc_start_main> (/lib/x86_64-linux-gnu/libc.so.6)
// 16: 0x6a25 < > (scilab-bin)
//End of stack
//
//
//at line 4 of exec file called by :
//mulations/2_bug_exportUI.sce', -1
//
// !--error 999
//Aborting current computation
// LOG ERROR 6.0.0-beta-1 : crash, this is what appears on the command line
//
//terminate called after throwing an instance of 'GiwsException::JniCallMethodException'
// what(): Exception when calling Java method : org.scilab.modules.gui.bridge.tab.SwingScilabStaticPanel cannot be cast to org.scilab.modules.gui.bridge.tab.SwingScilabDockablePanel
// at org.scilab.modules.gui.bridge.filechooser.SwingScilabExportFileChooser.<init>(Unknown Source)
// at org.scilab.modules.gui.filechooser.ScilabFileChooserBridge.createExportFileChooser(Unknown Source)
// at org.scilab.modules.gui.bridge.ScilabBridge.createExportFileChooser(Unknown Source)
// at org.scilab.modules.gui.filechooser.ScilabFileChooser.<init>(Unknown Source)
// at org.scilab.modules.gui.filechooser.ScilabFileChooser.createExportFileChooser(Unknown Source)
// at org.scilab.modules.gui.bridge.CallScilabBridge.newExportFileChooser(Unknown Source)
//org.scilab.modules.gui.bridge.tab.SwingScilabStaticPanel cannot be cast to org.scilab.modules.gui.bridge.tab.SwingScilabDockablePanel
// at org.scilab.modules.gui.bridge.filechooser.SwingScilabExportFileChooser.<init>(Unknown Source)
// at org.scilab.modules.gui.filechooser.ScilabFileChooserBridge.createExportFileChooser(Unknown Source)
// at org.scilab.modules.gui.bridge.ScilabBridge.createExportFileChooser(Unknown Source)
// at org.scilab.modules.gui.filechooser.ScilabFileChooser.<init>(Unknown Source)
// at org.scilab.modules.gui.filechooser.ScilabFileChooser.createExportFileChooser(Unknown Source)
// at org.scilab.modules.gui.bridge.CallScilabBridge.newExportFileChooser(Unknown Source)
//
//A fatal error has been detected by Scilab.
//Your instance will probably quit unexpectedly soon.
//If a graphic feature has been used, this might be caused by the system graphic drivers.
//Please try to update them and run this feature again.
//You can report a bug on http://bugzilla.scilab.org/ with:
//* a sample code which reproduces the issue
//* the result of [a, b] = getdebuginfo()
//* the following information:
//[mypc:28697] Signal: Segmentation fault (11)
//[mypc:28697] Signal code: Address not mapped (1)
//[mypc:28697] Failing at address: 0xffffffffd4411401
//
//Call stack:
// 1: 0x914da6 <JVM_handle_linux_signal> (/home/myusername/softs/scilab-6.0.0-beta-1/thirdparty/java//lib/amd64/server/libjvm.so)
// 2: 0x90b6f3 < > (/home/myusername/softs/scilab-6.0.0-beta-1/thirdparty/java//lib/amd64/server/libjvm.so)
// 3: 0x10330 < > (/lib/x86_64-linux-gnu/libpthread.so.0)
// 4: 0x4b943 <_IO_vfprintf> (/lib/x86_64-linux-gnu/libc.so.6)
// 5: 0x72499 <vsnprintf> (/lib/x86_64-linux-gnu/libc.so.6)
// 6: 0x54472 <snprintf> (/lib/x86_64-linux-gnu/libc.so.6)
// 7: 0x1d93e2 < > (/home/myusername/softs/scilab-6.0.0-beta-1/lib/scilab/libscilab-cli.so.0)
// 8: 0x10330 < > (/lib/x86_64-linux-gnu/libpthread.so.0)
// 9: 0x36c37 <gsignal> (/lib/x86_64-linux-gnu/libc.so.6)
// 10: 0x3a028 <abort> (/lib/x86_64-linux-gnu/libc.so.6)
// 11: 0x60535 <__gnu_cxx::__verbose_terminate_handler()> (/usr/lib/x86_64-linux-gnu/libstdc++.so.6)
// 12: 0x5e6d6 < > (/usr/lib/x86_64-linux-gnu/libstdc++.so.6)
// 13: 0x5e703 < > (/usr/lib/x86_64-linux-gnu/libstdc++.so.6)
// 14: 0x5e922 < > (/usr/lib/x86_64-linux-gnu/libstdc++.so.6)
// 15: 0x3a933 <org_scilab_modules_gui_bridge::CallScilabBridge::newExportFileChooser(JavaVM_*, int)> (/home/myusername/softs/scilab-6.0.0-beta-1/lib/scilab/libscigui.so.6)
// 16: 0x25669 <sci_exportUI> (/home/myusername/softs/scilab-6.0.0-beta-1/lib/scilab/libscigui.so.6)
// 17: 0x3c1a13 <types::WrapFunction::call(std::vector<types::InternalType*, std::allocator<types::InternalType*> >&, std::unordered_map<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, types::InternalType*, std::hash<std::basic_string<wcha> (/home/myusername/softs/scilab-6.0.0-beta-1/lib/scilab/libsciast.so.6)
// 18: 0x3b7048 <types::Callable::invoke(std::vector<types::InternalType*, std::allocator<types::InternalType*> >&, std::unordered_map<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, types::InternalType*, std::hash<std::basic_string<wchar_> (/home/myusername/softs/scilab-6.0.0-beta-1/lib/scilab/libsciast.so.6)
// 19: 0x1c1714 <ast::RunVisitorT<ast::ExecVisitor>::visitprivate(ast::CallExp const&)> (/home/myusername/softs/scilab-6.0.0-beta-1/lib/scilab/libsciast.so.6)
// 20: 0x1bba5c <ast::RunVisitorT<ast::ExecVisitor>::visitprivate(ast::SeqExp const&)> (/home/myusername/softs/scilab-6.0.0-beta-1/lib/scilab/libsciast.so.6)
// 21: 0x11211 <sci_exec> (/home/myusername/softs/scilab-6.0.0-beta-1/lib/scilab/libscifunctions.so.6)
// 22: 0x3c149e <types::DynamicFunction::call(std::vector<types::InternalType*, std::allocator<types::InternalType*> >&, std::unordered_map<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, types::InternalType*, std::hash<std::basic_string<w> (/home/myusername/softs/scilab-6.0.0-beta-1/lib/scilab/libsciast.so.6)
// 23: 0x3b7048 <types::Callable::invoke(std::vector<types::InternalType*, std::allocator<types::InternalType*> >&, std::unordered_map<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, types::InternalType*, std::hash<std::basic_string<wchar_> (/home/myusername/softs/scilab-6.0.0-beta-1/lib/scilab/libsciast.so.6)
// 24: 0x1c1714 <ast::RunVisitorT<ast::ExecVisitor>::visitprivate(ast::CallExp