MR2 broke plugin during C extension require
-
@dan rathbun said:
Let's see the
light_stanza_extension.rb
file, please.Does it use a path with backslashes, or forward slashes ??
The error is only showing that file because it's the entry point for the plugin. I'm not requiring anything in that file, and certainly not openssl.so.
It's nested several requires later, when I require the RestClient library, which is a 3rd-party library which itself includes openssl.
-
-
Hmm well I just reinstalled SketchUp to this version:
http://www.filehippo.com/download_google_sketchup/8248/
And it still can't find openssl.so
So perhaps it's not a problem with MR2...
-
You could try:
Sketchup.require('openssl')
or
Sketchup.require('openssl.so')
it's a modified version of the
Kernel.require
method. -
By the way.. what are the green checkmarks over the folder icons mean ?
-
@dan rathbun said:
By the way.. what are the green checkmarks over the folder icons mean ?
It's TortoiseSVN (I use SVN for version control). It doesn't modify the files and has never been a problem in over 200 revisions.
-
require('openssl') Error: #<LoadError: C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/Light Stanza/lib/Ruby186/lib/ruby/1.8/i386-mswin32/openssl.so: 126: The specified module could not be found. - C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/Light Stanza/lib/Ruby186/lib/ruby/1.8/i386-mswin32/openssl.so> (eval) C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/Light Stanza/lib/Ruby186/lib/ruby/1.8/openssl.rb:17 (eval):0:in
require'
(eval):0
Sketchup.require('openssl')
false`Interesting... does that mean anything to you? The latter returned false. Was it successful or no?
-
It seems like TIG reported problems with access to Vista (64bit) folders during the last beta round, concerning the new rbz installer, but I thot the issue was resolved.
Check file permissions on the folders.
-
@draftomatic said:
Sketchup.require('openssl')
false[/ruby]Interesting... does that mean anything to you? The latter returned false. Was it successful or no?
It means (to me,) that [ruby:2l6gl0ii]Sketchup.require[/ruby:2l6gl0ii] still does not work as it should (rubywise.)
[ruby:2l6gl0ii]require[/ruby:2l6gl0ii] is supposed to return [ruby:2l6gl0ii]true[/ruby:2l6gl0ii] if the load was successful, [ruby:2l6gl0ii]false[/ruby:2l6gl0ii] if the file has ALREADY been loaded, and raise a [ruby:2l6gl0ii]LoadError[/ruby:2l6gl0ii] (or other,) exception otherwise.
Previous to the last MR, I had filed a bugreport on [ruby:2l6gl0ii]Sketchup.require[/ruby:2l6gl0ii] for various reasons, but one issue was that it was returning numerical error codes (which is a C thing, not a the Ruby way.)
-
Thanks Dan.
So, per your suggestion, I started going through the libraries that
require 'openssl'
and replacing it withSketchup.require 'openssl'
It seemed to fixed one after the other, until I got this:
Error Loading File C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/Light Stanza/lib/Ruby186/lib/ruby/1.8/i386-mswin32/openssl.so 126: The specified module could not be found. - C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/Light Stanza/lib/Ruby186/lib/ruby/1.8/i386-mswin32/openssl.so
Sorry, had a copy/paste error a second ago. Fixed it.
-
Oh I REMEMBER what the problem is !!!!
It Windows and how it handles custom icons for folders. When you change the icon for a folder, Windows sets it's read-only attribute (or similar.)
This messes up Ruby.It's your Tortoise install changing the icons that is causing the problem.
TIG is the one that figured this out during beta.
-
@dan rathbun said:
It's your Tortoise install changing the icons that is causing the problem.
Eh, I don't think so. We also have a packaged installer that does not include any of the svn data. In fact I just stripped my plugin from the Plugins folder and used the installer, and still getting the same errors...
-
@dan rathbun said:
It seems like TIG reported problems with access to Vista (64bit) folders during the last beta round, concerning the new rbz installer, but I thot the issue was resolved.
Check file permissions on the folders.
I don't suppose you have any references for this?
Scott Lininger promised to get me into the next beta last time I met with him; unfortunately that doesn't help me today
-
If you copy the icon modified folders into the install package, they will have the modified flags. TIG had to completely recreate new default folders, and copy the files into the new folders.
REALLY I am not making this up. It's a really stupid thing that Microsoft did.
-
@draftomatic said:
@dan rathbun said:
It seems like TIG reported problems with access to Vista (64bit) folders during the last beta round, concerning the new rbz installer, but I thot the issue was resolved.
Check file permissions on the folders.
I don't suppose you have any references for this?
Scott Lininger promised to get me into the next beta last time I met with him; unfortunately that doesn't help me today
Give me hour or so. I'll see what I can send you from the thread in the beta forum.
-
@dan rathbun said:
If you copy the icon modified folders into the install package, they will have the modified flags. TIG had to completely recreate new default folders, and copy the files into the new folders.
REALLY I am not making this up. It's a really stupid thing that Microsoft did.
Are you kidding me?! I must have 75 different folders in my plugin. How am I supposed to do that?
I am noticing however that the folders are in fact read-only. But SU isn't writing to them is it? It should only be reading? o.0
I'm going to try removing the read only attributes from the folders, which yes, I know, is a pain in the butt on Vista. But I've done it before... argh
-
Still no luck. I tried recreating some of the afflicted folders and it didn't change anything. I even recreated every folder back to and including Plugins in the path that led to openssl.so.
Although, I don't think that would make a difference anyway, since I
- Reinstalled to the first SU8 release and
- Have been using TortoiseSVN on this project for 2 years and never had a problem like this
-
I think I'm giving up for the night. Thank you so much for you help, Dan.
I would greatly appreciate if you can find TIG's issue from the beta forum.
Have a good night
-
Oh, and fyi I just tried a fresh installation on Windows 7 and it worked no problems.
Seems like a Vista problem for sure.
-
@draftomatic said:
Are you kidding me?! I must have 75 different folders in my plugin. How am I supposed to do that?
...
I'm going to try removing the read only attributes from the folders, which yes, I know, is a pain in the butt on Vista. But I've done it before... argh
With a script perhaps ?
(not tested)
# use; # # reset_dirtree_flags("Light Stanza") # # reset_dirtree_flags( dirname ) # # dirname ; the root subdir for iteration beneath the plugins dir # def reset_dirtree_flags(dirname) # save the user's current working dir workdir = Dir.getwd # # change to the Plugins dir plugdir = Sketchup.find_support_file("Plugins") Dir.chdir(plugdir) # if File.exists?(dirname) && File.directory?(dirname) File.chmod(0777,dirname) reset_subdir_flags(dirname) end #if # restore the user's current working dir Dir.chdir(workdir) # end #def # reset_subdir_flags( dirname ) # # Recusive method called by reset_dirtree_flags() # def reset_subdir_flags(dirname) # prevdir = Dir.getwd # Dir.foreach(dirname){|filename| if File.directory?( File.join(dirname,filename) ) if (filename != "." && filename != "..") Dir.chdir(dirname) File.chmod(0777,filename) # recursive method call reset_subdir_flags(filename) Dir.chdir(prevdir) end end } # end #def
Advertisement