WebDialog crashes Sketchup
-
Hey folks,
programming a Ruby plugin I came across a problem which I have had in the past: Working with WebDialogs can cause Sketchup to crash. My problem - I don't know why. Does anybody know of problems concerning WebDialogs? Maybe I'm using a 'wrong' way to get values from the dialog or my plugin works on too much data.
The situation: I have a value matrix which I can update by entering values to the dialog. When pressing my "Update" button, Sketchup calls my action callback. This one informs an observer and this one should extract the values from the dialog by using WebDialog#get_element_value. And sometimes the plugin does not crash ... hm.
Unfortunaltely I can't show you my code because it is too much and complex.
I use Sketchup 6.
Ask me if my problem isn't clear enough.
azuby
-
What kind of observer is in play here?
I'm not remembering any WebDialog crashes, but there have been observer crashes, particularly on entity observers.
-
Oh, its not a Sketchup observer, its my own one. You know, porgramming design pattern and such things
azuby
-
@azuby said:
Oh, its not a Sketchup observer, its my own one. You know, porgramming design pattern and such things
azuby
Ah,
Well, if you feel motivated to create a minimal use case that causes the crash, I could hunt it down. I'd also consider upgrading to SU7 and seeing if that fixes the crash. We did improve stability in a variety of places around the Ruby API. Thanks!
-
Hm OK, you see me surprised. Till now I have used an HTML code similar to the following for my "Update" button:
<input type="button" onClick="javascript:window.location = 'skp;foo@'; return false" value="Update">
After I changed it to:
<input type="button" onClick="javascript:window.location = 'skp;foo@bar'; return false" value="Update">
Sketchup doesn't crash any longer.
puts "Well, and now I'll clean up my Ruby code."
what the f...
=begin
azuby
=end
Advertisement