[1.1.0 beta] IDE: at quit crash in Image.purge() --- fixed in 1.1.0

Bug #1239720 reported by Luciana Moreira Sá de Souza on 2013-10-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sikuli
Critical
RaiMan

Bug Description

After editing a script in Sikuli-IDE, and pressing the "X" button to exit, I got a null pointer exception as follows:

[debug] FileManager: tempdir delete: /home/lucianamssouza/Development/workspaces/workspace-sikuli/tests/src/test/resources/test2.sikuli/

Exception in thread "MainThread" java.lang.NullPointerException

at org.sikuli.basics.Image.purge(Image.java:224)
at org.sikuli.ide.EditorPane.close(EditorPane.java:317)
at org.sikuli.ide.SikuliIDE$FileAction.doCloseTab(SikuliIDE.java:961)
at org.sikuli.ide.SikuliIDE.closeCurrentTab(SikuliIDE.java:988)
at org.sikuli.ide.SikuliIDE$FileAction.doQuit(SikuliIDE.java:834)
at org.sikuli.ide.SikuliIDE.quit(SikuliIDE.java:997)
at org.sikuli.ide.SikuliIDE$8.windowClosing(SikuliIDE.java:2199)
at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:349)
at java.awt.Window.processWindowEvent(Window.java:2051)
at javax.swing.JFrame.processWindowEvent(JFrame.java:296)
at java.awt.Window.processEvent(Window.java:2009)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.jav

a:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpE

In the debugger I see that the problem

vents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

In the debugger I see that the following code generates the problem:

public static void purge(String bundlePath) {
    URL pathURL = FileManager.makeURL(bundlePath);
    if (!ImagePath.getPaths().get(0).pathURL.equals(pathURL)) {
      log(-1, "purge: not current bundlepath: " + pathURL);
      return;
    }

More specifically, ImagePath.getPaths().get(0) is null. But it has a second element which is not null.

RaiMan (raimund-hocke) wrote :

Ok, thanks, but that is in the develop branch of SikuliX-1.1

The new Image/ImagePath feature is not yet completely tested especially with the IDE.

For bugs related to the version 1.1 under development I would prefer to get issue notes on GitHub.

summary: - NullPointerException occurs when exiting Sikuli IDE
+ [1.1.0 beta] IDE: at quit crash in Image.purge()
Changed in sikuli:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0

Yes it is on 1.1.0. As the other bugs got fixed on this branch I migrated to this version and am using it now. For new bugs I will provide issue notes in GitHub.

RaiMan (raimund-hocke) wrote :

ok, thanks.

RaiMan (raimund-hocke) on 2015-09-17
Changed in sikuli:
importance: High → Critical
summary: - [1.1.0 beta] IDE: at quit crash in Image.purge()
+ [1.1.0 beta] IDE: at quit crash in Image.purge() --- fixed in 1.1.0
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers