When I try to open a matlab .m file renamed to .sci, a lot of exceptions are thr
Reported by Yann COLLETTE
-- Bug description --
When I try to open a matlab .m file renamed to .sci, a lot of exceptions are thrown.
-- Scilab error message --
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 31
at org.scilab.modules.scinotes.ScilabView.drawUnselectedText(Unknown Source)
at javax.swing.text.WrappedPlainView.drawText(WrappedPlainView.java:125)
at javax.swing.text.WrappedPlainView.drawLine(WrappedPlainView.java:96)
at javax.swing.text.WrappedPlainView$WrappedLine.paint(WrappedPlainView.java:589)
at javax.swing.text.BoxView.paintChild(BoxView.java:144)
at javax.swing.text.BoxView.paint(BoxView.java:416)
at javax.swing.text.WrappedPlainView.paint(WrappedPlainView.java:356)
at org.scilab.modules.scinotes.ScilabView.paint(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI$RootView.paint(BasicTextUI.java:1422)
at javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:722)
at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:869)
at javax.swing.plaf.synth.SynthEditorPaneUI.paint(SynthEditorPaneUI.java:133)
at javax.swing.plaf.synth.SynthEditorPaneUI.update(SynthEditorPaneUI.java:128)
at javax.swing.JComponent.paintComponent(JComponent.java:752)
at javax.swing.JComponent.paint(JComponent.java:1029)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JViewport.paint(JViewport.java:747)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at org.scilab.modules.gui.bridge.tab.SwingScilabTab.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at org.flexdock.docking.defaults.DefaultDockingPort.paint(DefaultDockingPort.java:1976)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5124)
at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:278)
at javax.swing.RepaintManager.paint(RepaintManager.java:1224)
at javax.swing.JComponent._paintImmediately(JComponent.java:5072)
at javax.swing.JComponent.paintImmediately(JComponent.java:4882)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:785)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:713)
at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:693)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:125)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
-- How to reproduce the bug --
Created an attachment (id=1875)
an example of problematic file