Page 1 of 1

weird revExternalLibrary issues with standalone Mac app

Posted: Wed Aug 04, 2010 4:36 am
by OBDave
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

Re: weird revExternalLibrary issues with standalone Mac app

Posted: Wed Aug 04, 2010 5:56 am
by OBDave
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.

Re: weird revExternalLibrary issues with standalone Mac app

Posted: Wed Aug 04, 2010 5:17 pm
by OBDave
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?

Re: weird revExternalLibrary issues with standalone Mac app

Posted: Wed Aug 04, 2010 8:47 pm
by mwieder
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.

Re: weird revExternalLibrary issues with standalone Mac app

Posted: Wed Aug 04, 2010 9:30 pm
by OBDave
Oh that's an interesting point. Thanks very much - this is something I had not considered.

Re: weird revExternalLibrary issues with standalone Mac app

Posted: Thu Aug 05, 2010 3:58 pm
by OBDave
Hey mweider, thank you, thank you, thank you! That was it.

Re: weird revExternalLibrary issues with standalone Mac app

Posted: Thu Aug 05, 2010 4:09 pm
by mwieder
Cool. Glad it worked out.

Re: weird revExternalLibrary issues with standalone Mac app

Posted: Thu Aug 05, 2010 4:10 pm
by FourthWorld
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.

Re: weird revExternalLibrary issues with standalone Mac app

Posted: Sat Aug 07, 2010 5:47 am
by OBDave
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.

Re: weird revExternalLibrary issues with standalone Mac app

Posted: Sat Aug 07, 2010 7:41 am
by mwieder
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.

Re: weird revExternalLibrary issues with standalone Mac app

Posted: Sun Aug 08, 2010 11:46 pm
by OBDave
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...

Re: weird revExternalLibrary issues with standalone Mac app

Posted: Mon Aug 09, 2010 2:18 am
by mwieder
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.