standalone crash on post to URL or put url

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Steve Denney
Posts: 101
Joined: Wed Dec 22, 2010 8:17 pm

standalone crash on post to URL or put url

Post by Steve Denney » Fri Sep 20, 2013 1:14 am

Hi, I'm using Livecde 5.5.3
A splash screen executable opens other stacks.
The app crashes on send to URL or put URL when made into a standalone, but works in development mode.
I’ve included the internet library in the standalone.
I’ve posted the windows 7 error message below.
Happens with both windows 7 and windows 8.
I’m sure this app used to work with my current system setup (I’ve made so many changes to everything I’m not sure of anything anymore).
I’ve even tried changing to explicit urls (hard-coding the url) i.e.
post sendInfo to URL “http://webaddress/update.php
or
put URL “http://webaddress/file.txt” into fld x
Works with ide but crashes when built as standalone.
App is set to run in xp 3 mode
run as administrator
(turning off UAC doesn’t help).
System reinstall?
Livecode reinstall?
Any suggestions or advice most welcome
At my wit’s end (as usual)
Steve

Problem signature:
Problem Event Name: APPCRASH
Application Name: NewOrder.exe
Application Version: 2.0.0.0
Application Timestamp: 5090063b
Fault Module Name: mswsock.dll
Fault Module Version: 6.1.7601.17514
Fault Module Timestamp: 4ce7b8e8
Exception Code: c0000005
Exception Offset: 00001823
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 3081
Additional Information 1: eacc
Additional Information 2: eacc19cba9c3eda1f71d68c98dda7c22
Additional Information 3: fc63
Additional Information 4: fc63e596f7c0908261fc29121bae88b4

Steve Denney
Posts: 101
Joined: Wed Dec 22, 2010 8:17 pm

Re: standalone crash on post to URL or put url

Post by Steve Denney » Fri Sep 20, 2013 2:29 am

Further to original post.
A new simple standalone made to open a single purpose stack to post/put urls works. So not looking like a livecode nor a windows issue.
Maybe there's a compile error slipping through in my project (which has multiple stacks & substacks) -- meaning code error(s) I can't find.
Sorry if I've wasted anyone's time.
I'll post again if/when I find the problem.

GlendaPeter
Posts: 1
Joined: Fri Sep 20, 2013 11:38 am

Re: standalone crash on post to URL or put url

Post by GlendaPeter » Fri Sep 20, 2013 12:21 pm

Below are possible steps to fix App Crash issue:-

- Scan for Virus and Restore Original Versions of Infected System Files
- Exclude Concerning Application from DEP and Firewall Protection
- Repair App Configurations
- Uninstall Recent Updates
- Clean Registry Junk and Defrag the Registry (must use Reginout for it)

Steve Denney
Posts: 101
Joined: Wed Dec 22, 2010 8:17 pm

Re: standalone crash on post to URL or put url

Post by Steve Denney » Fri Sep 20, 2013 9:47 pm

Thanks for replying. I made two test stacks. A splash screen exe and a stack with URL put & post. Since these worked as a standalone build I assume the problem is in my code.
I have seen something like this before: a situation where livecode says code is okay (doesn't find errors after a change & save script), will even run said code & work in development mode. (win 7)
And yet failed in a standalone. (win 7 & xp)
The mistake was only revealed when livecode was installed on xp and the offending app run in development mode. Suddenly the error dialog box popped up and revealed where the error was.
Twilight zone, but I swear it was true.
So i'm thinking it could be the same here.
So far change & save hasn't found anything wrong. Running the app through its paces hasn't popped up the error box.
But somewhere in my scripts there's an error. I just have to find it.

Steve Denney
Posts: 101
Joined: Wed Dec 22, 2010 8:17 pm

Re: standalone crash on post to URL or put url

Post by Steve Denney » Sun Sep 22, 2013 2:18 am

Hi this is a real problem. I haven't re-tested the behaviour if the internet connection is good yet, but if the post to php fails (times out) then the next time an attempt is made to connect to the local data base then the app crashes.
Meaning, load a customer, try to update details, post to php fails, load another customer or product or any local sql query then the built app WILL crash.
Yet it works in development mode.
Also NB this behaviour is not confined to my computer. The crash happens on the computers at work too (and more importantly the reps in the field, who constantly have bad connections and expect their php updates to be saved for later and not have livecode crash everytime).
(i'm not sure when the crash occurs, at revOpenDatabase or during the looped sql queries)
The resetAll command -- which apparently closes all sockets -- does not help.
The database is closed properly before re-opening.
This is a big project. The app needs a local odbc database to run. It interacts with a web database via custom php pages. There are 3 main stacks and a dozen or more substacks. I can't just post my stack.
Help please.
Anyone. (I may try double posting in the database section)
Any suggestions?

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: standalone crash on post to URL or put url

Post by Simon » Sun Sep 22, 2013 5:08 am

Hi Steve,
I think you've made a good case for emergency help. I get the idea that you can't post your stack here, which is the way to get the best help from us volunteers.

I think you should go directly to RunRev and pay the cost. They do have a service for this kind of thing. I believe even custom engine code just for your particular problem. But again, there is a cost. (and I don't think that this will forever be the case, ummm them doing an engine change)

You have made it sound like the product is in the field and is failing, then you give up your profits and get it fixed.
Or.
The sky is falling... in which case, you should provide a reduced sample of the failing stack here and wait for someone knowledgeable in odbc to figure out what is going wrong. (bummer, me and my big mouth isn't one of them.)

Heck, yes I'd like to check out why a "put" is not working for you, I use it all the time and it works for me, but that sucks as an answer.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Steve Denney
Posts: 101
Joined: Wed Dec 22, 2010 8:17 pm

Re: standalone crash on post to URL or put url

Post by Steve Denney » Sun Sep 22, 2013 7:08 am

Simon thanks for replying. Yes we do have a subscription. Going to runrev isn't easy though. How do we send the database? The app needs a lot of setting up -- users select tables, columns, sorts and create views. Some tables i.e. clients, work with custom php and a web database.
I just can't see runrev staff dealing with it. I'd need to post a rep tablet. And my boss won't let me send the actual database -- so do I prepare faux php to go with a cut down database?
And hey, it might well work with simplified database & code.
I can get put and post to work just fine in small procedures. Maybe the app's using too many resources (can't see how). Something's making it crash.
What's killing me is a situation where the ide works fine but the built app crashes without meaning-full feed back.
It crashes on post -- but the data gets through.
It crashes on get url (text files).
If it can't connect it's okay, but then it crashes the next time the user connects to the local database.
We switched to 64 bit systems, the app is now uac compliant, all new operating systems.
Trying to get runrev to help will be a last resort. I'm hoping to spare them and myself (besides it might not help and takes time)

SparkOut
Posts: 2944
Joined: Sun Sep 23, 2007 4:58 pm

Re: standalone crash on post to URL or put url

Post by SparkOut » Sun Sep 22, 2013 9:13 am

It may not be related, but there are some links I googled which indicated maybe DEP is the problem (Data Execution Prevention) causing APPCRASH. You could try
Control Panel > System > Advanced tab, click Performance Settings... and then the Data Execution Prevention tab and check/change the settings for your program there. If that doesn't help, then I think RunRev would be the best place to ask for help, maybe they won't be able to rework any code for a quick fix, but if you burn a support incident, you will get dedicated help in trying to solve the problem, and who better to try helping than people who know the Livecode end of the equation better than anybody?

Steve Denney
Posts: 101
Joined: Wed Dec 22, 2010 8:17 pm

Re: standalone crash on post to URL or put url

Post by Steve Denney » Sun Sep 22, 2013 10:56 pm

Thanks for replying, I looked at settings, DEP unchecked except for windows programs.
Maybe I've my version of lc is broken after countless crashes? I'm going to get hold of the latest. Don't want to use community -- too many passkey calls in my code.

will update
Cheers
Steve

Steve Denney
Posts: 101
Joined: Wed Dec 22, 2010 8:17 pm

Re: standalone crash on post to URL or put url

Post by Steve Denney » Thu Sep 26, 2013 4:13 am

Hi, I'm feeling recklessly optimistic.
Nothing to do with reinstalling or updating LC. (Or even post or put URL)
App ran on xp with no error and worked as a built standalone (go figure).

But I don't think I was cleanly closing the database in all circumstances. (This has been an issue for me before).
So... Windows 7 or windows 8, connect again to an odbc database without previously closing properly worked in IDE but crashed in build

I've got it running properly by inserting (at various places):

if dataBaseID is a number then
revCloseDatabase dataBaseID
end if
put empty into databaseID

(I actually found where it wasn't closing, but as I said, this sort of thing has happened to me before.)
So there it is, self inflicted, my bad.
Thank to all everyone who tried to help -- especially -- or even spent time thinking 'bout this.
(Note to self -- only take on simple jobs)
Cheers
Steve

Steve Denney
Posts: 101
Joined: Wed Dec 22, 2010 8:17 pm

Re: standalone crash on post to URL or put url

Post by Steve Denney » Thu Sep 26, 2013 8:58 am

Ha! there's still an issue. Fixed post (really revConnect) crashes, but put URL still crashes in file opened by a standalone (yet works in the IDE.). Is weird as I can make a splash screen standalone to one-trick put URL stack that works just fine.
So only half solved.

Steve Denney
Posts: 101
Joined: Wed Dec 22, 2010 8:17 pm

Re: standalone crash on post to URL or put url

Post by Steve Denney » Sun Sep 29, 2013 3:28 am

Problem 2 was solved with a workaround, if someone can explain why I’d be grateful.
As a workaround, it’s not ideal.
I made a button: put URL somewebpage into field x
If that button was clicked on openCard before any openDatabase calls, then any subsequent put URL command would work. That’s any put URL command in any procedure.
If the put URL command was part of the first openCard/openStack etc then the app would crash.
If the database was opened prior to the first put URL then the app would crash.
So the workaround involves a “Click at the loc of button” command at the end of the first openCard script.
The button puts a URL into a field and THEN opens the database for the first time.
Really sounds like a similar issue, somehow caused by opening an odbc database – but as far as I can tell the database is closed properly after all odbc calls.
To recap, problem 1 (post to php crash) was solved by making sure the database was closed after every opening.
Problem 2 (put URL into fld crash) was solved by performing a put URL before opening the database for the first time.
Both problems did not appear in the IDE or on windows XP – only built apps on windows 7, windows 8
Cheers

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: standalone crash on post to URL or put url

Post by Simon » Sun Sep 29, 2013 3:50 am

If the put URL command was part of the first openCard/openStack etc then the app would crash.
I got this one :)
"http" is part of the internet library and that needs to get loaded before any calls are made
put url "http://..." is then part of the internet library.

I have asked before "how do I know if the library has been loaded?" but most say just save any calls to it till the openCard handler.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Steve Denney
Posts: 101
Joined: Wed Dec 22, 2010 8:17 pm

Re: standalone crash on post to URL or put url

Post by Steve Denney » Sun Sep 29, 2013 4:35 am

Thanks Simon, explains why I couldn't put the put URL in until openCard :D
But how might opening a database or having an open odbc connection interfere with get URL ? (Or maybe the loading of the internet library). Like, after that first get, I can connect to the database & get URLs anytime I want.
Cheers
Steve

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: standalone crash on post to URL or put url

Post by Simon » Sun Sep 29, 2013 5:48 am

Hi Steve,
I don't have an answer for you, but I can help with one part of your code.

Code: Select all

repeat for each item thisConnection in revOpenDatabases()
revCloseDatabase thisConnection 
end repeat
Note the "s" at the end of revOpenDatabases() it's not the same function as revOpenDatabase.
The above code will close 'all' open databases, so you don't have to worry about any getting left open.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Post Reply