Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 11:36 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: "Post Web Data" Timeout?
PostPosted: May 28th, 2006, 3:59 pm 
Offline

Joined: January 19th, 2006, 9:25 pm
Posts: 4
Location: Ashland, PA, USA
Hey all! I hope things are going well for everyone!!

Quick question (I hope). I have a pub that is meant to run on startup, and collect some information from a web site using the Pose Web Data action. The main window is just a narrow borderless window across the center of the screen which notifies the user that the data is being updated. I don't want to have any buttons on this page, but if the Post Web Data action doesn't work (that is, if they're not connected to the internet), I want to give them an error message and display an Exit button (along with a "please check your internet connetion and try again" message).

But I can't find a way to set up a timeout for the Post aciton. I tried putting the Post action into a Simultaneous Action Group with a Loop that counts to 15 and then displays the button and message - but when the Post action starts, everything else seems to stop (whether it's in a script or as a normal action).

Any ideas how I can do this?

Cheers!
John


For this message jeccker has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: March 25th, 2007, 2:12 pm 
Offline

Joined: February 18th, 2005, 5:44 pm
Posts: 17
Location: Michigan (USA)
Opus: V7.04
OS: Win7 32-bit
System: Pentium QUAD 4GB RAM ATI HD 57XX
I have run into this too. It's very annoying for a pub I have that uses a lot of post web actions! Help!


For this message FishBox has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Sideways thinking
PostPosted: March 27th, 2007, 5:10 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Hi Jon,

Sorry but don't have a web database to test this idea on but could you create a message box and exit button that is set to automatically appear after 15 seconds using the initially hidden / show after facility and then disable this is the post action is successfully?

Just grabbing at straws,

Mack


Top
 Profile Visit website  
 
 Post subject:
PostPosted: April 18th, 2007, 10:30 pm 
Offline

Joined: February 18th, 2005, 5:44 pm
Posts: 17
Location: Michigan (USA)
Opus: V7.04
OS: Win7 32-bit
System: Pentium QUAD 4GB RAM ATI HD 57XX
I was really hoping someone from tech support could chime in on this issue. I have a great app that uses a lot of looped scripts that access a PHP script that reads and writes to a MYSQL server. I have a loop counter which checks whether the loop is still functioning. When a post web data script is accessed on the loop, sometimes it seems to just hang there and my loop counter stops. I tried using a simultaneous loop attached to another object that would detect wether my orginal loop counter had stopped. After a 10 second timeout I tried to disable, hide, then reshow the original looped object in hopes of kickstarting it back up. No such luck! Is there something in the post web data, that when it doesn't successfully connect and read/write data to the databasse that the program hangs. IS there a way to have it timeout so we can build in a retry? BTW, all my postwebdatas are done with OpusScript

Thank You!


For this message FishBox has been thanked by : mackavi


Top
 Profile  
 
 Post subject: BUMP!
PostPosted: August 11th, 2007, 5:38 pm 
Offline

Joined: February 18th, 2005, 5:44 pm
Posts: 17
Location: Michigan (USA)
Opus: V7.04
OS: Win7 32-bit
System: Pentium QUAD 4GB RAM ATI HD 57XX
I was really hoping to get SOME type of answer on this!

Thanks!


For this message FishBox has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: November 14th, 2007, 9:25 pm 
Offline

Joined: February 18th, 2005, 5:44 pm
Posts: 17
Location: Michigan (USA)
Opus: V7.04
OS: Win7 32-bit
System: Pentium QUAD 4GB RAM ATI HD 57XX
I've been trying a lot of different ways to keep my looped script from stopping when I access data to/from the MySQL database. Some of the dynamics of this project are:

1. This is a card game that is played between two players from different computers (like Magic the Gathering Online, but much simpler).

2. I am testing the app on one computer with a WAMP5 server and a MySQL database. It also has PHP which allows me to read/write to the db.
I run the pub twice and toggle back and forth between screens to simulate a two-player game.

3. I have an object that loops during the whole game and is constantly checking the MySQL db for updates on the game turn and actions of the other player. I have put a loopcounter variable that I can view while the game is playing to determine the loop is still counting.

4. I have buttons and clickable cards that interrupt the game loop to do Fire-and-Forget actions to the MySQL db.

5. I have a lot of variables being updated on the pub screen (game turn status, points for various accomplishements, cards with stats on them, ect).

My issue:

1. When I run the pubs on my test computer, I can usually get about 100-300 loops before it just stops and does not allow me to do any other scripted actions (Like logging out of and shutting down the window with a button!). It is NOT consistant where the loop stops! It can be on just about any part of the game turn. It always seems to happen right in the part Opus Script that does a POST/GET web data action.

2. When I switch the game over to an EXTERNAL MySQL DB and PHP scripts, the problem becomes even worse! I usually only get about 50-100 loops before it just sits there, unresponsive.

My questions:
1. Could the interruption of buttons or actions on the main game loop be causing crashes?

2. Is having too many variables updating on the screen simultaneously creating problems?

3. Is there something in the Post Web Data action that causes the whole pub to stop?

4. I run this pub in a windowed screen instead of full screen. Does that affect anything?

I have really spent a LOT of time working on this pub and when it's working, it works great! I'm just pulling my hair out trying to get over this last issue. Please, if there's anyone who can help me , please respond!

If anyone is actually interested in testing the game on their computer to see if they can re-create the problem, please let me know. It's actually a really fun game!

Thank You!

Ryan


For this message FishBox has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: November 14th, 2007, 9:54 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
Just a quick idea. I'm sure you have probably tried this.....I don't know how you have designed your program, but if your loop is free running, it will run as fast as possible and grab all resources in the computer to keep running. If you have lots of variables it could just be getting bogged down? Perhaps you are trying to repeatedly access the database faster than it can respond.
Is it possible to put a delay in the loop to control the timing? or use a ticker to limit the frequency of updates?

I will test the game if you wish.

Sandy

_________________
Whoever designed this, never actually used it!


For this message sandyn has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: November 15th, 2007, 12:41 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Hi Ryan,

I'd agree with Sandyn that the loop might be running too fast. You need to assertain if this is the cause of the problem by slowing the loop down to several seconds between checks. The fact that the problem is worse with the online DB would seem to correspond as the mySQL server is like to take longer to respond than a local one and is simply being over polled.

If the game doesn't crash with a long delay between requests, then you need to look at altering the calls to only occur once the last call has completed.

As for the other issue, I have a program that updates over 100 variables on screen and works fine.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: argggg
PostPosted: September 10th, 2008, 6:35 pm 
Offline

Joined: February 18th, 2005, 5:44 pm
Posts: 17
Location: Michigan (USA)
Opus: V7.04
OS: Win7 32-bit
System: Pentium QUAD 4GB RAM ATI HD 57XX
Well, it's been almost a year and I still am grappling with this problem.

Here is a sample of some code I use in my pub:

Code:
function HireReadActionStack(){
var HireReadActionStackObj = new Object()
ca_action_db="get_hire_active_stack_from_db"
ca_debug_tracker = 121
HireReadActionStackObj.ca_action_db=ca_action_db
HireReadActionStackObj.ca_active_table=ca_active_table
HireReadActionStackObj.ca_username_opp=ca_username_opp
HireReadActionStackObj.ca_username=ca_username
ca_debug_tracker = 122
var HireReadActionStackStatus = InternetPostData(DB_URL,HireReadActionStackObj,true)
ca_debug_tracker = 123
action = HireReadActionStackStatus.action
card_id = String.number(HireReadActionStackStatus.card_id)
slot = String.number(HireReadActionStackStatus.slot)
ca_debug_tracker = 124


When I run the pub, it will hang usually after less than 200 loops. The example above is just one of many areas in within the game turn loop that seem to hang. As you can see, I'm monitoring where exactly in the script the loops stops. Many times now, my pub will show stop at 122 for my ca_debug_tracker variable and the loop counter stops indefinately. Sometimes it will do this in aother areas of the loop that have InternetPostData calls.

Please, please, please. TECH SUPPORT! Is there something in the construction of this InternetPostData function (programmed in C++ I'm guessing) that would cause this to hang further script execution?

Is there another way to post and retrieve variables to my web server? a .dll with this capability maybe? just to see if it makes a difference?

Or maybe a way to direct connect with another computer via internet IP?

Thank you,

Ryan


For this message FishBox has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: September 10th, 2008, 6:39 pm 
Offline

Joined: February 18th, 2005, 5:44 pm
Posts: 17
Location: Michigan (USA)
Opus: V7.04
OS: Win7 32-bit
System: Pentium QUAD 4GB RAM ATI HD 57XX
Oh, and I have tried adding delay times to my loop. It just takes longer, but it will still hang on the InternetPostData functions. Besides, shouldn't the next line in the script only execute AFTER the previous function has completed? I've noticed my ca_debug_tracker number delay on the InterNetPostData function assuming it was taking a little longer to retrieve/send the info, so I'm not sure how that effects anything.

Thanks again,

Ryan


For this message FishBox has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: September 10th, 2008, 7:56 pm 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
Hi Ryan,
Since none of us have your game script, or can see the setup you are using it's difficult to make suggestions. But...

I'd isolate the problem -- temporarily forget the game and set up a new pub that emulates the database access in your game pub.

Fire requests to the DB at about the same rate as the one in your game and see if the DB stops responding. That might give you a starting point to work from.

Paul


For this message Paul has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: September 11th, 2008, 12:45 pm 
Offline

Joined: February 18th, 2005, 5:44 pm
Posts: 17
Location: Michigan (USA)
Opus: V7.04
OS: Win7 32-bit
System: Pentium QUAD 4GB RAM ATI HD 57XX
Paul,

It's funny you mention that, cause I did just that yesterday after posting. I created a very simple loop that accesses the DB at regular intervals. I averaged about 30-60 loops before it stalled. Always during the execution of the InternetPostData function. VERY FRUSTRATING!

I'll work on getting an external DB to do the same thing and post a sample imp here. Thanks for your reply. Hoping the tech guys are looking into this...

Ryan


For this message FishBox has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: September 11th, 2008, 2:40 pm 
Offline
User avatar

Joined: October 25th, 2004, 10:33 am
Posts: 257
Location: UK
Opus: Pro 8
OS: Windows 7 Professional x64
System: Dell XPS15 i7x4 2.1Ghz 6GB 128GB SSD
This sounds like you're issuing more and more InternetPostDatas without waiting for the previous one to complete. I'm surpised you get as far as 200.

You need to make it do one at a time.


For this message Dave Emberton has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: WOW
PostPosted: September 11th, 2008, 8:36 pm 
Offline

Joined: October 25th, 2004, 2:20 pm
Posts: 686
Location: Naperville, Illinois (USA)
Opus: 7.05
OS: Win XP SP3
System: P4 3.2GHz 1GB RAM 2-TB HDs + 4 more
For those new to this Forum, Dave Emberton is the person who Designed and Developed OPUS!!!!! Look in the OPUS Help section under "About" and you'll see his name. He's a very busy guy, and for him to personally answer a guestion -- that's a BIG deal.

I would definitely believe whatever he tells you for an answer about OPUS.

Thanks for your response Dave!!!!

_________________
Fred Harms, Extraordinary Demos
Naperville, Illinois (USA) 630/904-3636
demofred@aol.com


For this message demofred has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 12th, 2008, 2:36 pm 
Offline

Joined: February 18th, 2005, 5:44 pm
Posts: 17
Location: Michigan (USA)
Opus: V7.04
OS: Win7 32-bit
System: Pentium QUAD 4GB RAM ATI HD 57XX
Dave,

Thank you for the response.

I was under the impression that in opus script, the next instruction after the PostInternetData would not execute until the PostInternetData had completed.

If I have a loop that delays every .75 seconds and PostInternetDatas are executed on every loop, will the program try to maintain the timing even if the previous instructions had not completed? I was under the impression all the instructions up to the delay function had to complete FIRST before doing the actual delay (or wait() in opus script).

Any suggestions on how I could stagger the loop to only run again after the InterNetPostData has completed?

Thank You,

Ryan


For this message FishBox has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group