[1.1.0] IDE: problems with scripts having an image file with size 0 byte (however this happened ;-)

Bug #1579812 reported by sgfit
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SikuliX
In Progress
High
RaiMan

Bug Description

Sikuli 1.1.0, Windows 7 x64.

When attempting to save a .sikuli in the IDE, instead of saving, the contents of the .sikuli folder are deleted and the IDE returns the error message "[error] EditorPane: read returned null". The contents of the previous .sikuli script are still present in a tab labelled 'Untitled'.

When attempting to save the tab labelled untitled, the IDE returns this error message, and the .sikuli folder is not generated:
"[error] EditorPane: read returned null"

Restarting the IDE then returns:
"[error] EditorPane: read returned null"
"[error] IDE: restoreScriptFromSession: Can't load: C:\Users\username\Documents\Sikuli\project\win7.sikuli"

Permissions for the folders in question allow reading and writing, so doubt it is a file permissions issue.

Steps to reproduce:
1. Create a large script (>200 images, >1000 lines)
2. Attempt to save.

sgfit (sgfit)
summary: - "EditorPane: read returned null" when attempting to open .sikuli
+ "EditorPane: read returned null" when attempting to save or open .sikuli
RaiMan (raimund-hocke)
Changed in sikuli:
status: New → In Progress
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.1
summary: - "EditorPane: read returned null" when attempting to save or open .sikuli
+ [1.1.0] IDE: problems when loading scripts with many lines at startup
+ restore
summary: - [1.1.0] IDE: problems when loading scripts with many lines at startup
- restore
+ [1.1.0] IDE: problems when saving scripts with many lines and then with
+ startup restore
Revision history for this message
sgfit (sgfit) wrote : Re: [1.1.0] IDE: problems when saving scripts with many lines and then with startup restore

For further contents, the last few lines of the log - no errors prior to this:

[debug] Image: loaded: HomeTab_ReencodingNotice.png (file:/C:/Users/username/Documents/Sikuli/project/win7.sikuli/HomeTab_ReencodingNotice.png)
[debug] Image: cached: HomeTab_ReencodingNotice.png (17 KB) (# 102 KB 1572 -- 2 % of 64 MB)
[error] EditorPane: read returned null
[debug] EditorPane: updateDocumentListeners from: loadFile
[debug] Image: purge: ImagePath: /C:/Users/username/Documents/Sikuli/project/win7.sikuli/
[debug] ImagePath: new BundlePath:
/C:/Users/username/Documents/Sikuli/project/one.sikuli/
[debug] Image: purge: ImagePath: /C:/Users/username/Documents/Sikuli/project/one.sikuli/
[debug] ImagePath: new BundlePath:
/C:/Users/username/Documents/Sikuli/project/project.sikuli/
[debug] search: from 0 forward: true
[debug] search: from 0 forward: true
[debug] search: from 0 forward: true
[debug] MenuAction.doQuit
[debug] IDE: doQuit requested
[debug] Image: purge: ImagePath: /C:/Users/username/Documents/Sikuli/project/project.sikuli/
[debug] ImagePath: new BundlePath:
/C:/Users/username/Documents/Sikuli/project/one.sikuli/
[debug] Sikulix: cleanUp: 0
[debug] RunTimeIDE: final cleanup
[debug] FileManager: deleteFileOrFolder:
C:\Users\username\AppData\Local\Temp\Sikulix_1224545332

Revision history for this message
sgfit (sgfit) wrote :

I think I found how to fix it in my case, but not the ultimate cause.

When I saved a new screenshot from sikuliide, the resulting file was saved as a 0-byte file. Attempting to save or open the .sikuli from then on caused the 'read returned null' error mentioned before.

I haven't tracked down why the screenshot was saved as a 0-byte file, but if this error comes up for anyone else, that's probably the cause.

Revision history for this message
RaiMan (raimund-hocke) wrote :

thanks for tracking this down. Lets see what I can do.

summary: - [1.1.0] IDE: problems when saving scripts with many lines and then with
- startup restore
+ [1.1.0] IDE: problems with scripts having an image file with size 0 byte
+ (however this happened ;-)
Revision history for this message
William (servicespcqc) wrote :

I got the same bug : I can't open a sikuli folder. I was able to open it the past days but I am not able to do it now. "EditorPane: read returned null"

I reinstalled Java, nothing happened.

I have cleared the 0-byte screenshot and my problem is still there.

One thing that can be nice to know is that even if the sikuli folder is "rejected" by the IDE, I can't delete the *.py file of my project/sikuli folder. Maybe it can lead you somewhere.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.