image replace error

When i try to overwrite an image, eggplant crashes. After the crash, i see that it has erased the orginal .png and did not erase the .imageinfo. See first attachement for error. If i delete the .imageinfo and try to save the same image name after a restart of eggplant, Eggplant crashes in a different way. see second screenshot.

Is there a known way to avoid this? I’m doing a lot of image replacements currently.

Edit: Attachment functionality appears not to be working on the forums. Uploading a bmp and png failed: “Upload Error: Could not upload Attachment to ./files/replace_crash_1.png.”

We’ll do this the imageshack way:

I believe this is an old bug that is fixed in the current release.

And I was able to upload an image, so I’m not sure what the problem you ran into was.

i have the latest windows version–10.3, right? Are there other revisions?

edit: upload worked this time.

Well, you are running the latest version, but I can’t replicate that error. We did have a problem somewhat like what you describe a couple of revisions ago, but it was identified and fixed.

Can you try uninstalling and reinstalling the app?

Are your suites stored on your local drive or a networked drive?

Sure, i’ll give reinstall a shot. The suites are on my local drive, in C:\Eggplant\

I did the uninstall + reinstall, and this bug crept up again last night–although the behavior was slightly different. Instead of occuring while replacing an image, i was attempting an ‘add image’. The image and the .imageinfo were added fine, but eggplant crashed with the attached NSRangeException. Eggplant continued to crash no matter what image i tried to capture within the initial suite–regardless of the folder. The problem went away after i deleted the new directory i had made for the initial ‘add image’.

I managed to reproduce this in another suite. It occurs when doing an add image, or the like, when the cursor/insertion point in the target script is preceded by “//”.

I know its strange to add images after a comment marker, but I frequently add images that I don’t actually need inserted into the script for me–usually because i create the image name based on the repeatIndex() in a loop.

I think we’ve tracked down this error and it occurs when you try to capture an image with no suite or script window open. It actually only happens on XP systems – you get a warning message to open a script or suite if you do this on Vista or Windows 7.

I don’t think this is the case. I have both a suite and a script open when this crash occurs. I click immediately to the right of a “//” comment marker in the script, then right click on the viewer window connected to my SUT in order to select “add image”. I just did some more testing, and none of the other available commands in the popup menu trigger the crash–it’s just addImage().

Okay, I see the error. While it probably shouldn’t throw the error, I’m wondering if you’re misunderstanding the point of “Add Image”. It doesn’t mean “add an image to the suite”; it means add an image to a command. So if you have

Click "image1"

you can select Add Image to add an “Image2” to the command to make it

Click "Image1", "Image2"

It will save an image but if all you’re looking for is to save an image, Capture Image is a better option than Add Image.

Okay, the menu item is okay, but I don’t see why you’d use it to add just an image name after a comment. If you just use Capture Image, you save an image without trying to add any text to the script.

Thanks, you are right–that’s absolutely the functionality i was originally looking for.