SketchUp / api-issue-tracker

Public issue tracker for the SketchUp and LayOut's APIs
https://developer.sketchup.com/
39 stars 10 forks source link

Regression crash on Mac when calling view.refresh #460

Open Whaat opened 4 years ago

Whaat commented 4 years ago

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
Fredosixx commented 4 years ago

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.

thomthom commented 4 years ago

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.

DanRathbun commented 4 years ago

... "changing" even. ;)

sketchupbot commented 4 years ago

SU-45928