api-issue-tracker icon indicating copy to clipboard operation
api-issue-tracker copied to clipboard

Regression crash on Mac when calling view.refresh

Open Whaat opened this issue 5 years ago • 5 comments

view.refresh causes crash on Mac when Model Transparency is enabled. This is appears to be a regression.

SU Versions: 19.3.252 Mac 20.0.362 Mac

Could not reproduce on Windows or for Mac versions earlier than 2019.

I realize that this method has a warning in the docs that it is unstable and could cause crashes if used incorrectly. But I think this issue should reported anyway, especially since it is an apparent regression.

def crash

model = Sketchup.active_model
model.rendering_options["ModelTransparency"] = true
model.active_view.refresh

end

Whaat avatar Apr 13 '20 17:04 Whaat

On Windows, I have noted that view.refresh() may also cause bugsplats, but was unable to identify the exact criteria of the situations where it happens. Seems to be in recent versions of SketchUp and not specifically related to display in XRay.

Fredosixx avatar Apr 13 '20 18:04 Fredosixx

I think one of the crashing scenarios is forcing a refresh while already being in a viewport draw. I'm not entirely sure about the exact details. This is tied to implementation details of the graphic engine which is ever changing.

thomthom avatar Apr 24 '20 12:04 thomthom

... "changing" even. ;)

DanRathbun avatar Apr 24 '20 20:04 DanRathbun

SU-45928

sketchupbot avatar Apr 27 '20 06:04 sketchupbot

Hi Whaat,

I tried the steps given here (with old and new graphics engine) and not able to reproduce the crash. Is this still an issue for you? or is there code snippet that I can try on latest SketchUp versions?

Thanks

kalpana-ghodeswar avatar May 21 '25 12:05 kalpana-ghodeswar