[1.1.0-Beta1] Loosing images in comments on saving or when saving seems impossible

Asked by Bill Seddon

Sikuli is a great tool but I'm having problems with the IDE (1.1.0 beta-1). The one prompting this post is this message:

[error] IDE: Problem when trying to invoke menu action doSave Error: null

I've seen this error a few times and I know at this point I have to close the application and will likely lose images. Losing images is the other issue that needs to be addressed. Fortunately taking regular copies helps to combat this error but it is difficult because it doesn't appear to be predictable when images will be deleted.

I did discover that if I comment out, say, a find() to test something and then run (and save) that images are lost. So I don't do that any more. Maybe when the save error occurs the IDE thinks all the images are in comment lines so deletes them?

Revision history for this message
Shengyuan Gu (gushengyuan2002) said :
#1

I met the same issue on 1.1.0 beta1.
When I try to save the content in SikuliX IDE, I get the "doSave Error" message on the Message Window, then I try to close the IDE forcibly and open the IDE again, I find that the content is saved actually.

My environment:
Windows7 32bits
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) Client VM (build 24.60-b09, mixed mode, sharing)

Error Message:
[error] IDE: Problem when trying to invoke menu action doSave Error: null

[error] IDE: Problem when trying to invoke menu action doSave Error: null

Exception in thread "MainThread" java.lang.StackOverflowError
at java.util.regex.Pattern$Slice.match(Unknown Source)
at java.util.regex.Pattern$LazyLoop.match(Unknown Source)
at java.util.regex.Pattern$GroupTail.match(Unknown Source)
at java.util.regex.Pattern$BranchConn.match(Unknown Source)
at java.util.regex.Pattern$CharProperty.match(Unknown Source)
at java.util.regex.Pattern$Branch.match(Unknown Source)
at java.util.regex.Pattern$GroupHead.match(Unknown Source)
at java.util.regex.Pattern$LazyLoop.match(Unknown Source)
at java.util.regex.Pattern$GroupTail.match(Unknown Source)
at java.util.regex.Pattern$BranchConn.match(Unknown Source)
at java.util.regex.Pattern$CharProperty.match(Unknown Source)
at java.util.regex.Pattern$Branch.match(Unknown Source)
at java.util.regex.Pattern$GroupHead.match(Unknown Source)
at java.util.regex.Pattern$LazyLoop.match(Unknown Source)
at java.util.regex.Pattern$GroupTail.match(Unknown Source)
at java.util.regex.Pattern$BranchConn.match(Unknow

n Source)
at java.util.regex.Pattern$CharProperty.match(Unknown Source)
at java.util.regex.Pattern$Branch.match(Unknown Source)
at java.util.regex.Pattern$GroupHead.match(Unknown Source)
at java.util.regex.Pattern$LazyLoop.match(Unknown Source)
at java.util.regex.Pattern$GroupTail.match(Unknown Source)
at java.util.regex.Pattern$BranchConn.match(Unknown Source)
at java.util.regex.Pattern$CharProperty.match(Unknown Source)
at java.util.regex.Pattern$Branch.match(Unknown Source)
at java.util.regex.Pattern$GroupHead.match(Unknown Source)
at java.util.regex.Pattern$LazyLoop.match(Unknown Source)
at java.util.regex.Pattern$GroupTail.match(Unknown Source)
at java.util.regex.Pattern$BranchConn.match(Unknown Source)
at java.util.regex.Pattern$BmpCharProperty.match(Unknown Source)
at java.util.regex.Pattern$Branch.match(Unknown Source)
at java.util.regex.Pattern$GroupHead.match(Unknown Source)
at java.util.regex.Pattern$LazyLoop.match(Unknown Source)
at java.util.regex.Pattern$GroupTa

il.match(Unknown Source)

Revision history for this message
RaiMan (raimund-hocke) said :
#2

The "loosing images on save" problem should be fixed with the now available Beta2.
If you have the time, it would be great, that you test it.

regarding the above StackOverFlow error:
How many lines does the script have?
I am using a Lexer library, to analyse the script, to find out, which images are used in the script.
The problem seems to be in there.
So it looks like a recursive call problem in the Lexer.

Revision history for this message
Shengyuan Gu (gushengyuan2002) said :
#3

Hi RaiMan,

I Just got a try using the 1.1.0 beta2, when I tried to save the project, all the used images are deleted, seems like the Bug #1331924 is still existed.

Please see the logs with "-d 3" option:

[debug] EditorConsolePane: stdout/stderr redirected to console for jython

[info] HotkeyManager: addCaptureHotkey: CTRL+SHIFT 2
[info] HotkeyManager: addAbortHotkey: ALT+SHIFT C
[debug] restore session at 1: D:/workspace_sikuli/20140702143200.sikuli/
[debug] FileManager: tempdir create: C:\Users\GUSHEN~1\AppData\Local\Temp\gushengyuan\tmp--1742854938.sikuli
[debug] ImagePath: new BundlePath: C:/Users/GUSHEN~1/AppData/Local/Temp/gushengyuan/tmp--1742854938.sikuli/
[debug] InitTab: (text/python)
[debug] ImagePath: new BundlePath: D:/workspace_sikuli/20140702143200.sikuli/
[debug] JythonScriptRunner: init: python.path hack: D:\SikuliX110b2\sikulix.jar\Lib
[debug] InitTab: (text/python)
[debug] SikuliEditorKit.read

[debug] restore session at 2: D:/workspace_sikuli/login.sikuli/
[debug] FileManager: tempdir create: C:\Users\GUSHEN~1\AppData\Local\Temp\gushengyuan\tmp--608716429.sikuli
[debug] ImagePath: new BundlePath: C:/Users/GUSHEN~1/AppData/Local/Temp/gushengyuan/tmp--608716429.sikuli/
[debug] InitTab: (text/python)
[debug] ImagePath: new BundlePath: D:/workspace_sikuli/login.sikuli/
[debug] InitTab: (text/python)
[debug] SikuliEditorKit.read
[debug] ImagePath: new BundlePath: D:/workspace_sikuli/20140702143200.sikuli/
[debug] Sikuli-IDE startup: 1520

[debug] ImagePath: new BundlePath: D:/workspace_sikuli/login.sikuli/

[debug] Image: purge: file:D:/workspace_sikuli/login.sikuli/
[debug] Image: After Purge (0): Max 64 MB (0 / 0 %) (0))
[debug] ImagePath: new BundlePath: D:/workspace_sikuli/20140702143200.sikuli/

[debug] MenuAction.doLoad
[debug] FileManager: tempdir create: C:\Users\GUSHEN~1\AppData\Local\Temp\gushengyuan\tmp--184869831.sikuli
[debug] ImagePath: new BundlePath: C:/Users/GUSHEN~1/AppData/Local/Temp/gushengyuan/tmp--184869831.sikuli/

[debug] ImagePath: new BundlePath: D:/workspace_sikuli/login.sikuli/
[debug] InitTab: (text/python)
[debug] SikuliEditorKit.read
[debug] Image: added to image list: ocr_tag.png with URL: file:D:/workspace_sikuli/login.sikuli/ocr_tag.png
[debug] Image: loaded ocr_tag.png (9 KB of 64 MB (1 / 0 %) (9))
[debug] Image: added to image list: ocr_picture.png with URL: file:D:/workspace_sikuli/login.sikuli/ocr_picture.png
[debug] Image: loaded ocr_picture.png (5 KB of 64 MB (2 / 0 %) (15))
[debug] setTargetOffset: L(-150,0)
[debug] Image: added to image list: login_button.png with URL: file:D:/workspace_sikuli/login.sikuli/login_button.png
[debug] Image: loaded login_button.png (13 KB of 64 MB (3 / 0 %) (28))
[debug] Image: added to image list: ocr_error.png with URL: file:D:/workspace_sikuli/login.sikuli/ocr_error.png
[debug] Image: loaded ocr_error.png (5 KB of 64 MB (4 / 0 %) (34))

[debug] Image: added to image list: login_logo.png with URL: file:D:/workspace_sikuli/login.sikuli/login_logo.png
[debug] Image: loaded login_logo.png (173 KB of 64 MB (5 / 0 %) (207))
[debug] Image: added to image list: login_username.png with URL: file:D:/workspace_sikuli/login.sikuli/login_username.png
[debug] Image: loaded login_username.png (8 KB of 64 MB (6 / 0 %) (216))
[debug] setTargetOffset: L(-10,0)
[debug] Image: added to image list: login_password.png with URL: file:D:/workspace_sikuli/login.sikuli/login_password.png
[debug] Image: loaded login_password.png (9 KB of 64 MB (7 / 0 %) (225))

[debug] MenuAction.doSave
[debug] Image: purge: file:D:/workspace_sikuli/login.sikuli/
[debug] Image: purge: entry: file:D:/workspace_sikuli/login.sikuli/login_username.png
[debug] Image: purge: entry: file:D:/workspace_sikuli/login.sikuli/ocr_error.png
[debug] Image: purge: entry: file:D:/workspace_sikuli/login.sikuli/login_button.png
[debug] Image: purge: entry: file:D:/workspace_sikuli/login.sikuli/ocr_tag.png
[debug] Image: purge: entry: file:D:/workspace_sikuli/login.sikuli/login_password.png
[debug] Image: purge: entry: file:D:/workspace_sikuli/login.sikuli/login_logo.png
[debug] Image: purge: entry: file:D:/workspace_sikuli/login.sikuli/ocr_picture.png
[debug] Image: purge: bimg: ocr_tag.png: (103x30)
[debug] Image: purge: bimg: ocr_picture.png: (68x30)
[debug] Image: purge: bimg: login_button.png: (144x33)
[debug] Image: purge: bimg: ocr_error.png: (92x20)
[debug] Image: purge: bimg: login_logo.png: (377x157)
[debug] Image: purge: bimg: login_username.png: (89x34)
[debug] Image: purge:

bimg: login_password.png: (96x33)
[debug] Image: After Purge (7): Max 64 MB (0 / 0 %) (0))
[debug] IDE: writeSrcFile: login.py
[debug] JythonScriptRunner: Convert Sikuli source code D:/workspace_sikuli/login.sikuli/ to HTML

[debug] capture!

[debug] CapturePrompt: Select an image

[debug] CapturePrompt: started at (549,180) as L(549,180) on 0

[debug] CapturePrompt: finished at (721,294) as L(721,294) on 0
[debug] CapturePrompt.close: freeing resources
[debug] captureCompleted: D:/workspace_sikuli/login.sikuli/1404288852100.png
[debug] Image: added to image list: 1404288852100.png with URL: file:D:/workspace_sikuli/login.sikuli/1404288852100.png
[debug] Image: loaded 1404288852100.png (58 KB of 64 MB (1 / 0 %) (58))

[debug] MenuAction.doSave
[debug] Image: purge: file:D:/workspace_sikuli/login.sikuli/
[debug] Image: purge: entry: file:D:/workspace_sikuli/login.sikuli/1404288852100.png
[debug] Image: purge: bimg: 1404288852100.png: (173x115)
[debug] Image: After Purge (1): Max 64 MB (0 / 0 %) (0))
[debug] IDE: writeSrcFile: login.py
[debug] JythonScriptRunner: Convert Sikuli source code D:/workspace_sikuli/login.sikuli/ to HTML

[debug] IDE: save: used image: 1404288852100.png
[debug] FileManager: delete not used: D:\workspace_sikuli\login.sikuli\login_button.png
[debug] FileManager: delete not used: D:\workspace_sikuli\login.sikuli\login_logo.png
[debug] FileManager: delete not used: D:\workspace_sikuli\login.sikuli\login_password.png
[debug] FileManager: delete not used: D:\workspace_sikuli\login.sikuli\login_username.png
[debug] FileManager: delete not used: D:\workspace_sikuli\login.sikuli\ocr_error.png
[debug] FileManager: delete not used: D:\workspace_sikuli\login.sikuli\ocr_picture.png
[debug] FileManager: delete not used: D:\workspace_sikuli\login.sikuli\ocr_tag.png

Revision history for this message
RaiMan (raimund-hocke) said :
#4

@Shengyuan
Sorry, but I cannot reproduce your problem.

Are you sure, you are running the Beta2?

In your log I can see 2 save actions. With the first one, the images are not touched.
How was the second save action triggered, where the images where purged?
Did you make any changes to the script before (besides capturing a new image)?

Revision history for this message
Shengyuan Gu (gushengyuan2002) said :
#5

@RaiMan,
I'm very sure that the sikulix version in using is beta2, here are the log on my console with "-d 3" option:
[debug] locale: zh_CN
[debug] ResourceLoader: SikuliX Package Build: 1.1.0-Beta2 2014-06-27_15:02
[debug] ResourceLoader: check: we are running on arch: x86

Yes, I performed two save action, here is my detail steps:
1, open the sikulix on command line with "-d 3" option, then a previous project is opened
2, insert a blank line
3, save the project for the first time
4, capture a picture on this blank line
5, save the project for the second time ------> images are deleted

Revision history for this message
RaiMan (raimund-hocke) said :
#6

ok, thanks.

I will retract Beta2.
I am working on Beta3.

Sorry for inconvenience.

Can you help with this problem?

Provide an answer of your own, or ask Bill Seddon for more information if necessary.

To post a message you must log in.