REAL app doesn't load dylib

I have a unique and strange circumstance with a customer.

I have tens of thousands of my app in circulation. No one has this trouble except one person. I have sent him multiple apps, zipped up, and they all do the same thing.

He is running 10.6. My app is compiled in REAL2011r3, and it uses a dylib created in XCode 3, and is UB ppc and i386.

His problem is that when the app calls the dylib, he gets a Function Not Found Exception.

I did a remote session with him, and found nothing wrong with his computer. I ran otool on the dylib, didn’t look wrong. I also tried dyldinfo, also worked.

It’s only him. Any suggestions? Any tools to try?

Otool -l doesn’t show he is loading an older version of the .dylib somehow? Or the .dylib location was changed between versions so that the old version wasn’t overwritten and is still around?

Where do you look for the dylib?
If you don’t specify a particular path, then the $PATH count.
It can also be a library with the same name is found earlier in the search path and it’s loaded instead of yours.

The dylib is in the Frameworks folder and the Declare looks like this:

Soft Declare Function SetupVTableRB Lib "@executable_path/../Frameworks/conversionengine.dylib" (getfolder As Ptr, getfile As Ptr, makealias As Ptr, getmsgbox As ptr, getinputbox as Ptr, getcustomdialog as Ptr, getresfork as Ptr, statusfunc as Ptr, generalpurpose as Ptr) As Integer

This is absolutely correct. Over 50,000 users successfully use it.

I did a remote session with him, I tried otool and it worked fine, I tried the -l option. I didn’t know how to interpret the information, but at least it read it and gave results.

If you go to the application binary (inside your the bundle) and do ‘otool -L appname’ you’ll get the list of the shared libraries that are used. Including the version number so you can see if it has the current one.

(Oh, and it’s the -L option. Not -l)

[quote=203381:@Garth Hjelte]I have a unique and strange circumstance with a customer.

I have tens of thousands of my app in circulation. No one has this trouble except one person. I have sent him multiple apps, zipped up, and they all do the same thing.

He is running 10.6. My app is compiled in REAL2011r3, and it uses a dylib created in XCode 3, and is UB ppc and i386.

His problem is that when the app calls the dylib, he gets a Function Not Found Exception.

I did a remote session with him, and found nothing wrong with his computer. I ran otool on the dylib, didn’t look wrong. I also tried dyldinfo, also worked.

It’s only him. Any suggestions? Any tools to try?[/quote]

In Terminal, set the DYLD_PRINT_APIS environment variable to 1 and run the executable file found inside of the bundle. For example:

[quote]$ export DYLD_PRINT_APIS=1
$ /Applications/Xojo.app/Contents/MacOS/Xojo[/quote]

Thanks Joe, I’ve written my client and he’ll try it.

Perhaps there will be something in that text that will tell me whats going on, but what do you think? I find it strange that he gets Function Not Found Exception on that computer but none of my clients ever has. I know it’s dumb to ask you to guess, but what am I looking for? (BTW I’ve sent him different builds of the dylib.)

@Garth Hjelte - very interesting that you’ve run into this as I’ve got a similar situation with a specific user seeing a similar FunctionNotFound exception in an app built under 12r2.1 that has 1,000’s of continuous users on many different OS X version (we support 10.6.5+). The only thing that I could uncover was that the dylib still contained the PPC/PPC64 code from back in the 10.4 / 10.5 days (the code hasn’t changed so we haven’t rebuilt it). However, they see this on multiple systems in the environment and not just one.

Attempting to resolve it (still in testing), I removed the PPC/PPC64 code from the library with lipo and then moved the dylib into the Frameworks folder of my app as you have done (I was using /usr/lib/),

This fixed it on a fresh test VM where we duplicated it with a clean 10.9.5 install (what my customer is running). Waiting to see if this sorts it out for the customer.

[quote=203630:@Garth Hjelte]Thanks Joe, I’ve written my client and he’ll try it.

Perhaps there will be something in that text that will tell me whats going on, but what do you think? I find it strange that he gets Function Not Found Exception on that computer but none of my clients ever has. I know it’s dumb to ask you to guess, but what am I looking for? (BTW I’ve sent him different builds of the dylib.)[/quote]

There’s going to be a ton of output, but you should find what you want by searching for your dylib name in the output. Very likely it’ll show up in a call to dlsym and the next line will be the reason why it failed (IIRC).

Thanks Tim, your suggestion - building the dylib for Intel only - at least worked for the client. I asked him also to try the Terminal thing and I hope he does, but he’s a real busy guy. Thanks also Joe, that gives me so great info for the future.