← Back to team overview

sikuli-driver team mailing list archive

[Bug 1053438] Re: X-1.0rc3: IDE: Loading Sikuli project with missing images triggers NullPointerException --- use r930

 

** Changed in: sikuli
   Importance: Undecided => Low

** Changed in: sikuli
     Assignee: (unassigned) => RaiMan (raimund-hocke)

** Changed in: sikuli
    Milestone: None => x1.0

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1053438

Title:
  X-1.0rc3: IDE: Loading Sikuli project with missing images triggers
  NullPointerException --- use r930

Status in Sikuli:
  Fix Committed

Bug description:
  In Sikuli X-1.0 RC3 (r905):

  The editor breaks when I try to load a file that references a missing
  PNG image.

  Simplest file I found that reproduces this is:

  find("1342447237817.png")

  After it breaking, I notice two things: 
   - The title is not loaded: is is still "Unnamed" (or whatever translated to the Dutch word "Naamloos")
   - No image is loaded after the missing link

  On a side note, some minor bugs:

  - Saving an existing project to a different name will duplicate the <old name>.sikul and the <new name>.sikuli and html files in the new folder. (on W7, 64 bits). 
  - The editor will also load a new 'Unnamed file', even when other files are still open (so I find an extra"Unnamed" tab when I restart the editor).
  - Due to cutting and pasting some code (which contained an image) in the Sikuli editor, saving the file and then re-opening will give a NullPointerException. Cleaning up the images is a little bit too rigorous. If there would be any other (non-related) PNG files in the directory, these would also be deleted. Is it an idea to include the option that Sikuli does NOT clean up the PNG files?

  Exception trace reported by Sikuli:

  java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.sikuli.ide.SikuliIDE$MenuAction.actionPerformed(SikuliIDE.java:1065)
   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
   at javax.swing.AbstractButton.doClick(Unknown Source)
   at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
   at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
   at java.awt.Component.processMouseEvent(Unknown Source)
   at javax.swing.JComponent.processMouseEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Window.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.awt.EventQueue.access$000(Unknown Source)
   at java.awt.EventQueue$1.run(Unknown Source)
   at java.awt.EventQueue$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
   at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue$2.run(Unknown Source)
   at java.awt.EventQueue$2.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
  Caused by: java.lang.NullPointerException
   at org.sikuli.ide.ImageButton.createFromString(ImageButton.java:241)
   at org.sikuli.ide.SikuliPane.replaceWithImage(SikuliPane.java:617)
   at org.sikuli.ide.SikuliPane.parseLine(SikuliPane.java:568)
   at org.sikuli.ide.SikuliPane.parseRange(SikuliPane.java:528)
   at org.sikuli.ide.SikuliPane.parse(SikuliPane.java:543)
   at org.sikuli.ide.SikuliPane.parse(SikuliPane.java:546)
   at org.sikuli.ide.SikuliPane.read(SikuliPane.java:427)
   at org.sikuli.ide.SikuliPane.loadFile(SikuliPane.java:372)
   at org.sikuli.ide.SikuliPane.loadFile(SikuliPane.java:383)
   at org.sikuli.ide.SikuliIDE$FileAction.doLoad(SikuliIDE.java:1411)
   ... 43 more

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1053438/+subscriptions


References