| View previous topic :: View next topic |
| Author |
Message |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Fri Mar 12, 2004 9:43 pm Post subject: How to minimize crash from 4 TAB program lag.. |
|
|
When I click to goto different TABs too fast, its will seem to get behind on the REMOVAL tasks and crash.
The main page of the program has 7000 plus lines and the TABs have about 1000 each.
So I was thinking how I could disable the other 3 TABs when if it could sense when it was getting behind, and keep me from clicking any of the other 3 TABs till it catches up???
Or maybe theres a easier way or no way  |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Mar 12, 2004 9:50 pm Post subject: |
|
|
You might try adding a small WAIT to your EVLOOP:
| Code: |
OPTION DECIMALSEP, "."
:EVLOOP
WAIT EVENT
rem -- try different amounts here --
WAIT ".1"
goto @event()
|
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Fri Mar 12, 2004 10:01 pm Post subject: |
|
|
hmm, I tried all the way up to .05 seconds, didnt seem to help.
It keeps stopping with the ERROR:
Run time error 23 at line 1331
-------------------------------------------------------------------------------
23 Control name not valid
The name specified for a dialog control contains an invalid character: names should contain only alphanumerics, and begin with a letter.
-------------------------------------------------------------------------------
| Code: | | <line 1331> %%resolution_last = @DLGTEXT(resolution) |
That part seems to get behind (video selection section)
 |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Mar 12, 2004 10:05 pm Post subject: |
|
|
Try putting the WAIT before the event capture. BTW, you
can go up to .5 without much noticable delay...
| Code: |
OPTION DECIMALSEP, "."
:EVLOOP
WAIT ".1"
WAIT EVENT
goto @event()
|
_________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Fri Mar 12, 2004 10:14 pm Post subject: |
|
|
OK, I tried that too, and even went up to .03 / .1 .2 .3 .4 .5 and up to 1 full second. The more the worse it got, and slower to turn pages of coarse.
Each TAB is loaded with dialogs etc..
I'm outta ideas, its a freebie program anyways, and people shouldnt click the TABs that many times or that fast anyways.
It just aggravates me being a perfectionest(no brag in anyway), lol
Thanks for trying MAC
I'm sure if it was your program you would have it lined out, no biggy.. |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Mar 12, 2004 10:20 pm Post subject: |
|
|
BTW, the error 23 is prolly caused by the "resolution"
control not being created/enabled etc. fast enough
when the function "@DLGTEXT(resolution)" is run.
Cheers,Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Fri Mar 12, 2004 10:56 pm Post subject: |
|
|
hehe
I fixed it, I mean its fine like this..
| Code: | OPTION ERRORTRAP,warn-exit
goto skip-too-fast
:warn-exit
info Your going too fast!"," lol@CR()Closing program".."
goto close
:skip-too-fast |
I just put that just before the ERROR line.
 |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Fri Mar 12, 2004 11:02 pm Post subject: |
|
|
I'm happy now.
I just couldn't sleep if it crashed knowing people would ask me why it crash and to fix it.
Now it tells them the reason its closing, and now questions, All they have to do is click TABs normally
I was wondering now, do you know how many times I can use the ERRORTRAP in 1 program, some reason from what I've read somewhere, its only allowed once per program, but it seems like I used it more than once in another program somehow(maybe in labels that never ran into each other).
Thanks again MAC |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Mar 12, 2004 11:16 pm Post subject: |
|
|
You can use it multiple times, but you can only set one
"trap" at a time. So you have to reset it for each part of
your app that would need a different error response. It
always goes to the last label set when there's an error.
You can clear the trap using "OPTION ERRORTRAP" with
no params.
BTW, nice solution.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Fri Mar 12, 2004 11:21 pm Post subject: |
|
|
Thanks MAC
I noticed if I did anything else but :CLOSE it went in some kind of infinity LOOP and when I attempted to change to another TAB the view stayed at the last TAB before infinity LOOP, and had CTRL ALT DEL END PROCESS.
How would I reset it, and would reseting fix above problems, or should I leave it the way it is?  |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Mar 12, 2004 11:28 pm Post subject: |
|
|
If the program goes into an endless loop, it's not releasing
the error event, and keeps going back to the trap label.
Using OPTION ERRORTRAP (no params) should clear the
trap and stop the loop.
Apparently this is just a speed issue (the comp is outrunning
the VDS code), so a few small WAITs in the right places could
still solve your problem.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Fri Mar 12, 2004 11:41 pm Post subject: |
|
|
You mean to reset:
Like that?
Its funny I been placing WAITs in that program all winter, and was thinking like you, but its such a huge program with gosubs and thousands of lines, maybe I'll never find the right spot, and everytime I add WAIT time (fractions of 10th or 100th or more, it made it worse, so it must be a super hard find WAIT fix, hee hee.
Anyways, I'm gonna stick with the ERRORTRAP, I got way too much time in this program and truley burned out on it.
You've been a big help MAC, and now I have a solution to this program, its been sitting here all winter, now I can get it posted at my website.
I can't seem to do much without help, I appreciate you stepping me in all the right directions - etc.. plus teaching me new ERRORTRAP reset and such.
Cheers.. have a good day (I gotta go, cya - Thanks again) |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sat Mar 13, 2004 12:00 am Post subject: |
|
|
The command to clear the trap is both command words,
just no label:
And you're welcome.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Sat Mar 13, 2004 8:21 am Post subject: |
|
|
If you place elements in a group element then they are all removed just by removing the group, which is much quicker. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
|