[1.1.0] Updating old images in IDE, images revert back to old version --- fixed 2015-06-24

Bug #1374641 reported by Zed
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Fix Committed
Critical
RaiMan

Bug Description

Using Sikuli 1.1 Beta, the 9-26-14 build.

There seems to be a weird thing going on in the IDE when I replace replace old images by overwriting them. The image preview in the IDE sometimes seems to revert back to the old image during certain actions - copying and pasting that image, and I believe also scrolling to a different page and back to that image.
Here's a screenshot of it happening: http://postimg.org/image/41bbfwbyh/
Notice that image preview shows the older image (the cmd prompt screenshot) but the pattern settings Matching Preview view shows the actual image on file (the explorer window screenshot).
Also I notice one you get it into this state, it will show the wrong preview image until you restart the IDE; even if you reopen the the project, it still shows the wrong images, as if they were cached.

Revision history for this message
Zed (zh2eou) wrote :

Actually it seems like it actually does affect the functionality as well, as it uses the old version of the image as opposed to the new one if it shows up in the preview. Maybe it's related to the image caching stuff you've put into this release.

Revision history for this message
RaiMan (raimund-hocke) wrote : Re: [1.1.0] Updating old images in IDE, images revert back to old version

The tab of the editing window has a context menu (right click on tab label)

The last entry is named reset.

What happens, if you trigger "Reset" in such a situation?

When you press ctrl-T (is menu View -> toggle showThumbs) you can switch between thumb view and plain code view.
Does this shed any more light on the problem?

summary: - Updating old images in IDE, images revert back to old version
+ [1.1.0] Updating old images in IDE, images revert back to old version
Changed in sikuli:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
Revision history for this message
RaiMan (raimund-hocke) wrote :

I cannot reproduce your problem.

Could you please describe precisely the steps that lead to the problem.

No screen shots needed, only name the steps.

Revision history for this message
Zed (zh2eou) wrote :

Reset doesn't seem to fix the issue, but I can actually cause the problem by using Reset. One way that I've reproduced it is:
1. New Sikuli bundle, save it as something
2. Take screenshot, name it something
3. Take another screenshot, name it the same as 2 (replacing the original)
4. The image preview updates to latter image
5. Save the file
6. Use the Reset command, the image preview resets back to the original

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

great, thanks. I will try to reproduce it.

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

Still not possible to reproduce your situation.

Could you post more details about used image paths and image names.

run IDE from command line using -d 3 -c

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

what system?

Revision history for this message
Zed (zh2eou) wrote :

Here's the debug info I get when I do the Reset, it may help:
[debug] Image: --- start of Image dump ---
[debug] ImagePath: ImagePath has 1 entries (valid 1)
[debug] Image: ImageFiles entries: 3
[debug] Image: file:C:\Users\autotest\Desktop\Sikuli_IDE_Tests\libs\Test.sikuli\Test.png
[debug] Image: file:C:/Users/autotest/Desktop/Sikuli_IDE_Tests/libs/Test.sikuli/1412184263742.png
[debug] Image: file:C:/Users/autotest/Desktop/Sikuli_IDE_Tests/libs/Test.sikuli/Test.png
[debug] Image: ImageNames entries: 2
[debug] Image: Test.png 14 KB (file:C:/Users/autotest/Desktop/Sikuli_IDE_Tests/libs/Test.sikuli/Test.png)
[debug] Image: 1412184263742.png 14 KB (file:C:/Users/autotest/Desktop/Sikuli_IDE_Tests/libs/Test.sikuli/1412184263742.png)
[debug] Image: Cache state: Max 64 MB (entries: 3 used: 0 % 84 KB)
[debug] Image: --- end of Image dump ---
[debug] Image: --- start of Image dump ---
[debug] ImagePath: ImagePath has 1 entries (valid 1)
[debug] Image: ImageFiles entries: 1
[debug] Image: file:C:\Users\autotest\Desktop\Sikuli_IDE_Tests\libs\Test.sikuli\Test.png
[d

ebug] Image: ImageNames entries: 0
[debug] Image: Cache state: Max 64 MB (entries: 1 used: 0 % 56 KB)
[debug] Image: --- end of Image dump ---

I'm using a Windows 7 (64bit) VM for this.

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

Yes, really valuable.
Thanks for not giving up and helping me to find out the magic.

This a typical Windows problem (until now I only tested on Mac, sorry for that): a mix of forward and backward slashes and internally using some string compare - grrrrrh.

Still some old coding I have to repair.

Thanks again.

Will fix it next week - currently some days vacation.

RaiMan (raimund-hocke)
Changed in sikuli:
importance: High → Critical
summary: [1.1.0] Updating old images in IDE, images revert back to old version
+ --- fixed 2015-06-24
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.