Solid Inspector2 always disabled

Hello,
I am using Sketchup 2017 with Win10.
Since this morning the “Solid Inspector2” is always disabled so that I cannot use it.
I already uninstalled it and reinstalled it again.
The message came that the installation was successfull.
Does someone else experience this issue?
Is there a solution available?
Cheers
Stefan

What is the indication that it is disabled?

What has changed on your computer since the last time you used Solid Inspector2? The extension hasn’t changed and clearly neither has SketchUp 2017. So there must be something else.

Please complete and update your profile. That information helps us help you when it is correct and complete.


Hi Dave,
This is the error message I have got this morning.

Error Loading File C:/Users/Stefan/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/tt_solid_inspector2/bootstrap.rb
Error: #<SyntaxError: C:/Users/Stefan/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/tt_solid_inspector2/inspector_tool.rb:109: syntax error, unexpected ‘.’
view&.invalidate # TODO: workaround, might be nil

        ^>

C:/Users/Stefan/Documents/99 Private/Sketchup/Tools/RubyStdLib/rubygems/core_ext/kernel_require.rb:54:in require' C:/Users/Stefan/Documents/99 Private/Sketchup/Tools/RubyStdLib/rubygems/core_ext/kernel_require.rb:54:in require’
C:/Users/Stefan/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/tt_solid_inspector2/core.rb:11:in <module:SolidInspector2>' C:/Users/Stefan/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/tt_solid_inspector2/core.rb:8:in <top (required)>’
C:/Users/Stefan/Documents/99 Private/Sketchup/Tools/RubyStdLib/rubygems/core_ext/kernel_require.rb:54:in require' C:/Users/Stefan/Documents/99 Private/Sketchup/Tools/RubyStdLib/rubygems/core_ext/kernel_require.rb:54:in require’
C:/Users/Stefan/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/tt_solid_inspector2/bootstrap.rb:34:in <module:SolidInspector2>' C:/Users/Stefan/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/tt_solid_inspector2/bootstrap.rb:10:in <top (required)>’
C:/Users/Stefan/Documents/99 Private/Sketchup/Tools/extensions.rb:197:in require' C:/Users/Stefan/Documents/99 Private/Sketchup/Tools/extensions.rb:197:in load’
C:/Users/Stefan/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/tt_solid_inspector2.rb:43:in register_extension' C:/Users/Stefan/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/tt_solid_inspector2.rb:43:in module:SolidInspector2
C:/Users/Stefan/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/tt_solid_inspector2.rb:15:in <module:Plugins>' C:/Users/Stefan/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/tt_solid_inspector2.rb:14:in module:TT
C:/Users/Stefan/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/tt_solid_inspector2.rb:13:in `<top (required)>’

It seems now, that the Solid Inspector2 (SI2) stays enabled but with this error message.

Yesterday I enabled the SI2 in the Extension Manager (EM).
I closed the EM and re-opened it and the SI2 was back to “disabled”.

There is a typo in thomthom’s code.
The error message tells us…
C:/Users/Stefan/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/tt_solid_inspector2/inspector_tool.rb
line#109
Open that file with a plain-text editor, like Notepad++.
Find that line, it reads,
view&.invalidate # TODO: workaround, might be nil
Change it to read,
view.invalidate # TODO: workaround, might be nil [i.e. omitting the &]
Editing the file will break the signing but it will still load and work if your Extension Manager’s Loading Policy is set to be Unrestricted…

Hopefully thomthom will correct this soon, get it re-signed and reissued…
But meanwhile the edit fix should help you…

1 Like

SketchUp 2017 uses Ruby 2.2.4. The safe navigation operator (&.) was not introduced until Ruby v 2.3.

So in later SketchUp versions that use Ruby 2.5 and up, there would be no error at this place in the code.

But using it for a known method call as shown in the error has no benefit unless the view reference might somehow be nil.

1 Like

I solved it. It seems like copying the files from another computer where the plugin works did the trick. Try copying these file versions at C:/Users/username/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/tt_solid_inspector2/
bootstrap.rb (1.1 KB)
inspector_tool.rb (17.6 KB)

This!!!

Extremely frustrating error that I had as well, and this fixed it. Thanks TIG!

Hello emaciaf,
it works!!!
You made my day. Many many thanks.
I saved both files on a save place in case SI2 will crash again.
Cheers
Stefan

1 Like

The final solution would be if @tt_su would correct his original code… but it can be forgiven, because he must have a lot of other things to do towards the end of the year… :innocent:

3 Likes

Version 2.5.1 is released with a fix. Along with update to the VSCode project configuration so that it now warns about using syntax that isn’t compatible with the oldest SketchUp version target.

Thanks for the heads up!

For the developers, PRs are very welcome for these kinds of things: GitHub - thomthom/solid-inspector: Inspect and repair solid groups and components in SketchUp. I’d be happy to see more open source collaborations within the extension developer community.

1 Like