Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
andyh1234
- Posts: 476
- Joined: Mon Aug 13, 2007 4:44 pm
-
Contact:
Post
by andyh1234 » Sun Apr 20, 2008 11:08 am
Im suddenly getting a few users, all on Leopard reporting an error like....
Code: Select all
Executing at 10:15:20 AM on Sunday, April 20, 2008
Type: Object Name:
Object: stack 'revExternalLibrary' of stack '/Users/joselozano/Jose's Applications/PDT.app/Contents/MacOS/PDT'
Line:
Line Num: 0
Hint: revExecuteSQL
Comments:
This has only happened since I recompiled with version 2.9, any ideas what could be causing it and how I would fix it?
Thanks
Andy
-
Mark
- Livecode Opensource Backer

- Posts: 5150
- Joined: Thu Feb 23, 2006 9:24 pm
-
Contact:
Post
by Mark » Sun Apr 20, 2008 2:52 pm
Andy,
Do you have more info?
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
andyh1234
- Posts: 476
- Joined: Mon Aug 13, 2007 4:44 pm
-
Contact:
Post
by andyh1234 » Sun Apr 20, 2008 6:25 pm
Not a lot im afraid, im working with a few users to try to figure out what is happening.
It appears the error happens whenever the software uses the revExecuteSQL command to access a SQlite database.
It is happening on maybe less than 1% of Mac installations (that I know of anyway), all are on Leopard so far, and all on Intel based macs.
Ive tried using the compatibility mode for the database (in the preferences) but that didnt help.
Ive asked a user to use Disk Utility to check and repair their permissions as my only last idea would be that for some reason on the users system the permissions for the database driver were wrong, but its a stab in the dark.
Im sure revExternalLibrary has something to do with it, its appeared as a stack on occasions in the application browser, but I guess its an internal file.
Its frustrating because I know most of the time the software is fine, so just a small bug affecting just a few users and may be hard to track down.
If you have any suggestions on what I can ask users it would be appreciated. Ive raised a ticket with RunRev support, but as its a weekend they wont get it until tomorrow.
Thanks for the help (again!) Mark.
Andy
-
Mark
- Livecode Opensource Backer

- Posts: 5150
- Joined: Thu Feb 23, 2006 9:24 pm
-
Contact:
Post
by Mark » Mon Apr 21, 2008 2:30 pm
Last edited by
Mark on Mon Apr 21, 2008 2:32 pm, edited 1 time in total.
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
Mark
- Livecode Opensource Backer

- Posts: 5150
- Joined: Thu Feb 23, 2006 9:24 pm
-
Contact:
Post
by Mark » Mon Apr 21, 2008 2:31 pm
Hi Andy,
I have copied the stack revExternalLibrary from the Standalone to a file on disk. The stack is completely empty, except for a Externals property. Therefore the error is completely useless.
You could try my ErrorLib. This stack gives a little more information about the error. If you don't have a license, send me an e-mail and I'll send you one.
A solution could be to create a standalone without externals, with just this script at stack level:
Code: Select all
on preOpenStack
go stack "Your Stack.rev"
end preOpenStack
and to connect the externals to your stack rather than the standalone.
It is very well possible that the problem is caused by an external. You could try to copy the external from the Rev folder into your standalone (folder) to make sure that you're using the right external.
Please, let me know what happens.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
trevordevore
- VIP Livecode Opensource Backer

- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
-
Contact:
Post
by trevordevore » Mon Apr 21, 2008 3:19 pm
Could it have anything to do with the special characters in the path name? I noticed in the path that Jose's has what looks like a "smart apostrophe". Perhaps the sqlite driver is choking on that?
'/Users/joselozano/Jose's Applications/PDT.app/Contents/MacOS/PDT'
I just did a quick test by creating a folder named "Jose's Applications" on my desktop and trying to connect to a database in that folder using the Query Builder. The Query Builder failed to connect. I then put the same database file in a folder named "Jose's Applications". The Query Build was able to connect to that database. I would let support now and open up a report in RQCC (or have support do it).
Regading the revExternalLibrary stack - This stack is created and added to your standalone when you use the standalone builder to build a standalone that uses any externals. The stack has 'the externals' property set and is used as a library stack ('start using stack "revExternalLibrary"'). In your case this makes all revDB calls available to all scripts in your standalone application.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
-
Mark
- Livecode Opensource Backer

- Posts: 5150
- Joined: Thu Feb 23, 2006 9:24 pm
-
Contact:
Post
by Mark » Mon Apr 21, 2008 3:53 pm
Hi Trevor,
Did it just fail to connect, or did you get the same error as posted by Andy?
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
trevordevore
- VIP Livecode Opensource Backer

- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
-
Contact:
Post
by trevordevore » Mon Apr 21, 2008 4:06 pm
The Query Builder just fails to connect and doesn't display any error dialogs. I'm not sure what kind of error trapping Rev is using under the hood however. The error that Andy posted doesn't make much sense in and of itself, especially since the same code appears to work for most users.
Andy may have more than one issue at play here as well. The database drivers changed in 2.9 and some features are not backwards compatible. But since he said he tried backwards compatibility mode (Revolution->Preferences->Compatibility) and that the error only shows up on some computers I think the paths issue is a good place to start since it will almost always be variable.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
-
Mark
- Livecode Opensource Backer

- Posts: 5150
- Joined: Thu Feb 23, 2006 9:24 pm
-
Contact:
Post
by Mark » Mon Apr 21, 2008 4:14 pm
Hi Trevor,
There are more people with the same problem. Together with one of them, I did tests with an absolutely correct path. We can connect to the database, but the error shows up anyway.
This problem only occurs in standalones, not in the IDE.
If the query builder fails to connect, you'll never get to the point where this execution error occurs.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
trevordevore
- VIP Livecode Opensource Backer

- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
-
Contact:
Post
by trevordevore » Mon Apr 21, 2008 4:25 pm
Ah, I figured that since the SQLite driver could not connect to the database that revExecuteSQL was being called with an invalid databaseID parameter which does cause an error in the IDE. Try this in a button script:
Code: Select all
on mouseUp pMouseBtnNo
revexecuteSQL 300, "SELECT * FROM table"
end mouseUp
An error dialog will pop up assuming you don't have an open database with an id of 300 with the following text:
executing at 11:22:05 AM
Type revdberr,invalid connection id
Object Button
Line revexecuteSQL 300, "SELECT * FROM table"
Hint revexecuteSQL
This error doesn't match what Andy reported but that error looks like the engine is having trouble reporting the error reliably or the script that is displaying the error is having trouble parsing it.
But if your tests are using a database id that is known to be good then the problem must lie elsewhere.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
-
Mark
- Livecode Opensource Backer

- Posts: 5150
- Joined: Thu Feb 23, 2006 9:24 pm
-
Contact:
Post
by Mark » Mon Apr 21, 2008 4:46 pm
Thanks, Trevor. Knowing that there are more cases where spurious errors may appear somewhat helps. We know that the database ID is correct, so that's not the cause of the error and I can't find any errors in the script we are using, but we'll sort it out (I hope).
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
trevordevore
- VIP Livecode Opensource Backer

- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
-
Contact:
Post
by trevordevore » Mon Apr 21, 2008 4:58 pm
I had a database error that was popping up (seemingly) randomly on OS X when the application launched. I could not track the issue down for weeks. I looked at permissions, file paths, etc. but without luck.
I finally tracked it down to some code being executed when the "rapp" AppleEvent was being sent to my app. This event is sent when the user clicks on your app in the dock and I would show the main program window if it was closed. Users who happened to click on the application icon in the dock after launching the app but before the app finished initializing would see a database error dialog because the database had not been initialized yet.
Happy hunting

Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
-
andyh1234
- Posts: 476
- Joined: Mon Aug 13, 2007 4:44 pm
-
Contact:
Post
by andyh1234 » Mon May 12, 2008 5:09 pm
Hi guys,
Sorry for the delay in following this up, I took a last minute break to clear my head!
Ive checked the paths, and a lot of users dont have any 'unusual' characters in them, so I can rule that one out, and the rapp doesnt seem to be the issue.
If its OK Mark Ill give your error lib a go, you have an email on the way.
Thanks
Andy
-
andyh1234
- Posts: 476
- Joined: Mon Aug 13, 2007 4:44 pm
-
Contact:
Post
by andyh1234 » Thu May 15, 2008 6:19 pm
OK, using Marks excellent errorLib, Im getting the following back...
Code: Select all
Type: ()
Object name: revExternalLibrary
Line:(row 0 col 0)
Hint: revdberr
Type: Function (error in function handler)
Object name: revExternalLibrary
Line:(row 924 col 7)
Hint: revdb_querylist
Type: put (error in expression)
Object name: revExternalLibrary
Line:(row 924 col 1)
Hint:
Type: if-then (error in statement)
Object name: revExternalLibrary
Line:(row 2109 col 1)
Hint:
What is revExternalLibrary?
-
Mark
- Livecode Opensource Backer

- Posts: 5150
- Joined: Thu Feb 23, 2006 9:24 pm
-
Contact:
Post
by Mark » Thu May 15, 2008 6:33 pm
Thanks, Andy. I have seen this error before. It is exactly the same as what I have seen earlier. The error makes no sense whatsoever, because there are no scripts in the stack revExternalLibrary. One way or another, this is a Rev bug. If it isn't a bug in the externals or a database driver, it must be a bug in Rev's error generating system. Now we still have to find out the cause of the problem.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode