PWP Crashes when opening Paint Tool in Workspace with Complex Mask

Moderator: jsachs

jsachs
Posts: 4203
Joined: January 22nd, 2009, 11:03 pm

Re: PWP Crashes when opening Paint Tool in Workspace with Complex Mask

Post by jsachs »

Looking at the mask command, it appears you applied the Mask Paint tool roughly 530 separate times when you built the mask, painting one tiny part of the outline at a time.

The way Mask is implemented, this uses a huge amount of memory since it make a copy of the previous mask image before starting each new operation. If the input image is large, this might be causing out of memory problems which I admittedly do not handle gracefully in all cases. I think this also accounts for the very long time to rebuild the mask.

I am not sure why you would want to paint the edge by hand in any case given that the subject is dark and the background is light, there are easier and more accurate ways to generate an edge mask, such as increasing the contrast of the image and using the Edge transformation.
example.jpg
example.jpg (128.25 KiB) Viewed 2714 times
To produce the above, I used the Mask Separate tool, the increase the mask contrast with the Mask Brightness Curve tool and cleaned it up a little with the Mask Paint tool. Then I saved the mask as an image and applied the Edge transformation to it.
Jonathan Sachs
Digital Light & Color
Marpel
Posts: 692
Joined: September 13th, 2009, 3:19 pm
What is the make/model of your primary camera?: Nikon D810
Location: Port Coquitlam, British Columbia

Re: PWP Crashes when opening Paint Tool in Workspace with Complex Mask

Post by Marpel »

Regarding Jonathan's latest comments, I recall that when I had the most crashes, I would be doing multiple (although 530 times is way, way over my numbers) Paint Tool applications (zoomed in real close and gradually making my way around an image that couldn't be done completely through other methods), so the memory issue is likely the culprit.

Marv
jsachs
Posts: 4203
Joined: January 22nd, 2009, 11:03 pm

Re: PWP Crashes when opening Paint Tool in Workspace with Complex Mask

Post by jsachs »

The original cormorant image was 5000 x 5000 pixels which means each mask needs 25 MB, so 530 of them uses 13.25 GB of RAM. Add to that all the other images in the workspace, PW itself, any other simultaneously running programs, and especially all the RAM Windows uses and maybe the total exceeds 32GB.
Jonathan Sachs
Digital Light & Color
jfoster
Posts: 169
Joined: December 1st, 2011, 1:39 pm
What is the make/model of your primary camera?: Canon/5DMIII

Re: PWP Crashes when opening Paint Tool in Workspace with Complex Mask

Post by jfoster »

Thanks. I do things like that to varying degrees with some images – a bird against a blue sky always works well with the flood-fill. I do sometimes create a high-contrast proxy image to mask also – I’ll study the edge transformation more. But for many images I prefer to create a detailed manual edge mask.

Running Windows Task Monitor (and Resource Monitor) shows max memory use to occur, when opening this Workspace, during the mask opening process. There’s always at least 6GB of free memory– much more at the time it crashes.

Further, I opened the workspace, edited the Mask Transformation, and used Undo to reduce the number of total Mask Paint Tool strokes to 10. I saved the modified Workspace. Upon reopening the modified workspace with only 10 Mask Paint Tool strokes, PWP still crashes when the Paint Tool transformation is opened (same as with the original Workspace). Attached is the modified Workspace file.

Jeff
Attachments
10strokemask.zip
(3.54 KiB) Downloaded 140 times
jsachs
Posts: 4203
Joined: January 22nd, 2009, 11:03 pm

Re: PWP Crashes when opening Paint Tool in Workspace with Complex Mask

Post by jsachs »

Still not seeing a crash here.

Just to double check a few items:

1) Do you have a default settings file for the Paint tool? If so, please post a copy of it:

My Documents\Picture Window Pro\Paint\Default.paint

2) Can you post a copy of your color management settings file (or a screen shot of your Color Management dialog box). The settings file is located at:

C:\Users\<user name>\AppData\Local\Picture Window Pro\Color Management\Settings.color management
Jonathan Sachs
Digital Light & Color
jfoster
Posts: 169
Joined: December 1st, 2011, 1:39 pm
What is the make/model of your primary camera?: Canon/5DMIII

Re: PWP Crashes when opening Paint Tool in Workspace with Complex Mask

Post by jfoster »

See attached.


Jeff
Attachments
ColorMgtScreenShot.jpg
ColorMgtScreenShot.jpg (62.81 KiB) Viewed 2683 times
Default.zip
(295 Bytes) Downloaded 150 times
jsachs
Posts: 4203
Joined: January 22nd, 2009, 11:03 pm

Re: PWP Crashes when opening Paint Tool in Workspace with Complex Mask

Post by jsachs »

I have tried repeatedly to get the Paint tool to crash here without success.
Jonathan Sachs
Digital Light & Color
jfoster
Posts: 169
Joined: December 1st, 2011, 1:39 pm
What is the make/model of your primary camera?: Canon/5DMIII

Re: PWP Crashes when opening Paint Tool in Workspace with Complex Mask

Post by jfoster »

I tried to reproduce the problem with a bare minimum of steps. I feel that the likely problem is the "saved default" state of the Paint Tool.

I was able to repeatedly, although intermittently, get PWP to crash in Case 1 below. I never experienced a crash with Case 2.

Case 1: With Paint Tool "Save as Default Setting" used (Parameters didn't seem to matter - saving the default settings as the defaults caused problem)

1. Run PWP
2. Open Checkerboard Test Pattern.
3. Open Paint Tool
4. If no crash, cancel Paint Tool
5. Go to step 3.

Case 2: With Paint Tool Default Setting not saved.

Same steps as above, but no crash ever occurred.


Jeff
jsachs
Posts: 4203
Joined: January 22nd, 2009, 11:03 pm

Re: PWP Crashes when opening Paint Tool in Workspace with Complex Mask

Post by jsachs »

Ok, that narrows it down a lot. I'll check over the code tomorrow.
Jonathan Sachs
Digital Light & Color
jsachs
Posts: 4203
Joined: January 22nd, 2009, 11:03 pm

Re: PWP Crashes when opening Paint Tool in Workspace with Complex Mask

Post by jsachs »

I did find something wrong and fixed it for the next release, but I'm not sure it had anything to do with the crash.
Jonathan Sachs
Digital Light & Color
Post Reply