14 Replies Latest reply: Oct 1, 2009 2:52 AM by ranzadk RSS

    OS X 10.6, CS4, osascript and Adobe Unit Types Problem

    onthefly666

      Hi,

       

      i am using OS X 10.6 and PS CS4.

       

      I have written some scripts. They are working with 10.5. and CS4.

       

      Since i have updated to 10.6 the script starts and then crashes.

       

      The error message is:

       

      /Library/Ruby/Gems/1.8/gems/applescript-1.0/lib/applescript.rb:32:in `execute': 2009-09-02 15:53:19.805 osascript[6521:903] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types:  dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found.  Did find: (AppleScriptError)
          /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper
      osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.
      37:261: execution error: Adobe Photoshop CS4 got an error: Allgemeiner Photoshop-Fehler. Die Funktion steht in dieser Version von Photoshop möglicherweise nicht zur Verfügung.

       

      I think the problem has something to to with the 64 bit architecture of OS X 10.6.

       

      file Adobe\ Unit\ Types
      Adobe Unit Types: Mach-O universal binary with 2 architectures
      Adobe Unit Types (for architecture ppc):    Mach-O bundle ppc
      Adobe Unit Types (for architecture i386):    Mach-O bundle i386

       

      Does anyone have an idea ?

       

      Thx,

       

      Bjoern

        • 1. Re: OS X 10.6, CS4, osascript and Adobe Unit Types Problem
          Chris Cox Adobe Employee

          You may be running the 64 bit kernel, and the unit types only has 32 bit binaries.

          Welcome to Snow Leopard, where "transition strategy" is a four letter word.

          • 2. Re: OS X 10.6, CS4, osascript and Adobe Unit Types Problem
            robackja

            I'm running a 32-bit kernel on Snow Leopard and I get the same error messages (running osascripts not even related to Adobe CS4 products)

             

            loki:~$ uname -a

            Darwin loki 10.0.0 Darwin Kernel Version 10.0.0: Fri Jul 31 22:47:34 PDT 2009; root:xnu-1456.1.25~1/RELEASE_I386 i386

             

            2009-09-02 23:10:51.123 osascript[708:903] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types:  dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found.  Did find:

            /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper

            osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.

            • 3. Re: OS X 10.6, CS4, osascript and Adobe Unit Types Problem
              Chris Cox Adobe Employee

              Then that is bizarre.

              • 4. Re: OS X 10.6, CS4, osascript and Adobe Unit Types Problem
                robackja Community Member

                Hardly bizarre. osascript is universal binary with 3 architectures, i386, ppc, and x86_64, whereas adobe's unit types is only i386/ppc. Adobe needs to update their binary. Running 32/64 bit kernel has nothing to do with 32/64 bit userland programs. 64-bit user programs can can run on a 32-bit kernel (that was even possible in Leopard, e.g. Lightroom 2.x) without issue.

                 

                 

                loki-airport:~ $ file /usr/bin/osascript

                /usr/bin/osascript: Mach-O universal binary with 3 architectures

                /usr/bin/osascript (for architecture x86_64): Mach-O 64-bit executable x86_64

                /usr/bin/osascript (for architecture i386): Mach-O executable i386

                /usr/bin/osascript (for architecture ppc7400): Mach-O executable ppc


                 

                 

                loki-airport:~ $ file /Library/ScriptingAdditions/Adobe\ Unit\ Types.osax/Contents/MacOS/Adobe\ Unit\ Types

                /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: Mach-O universal binary with 2 architectures

                /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types (for architecture ppc): Mach-O bundle ppc

                /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types (for architecture i386): Mach-O bundle i386


                • 5. Re: OS X 10.6, CS4, osascript and Adobe Unit Types Problem
                  Chris Cox Adobe Employee

                  What 64 bit application is loading the unit types extension?

                  It should be loaded by a system level service (32 bit).

                   

                  And we're still working on the 64 bit transition.  We would have completed it a while back if Apple hadn't changed plans and made things a few orders of magnitude more difficult for developers.

                  • 6. Re: OS X 10.6, CS4, osascript and Adobe Unit Types Problem
                    robackja Community Member

                    It happens when a shell script of mine is run to update Textmate's bundles over subversion. If Textmate is running, the last thing the shell script does is tell Textmate to reload its bundles.

                     

                    /usr/bin/osascript -e 'tell app "TextMate" to reload bundles'

                     

                    osascript runs in 64-bit mode by default (even on 32-bit kernel) and these error messages get output all of the terminal/console/log. So Adobe products aren't even involved in this situation, but I guess osascript loads them all (or at least tries).

                     

                    And, don't get me wrong. I'm not knocking Adobe. I know Apple dropped Carbon 64-bit support. Carbon is deprecated, as it should be in IMHO, so I am more than happy to go through some growing pains for the greater good. Adobe's application suite is probably one of the largest on the Apple platform and anyone who thinks the Cocoa + 64-bit transition would happen overnight is crazy. But that doesn't mean we (users, customers) shouldn't report our findings, problems, issues, bugs, etc. And I also realize CS4 on Mac platform is supposed to be 32-bit only, but its effecting my other paid applications, so I figured I'd report it.

                     

                    Just that I am unaware of any public bug reporter/tracker like Apple's Bug Reporter tool, so I usually just browse around these forums. If this isn't the proper place for such reports, please by all means direct me to the correct place.

                     

                    And maybe its Apple's fault. Maybe osascript shouldn't try loading 32-bit plugins when in 64-bit mode. This is probably the most reasonable. But I sure if I report this, Apple will tell me its Adobe fault for not having 64-bit binary. And back-and-forth we go...

                    • 7. Re: OS X 10.6, CS4, osascript and Adobe Unit Types Problem
                      Chris Cox Adobe Employee

                      Yes, it sounds like osascript might have some problems (not doing error checking and hoping the loader does all the work).

                       

                      And you probably wanted https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

                      • 8. Re: OS X 10.6, CS4, osascript and Adobe Unit Types Problem
                        onthefly666 Community Member

                        Hi,

                         

                        i have submitted a bug report to Adobe. Thanks for the link, Chris.

                         

                        Regards,

                         

                        Bjoern

                        • 9. Re: OS X 10.6, CS4, osascript and Adobe Unit Types Problem
                          Zaph0n

                          It's not that osascript is doing anything wrong, it's simply the fact that it's running the x86_64 binary, and the Adobe Unit Types Scripting Addition doesn't have that binary mode compiled in.

                           

                          But there is an easy work around until this is fixed.

                           

                          Instead of running "osascript script.scpt" you can run "arch -i386 osascript script.scpt" which forces osascript to run in i386 mode, which the Scripting Addition does work with.  This work around was enough to keep me going, but it did catch me off guard.

                          • 10. Re: OS X 10.6, CS4, osascript and Adobe Unit Types Problem
                            Fuzzy Puppet Community Member

                            Zaph0n wrote:

                             

                            Instead of running "osascript script.scpt" you can run "arch -i386 osascript script.scpt" which forces osascript to run in i386 mode, which the Scripting Addition does work with.  This work around was enough to keep me going, but it did catch me off guard.

                             

                            Thank the Good Gerbil — that's exactly what I needed.

                             

                            Nothing worse than a Console full of these goofy error messages. I have a launchd script that calls osascript every 30 seconds, so you can imagine the carnage.

                             

                            It makes a lot more sense than drawing some mystical connection between iChat and Adobe, which is about as far as I could get on my own...

                            • 11. Re: OS X 10.6, CS4, osascript and Adobe Unit Types Problem
                              elitebox Community Member

                              Very nice solution.  How can you incorporate this to fix this error that appears every time that Safari tries to use the Flash Player Plugin v. 10.0.32.18:

                               

                               

                              9/12/09 7:43:38 PM Safari[791] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types:  dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found.  Did find:

                              /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper

                               

                               

                              9/12/09 7:43:38 PM [0x0-0x6d06d].com.apple.Safari[791] Safari: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.

                               

                               

                              9/12/09 7:49:06 PM osascript[813] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types:  dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found.  Did find:

                              /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper

                              • 12. Re: OS X 10.6, CS4, osascript and Adobe Unit Types Problem
                                netnothing

                                First off, will this new KB article solve this:

                                http://kb2.adobe.com/cps/516/cpsid_51615.html

                                 

                                Second, why do I get these errors in Console when I'm not even using Applescript with Photoshop?

                                 

                                Sep 24 08:43:28 osascript[30432]: Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:\n /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper

                                 

                                Thanks!

                                 

                                -Kevin

                                • 13. Re: OS X 10.6, CS4, osascript and Adobe Unit Types Problem
                                  Jesper Storm Bache Adobe Employee

                                  FYI. You can get a 64 bit version of the Adobe Unit Types here: http://kb2.adobe.com/cps/516/cpsid_51615.html

                                  • 14. Re: OS X 10.6, CS4, osascript and Adobe Unit Types Problem
                                    ranzadk

                                    @Zaph0n thank you sir! that was just what i needed!