Skip to content
This repository has been archived by the owner on Mar 14, 2018. It is now read-only.

[Exception] IDE get Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException when insert a image #308

Open
karlinmilk opened this issue Feb 23, 2018 · 2 comments

Comments

@karlinmilk
Copy link

karlinmilk commented Feb 23, 2018

I can't insert any image in IDE, it always get exception as below:
[info] load image: D:/Jolin/Powershell/Pattern/ROG_GamingCenter/GamingCenter.png

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at org.sikuli.ide.EditorPatternButton.createThumbnailImage(EditorPatternButton.java:234)
at org.sikuli.ide.EditorPatternButton.setFilename(EditorPatternButton.java:204)
at org.sikuli.ide.EditorPatternButton.init(EditorPatternButton.java:76)
at org.sikuli.ide.EditorPatternButton.(EditorPatternButton.java:49)
at org.sikuli.ide.SikuliIDE$ButtonInsertImage.actionPerformed(SikuliIDE.java:2180)
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.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java

And the IDE will be closed automatically if I screenshot a image.
Please help to clarify the issue.

Issue Screenshot:
https://drive.google.com/open?id=1zv9hBpnz7Mpxz5JTsaRd-FltPLXa9W_R

Sikulix- v1.1.1.1
Java - version
java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)

@karlinmilk karlinmilk changed the title [Exception] IDE get Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException when insert imsge [Exception] IDE get Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException when insert a image Feb 23, 2018
@RaiMan
Copy link
Owner

RaiMan commented Feb 23, 2018

Are you using the shortcuts in the lefthand bar?

if yes,

  • try with an empty tab
  • write click()
  • position the cursor between ()
  • click the "Take Screenshot" button in the top bar

What Windows is it?

@karlinmilk
Copy link
Author

Yes, I used shorts in the lefthand bar.
I have tried the method you provided, but the issue still happened.

My windows is
Windows10 Pro
version:1709
OS build: 16299.248

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants