[1.1.0-Beta1] Commenting out a line deletes images mentioned in the comment only --- workaround: switch off option in preferences (delete not used images) --- fixed with Beta2

Bug #1324324 reported by greg hogan on 2014-05-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sikuli
Critical
RaiMan

Bug Description

**** workaround --------------------------------
if you want to use the approach to comment out lines containing image names for images you want to keep in your script folder:
- preferences -> more options
- switch off the option <delete not used images>

--------------------------------------------------------

When one comments out a line that contains an image, the image is deleted without warning from the folder, even when the image file attributes are set to READ-ONLY.

Uncomment the line and even though the image is still shown in the IDE it has been deleted from the folder it was saved in, thus crashing the script with a message about null references etc..

This also happens when images or Art Assets are supplied by a 3rd Party, comment out a line that uses an Asset and its gone .. permanently, no warnings, no possible recovery from the Recycle Bin, no way to stop it happening again. One must re-do all the commented out code and re-capture images from scratch (or retrieve from the client again) .

This is not good as one can lose a significant amount of work by just a comment - epic failure !
To add insult to injury, the images do not return when ctrl-z'd back, making the undo feature 100% ineffective in this regard.

This is a very bad Design Smell as Sikuli assumes responsibility and control of maintaining the folder and images, subverts and ignore the file attributes by prematurely culling what it wrongly deems as surplus images.
This might have a good idea IF the deleted images were sent to the Recycle Bin rather than being nuked from orbit with no survivors.

Possible solutions :
1) Avoid comments - not very practical, aint gonna happen.
2) Stop Sikuli from deleting files without permission or warning.
3) Respect file attributes like the rest of the world does.

Cheers :)

Sorry for the inconvenience.
See workaround or use 1.0.1 until fixed.

summary: - Commenting out a line deletes images
+ [1.1.0-Beta1] Commenting out a line deletes images --- workaround:
+ switch off option in preferences (delete not used images)
Changed in sikuli:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
RaiMan (raimund-hocke) on 2014-05-29
summary: - [1.1.0-Beta1] Commenting out a line deletes images --- workaround:
- switch off option in preferences (delete not used images)
+ [1.1.0-Beta1] Commenting out a line deletes images mentioned in the
+ comment only --- workaround: switch off option in preferences (delete
+ not used images)
description: updated
RaiMan (raimund-hocke) on 2014-06-27
Changed in sikuli:
status: Confirmed → Fix Committed
importance: High → Critical
RaiMan (raimund-hocke) on 2014-06-27
summary: [1.1.0-Beta1] Commenting out a line deletes images mentioned in the
comment only --- workaround: switch off option in preferences (delete
- not used images)
+ not used images) --- fixed with Beta2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers