scilab crash after xsave on closing specific bar() figure
Bug Description
Scilab 2023.1.0 on WIN10 is crashing after xsave on closing specific bar() figure. The figure is built through successive calls to bar() in a loop to change the color of each bar .
Steps to reproduce
Execute the code below including the xsave command and then try to close the figure window: it crashes Scilab If you don't xsave the figure, you can close it without trouble and continue to work
Once you xsaved the figure, it seems you can continue to work in the console for instance without trouble but it crashes Scilab if attempting to close any further graphic window or trying to exit scilab.
If you try to xload the saved figure after the crash, you can open the figure without trouble.
scf()
colors = ['scilabblue4' 'scilabgreen4' 'scilabcyan4' 'scilabred4' 'scilabbrown4' 'scilabmagenta4']
y= [68;69;58;62;70;65]
for m = 1:6
bar(m, y(m),0.5, colors(m))
end
xsave(TMPDIR+'bartest_xsave.scg')
What is the expected correct behavior?
We expect to close the figure after execution of the script without crashing Scilab, for further load thereafter.
Error log
no error since Scilab is crashing.