weird revExternalLibrary issues with standalone Mac app

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
OBDave
Posts: 10
Joined: Fri Apr 02, 2010 4:33 am

weird revExternalLibrary issues with standalone Mac app

Post by OBDave » Wed Aug 04, 2010 4:36 am

Hello - I'm still pretty new to RunRev (been using it for the past 6 months). I am having a problem where standalone applications run fine on my Macs, but throw error 573,37,1 on my client's Macs. Some details:

I'm using Revolution Studio 4.0.0 on the Mac platform. I'm running OSX 10.6.4.

My app uses an external library that I did not create - it was supplied by a friend of mine. I followed and doublechecked the instructions on using externals found at http://lessons.runrev.com/buckets/784/lessons/6347 and everything looks OK. When I do my standalone builds, if I peek inside the standalone Mac .app, I can see the external .bundle, and the Windows build creates an Externals directory and everything looks fine inside there.

When I run the app on either of my Macs, I have no problems. I am able to talk to the external library and the application runs fine. I have an iMac and a MBP (both 2009 vintage, both running OSX 10.6.4). The Windows standalone build works correctly on my two XP machines.

But my client is having problems. I sent him the Mac .app and he's seeing error 573,37,1 get thrown when trying to access one of the functions in the external. After some farting around, I tried adding a button to the main screen of the app, the script for which is: answer stacksinuse

On my machines, when I push this button I get two lines displayed: revExternalLibrary, and the stack for the External. I see the same thing regardless of whether I'm running inside the IDE, or if I quit out of the IDE and run the standalone application. Which is what I would expect to see.

But on his machine, when he pushes the button, he only sees the External's stack. He does not see revExternalLibrary. I don't know why this should be. Both of my Macs have the RunRev development environment installed - I don't know if that's a factor or not. But I'm guessing that not having revExternalLibrary loaded is the cause of the 573,37,1 errors and other erratic behavior he's seeing and I'm not seeing.

I've searched the forums and consulted the oracle (Google) but came up dry. Anything else folks here could suggest?

Other particulars that might be useful:

My standalone application settings

General
* Select Inclusions for the standalong application are selected. I believe I have more than enough (Font Support, Geometry, Internet, Printing, and my External). Also: Ask Dialog, Answer Dialog, and Cursors are all selected.

* Remove all profiles on objects is selected

Stacks:
there are four stacks listed (my three application stacks, plus revExternalLibrary) and the "Set destroyStack" property is selected for all of them. No encryption.

Under OS X I'm building a Universal binary, and RunRev is writing the PLIST for me.

Any hints or suggestions would be greatly appreciated!

Dave

OBDave
Posts: 10
Joined: Fri Apr 02, 2010 4:33 am

Re: weird revExternalLibrary issues with standalone Mac app

Post by OBDave » Wed Aug 04, 2010 5:56 am

OK, here's another data point: I sent the app to another friend (and who - and I don't know if this matters - does NOT have the RunRev tools). He's running 10.6.4, and the application seems to run fine on his Mac. Both libraries are shown when the stacksinuse button is pushed, and the app seems to behave nicely.

OBDave
Posts: 10
Joined: Fri Apr 02, 2010 4:33 am

Re: weird revExternalLibrary issues with standalone Mac app

Post by OBDave » Wed Aug 04, 2010 5:17 pm

OK, well isn't this interesting. I've sent the little test app to several friends, and so far:

* revExternalLibrary gets loaded correctly if they are running Snow Leopard (app ran correctly on 5 out of 5 machines running 10.6.4)

* revExternalLibrary fails to load if they are running Leopard (failed on 3 out of 3 machines running 10.5.x fail)

I'm building on Snow Leopard. Any idea why my app won't load revExternalLibrary under Leopard?

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: weird revExternalLibrary issues with standalone Mac app

Post by mwieder » Wed Aug 04, 2010 8:47 pm

Sounds to me like the external library was built with Snow Leopard's version XCode and didn't have version compatibility with the Leopard libraries.

You might add a button to the app to display the externalpackages or the externalfunctions, but a 573 error is "Handler not found", so the engine isn't able to link with the external library properly. I think it'll need to be rebuilt, adding a target of OSX 10.5 in order for it to function properly on Leopard.

OBDave
Posts: 10
Joined: Fri Apr 02, 2010 4:33 am

Re: weird revExternalLibrary issues with standalone Mac app

Post by OBDave » Wed Aug 04, 2010 9:30 pm

Oh that's an interesting point. Thanks very much - this is something I had not considered.

OBDave
Posts: 10
Joined: Fri Apr 02, 2010 4:33 am

Re: weird revExternalLibrary issues with standalone Mac app

Post by OBDave » Thu Aug 05, 2010 3:58 pm

Hey mweider, thank you, thank you, thank you! That was it.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: weird revExternalLibrary issues with standalone Mac app

Post by mwieder » Thu Aug 05, 2010 4:09 pm

Cool. Glad it worked out.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10045
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: weird revExternalLibrary issues with standalone Mac app

Post by FourthWorld » Thu Aug 05, 2010 4:10 pm

mwieder wrote:Sounds to me like the external library was built with Snow Leopard's version XCode and didn't have version compatibility with the Leopard libraries.

You might add a button to the app to display the externalpackages or the externalfunctions, but a 573 error is "Handler not found", so the engine isn't able to link with the external library properly. I think it'll need to be rebuilt, adding a target of OSX 10.5 in order for it to function properly on Leopard.
Excellent diagnostics Mr. Wieder.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

OBDave
Posts: 10
Joined: Fri Apr 02, 2010 4:33 am

Re: weird revExternalLibrary issues with standalone Mac app

Post by OBDave » Sat Aug 07, 2010 5:47 am

FourthWorld wrote:Excellent diagnostics Mr. Wieder.
Agreed. :D Again, many thanks. I would have been stuck for weeks, probably.

The ExtenalsEnvironmentV3 downloadable from the tutorial Image is now out of date. It references an OSX10.2.something SDK that is no longer supported in Xcode. This was my first time using Xcode, but after some fumbling around I figured out how to make the proper changes to build against the oldest SDK which is supported, which is the OSX10.4u SDK. That seems to have worked - the RunRev executable has been tested on Tiger, Leopard, and Snow Leopard on x86 hw. Awaiting PPC test data. I submitted a ticket requesting that ExtenalsEnvironmentV3 be [properly] updated.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: weird revExternalLibrary issues with standalone Mac app

Post by mwieder » Sat Aug 07, 2010 7:41 am

Actually, you can shoehorn the 10.2.x sdk files in if you really need them, but I don't know offhand of any 10.2 systems around anymore. I dumped my old beige G3s a while back.

And I've gone through the bit of hacking the v3 externals package myself, and now have a template that I just reuse when I need to build an external library. It was quite a bit of a pain doing it in the first place, I don't remember the steps I took to get there, and I'm not keen on going back and figuring it out again.

OBDave
Posts: 10
Joined: Fri Apr 02, 2010 4:33 am

Re: weird revExternalLibrary issues with standalone Mac app

Post by OBDave » Sun Aug 08, 2010 11:46 pm

Yeah, that stuff is kinda cryptic to the newcomer. I just sorta hacked away at the build enviornment until the errors went away. The Stack that uses the externals seems to run now, even on PPC. I guess I'm done until I hear otherwise.... :roll:

But I figure making the proper fix would be as easy as falling off a log for the RunRev engineer who originally made the externals build environment, which is why I submitted the ticket. Let someone who knows what they're doing fix it...

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: weird revExternalLibrary issues with standalone Mac app

Post by mwieder » Mon Aug 09, 2010 2:18 am

The externals interface is due for some major changes sometime in the near future. Mark Waddingham gave us a preview of these at the conference in Edinburgh last year. So it's a bit unlikely that there'll be an ExternalEnvironmentV4 until that point. Unfortunately, there's no way of guessing when that might be.

Post Reply