Related to #477 - but sounds like it is a SU2020 regression.
Description of reported issue:
1) I use SU2020-1 on Mac OSX (Catalina), with NO plugins (other that the SU ones) - Ruby console open.
2) I run a small plugin, here attached. It basically creates a command in a toolbar. The command does nothing (just print "Fredo Execute Menu"). However it has a validation_proc attached, which just print a trace of the current model.
module Test_MenuMac
#Create a command with a set_validation_proc
def self.startup
# Create toolbar
curdir = File.dirname __FILE__.gsub("\\", "/")
icon_path = File.join('Icon_menu_mac.png')
tb = UI::Toolbar.new "Fredo Menu Mac"
cmd = UI::Command.new("Test menu Mac") { puts "Fredo Execute Menu" }
cmd.large_icon = cmd.small_icon = File.join(curdir, 'Icon_menu_mac.png')
cmd.set_validation_proc { (menu_test?) ? MF_ENABLED : MF_GRAYED }
tb.add_item cmd
UI.menu("Plugins").add_item cmd
(tb.get_last_state == -1) ? tb.show : tb.restore
end
#Test proc for set_validation_proc
def self.menu_test?
model = Sketchup.active_model
puts "\nMenu Test - model = #{model} - valid = #{model.valid?} path = #{(model.path) ? File.basename(model.path) : 'nil'}"
true
end
#Loading the file once
unless file_loaded?("menu_mac.rb")
startup
file_loaded("menu_mac.rb")
end
end # Module Test_MenuMac
3) Open Sketchup - You get a new model.
4) Open an existing model. Traces from the validation proc are shown. Actually multiple ones, pertaining to both the New model and the Existing model.
5) Make a change to the existing model. I just open and close a group.
6) Close the model. You get a prompt for Saving - Click Yes.
7) You get an other bunch of traces from the validation_proc, pertaining both to the existing and new model.
8) But right after you get an Error: "Stack level too deep"
I attach here all the traces corresponding to the example of the video
From there, you may have problem with Sketchup, for instance indefinite wait. And if you redo steps 2) to 6) again, you may likely get a crash of Sketchup. I logged a bugsplat report #29772.
Related to #477 - but sounds like it is a SU2020 regression.
Description of reported issue:
SU-0123.zip