PB Vision Bug? 
Author Message
 PB Vision Bug?

While using PB/Vision in my program I just started using the
TextbuttonMask option. After a few weeks later I used one of the
commands in my program and it crashed.  On one of my computers I get a
windows error!  On another system my program just locks up!

It seems that the problem is when I start my program and execut the
command TextButtonMask and then use the  "Run" command to restart the
program. The program will crash once it his one of the windowing
commands that use the Customer Mask that was specified!

But If I rem out TextButtonMask. It will never crash! I can use the run
command as much as needed and it will never crash! Ok here is an
example!

Find the demo program datademo.bas in the "vision" folder.

Compile it! It should work without any trouble!

Now edit the file and remove the line END at line 56 and replace it with
the RUN command.

Now run the program! It will start fine but once you click on Exit the
program will crash!

Now go back and go to line 132 and 133. REM out both lines that contain
TEXTBUTTONMASK!

 Now run the program! You will now be able to exit (and have the program
restart) as often as you would like without any error!

I have tryed this on two systems (same thing)! Any Idea how I can use
TextbuttonMask and use the RUN command to restart my program and have it
not crash?

I use PB 3.5 and the latist version of PB/Vision

Any help would be good!
Bobby



Wed, 03 Sep 2003 13:37:43 GMT  
 PB Vision Bug?

 > I have tryed this on two systems (same thing)! Any Idea how
 > I can use TextbuttonMask and use the RUN command to restart
 > my program and have it not crash?

I no longer have the source code for the PB/VISION kernel so I'm not sure
exactly what the problem could be other than some form of string error.   I
don't know how PB compacts and reorganizes memory when RUN is called.  Are
you shutting down the PB/VISION interface before calling RUN?

Daniel
--
Daniel P. Stasinski  (PB/VISION Author)
http://www.disabilities-r-us.com



Sat, 06 Sep 2003 00:22:57 GMT  
 PB Vision Bug?
Yea I am...  And that's the strang thing!   I would thing everything would be
shut down and everything out of any part of some sort of critical memory or
somehting would be removed!   But no go....

All I can thing of is it haveing something to do whit the RUN command for it
not flushing everything out..  Because if I exit the program and re run it
myself it has no trouble!

Strange!

Bobby

Quote:

>  > I have tryed this on two systems (same thing)! Any Idea how
>  > I can use TextbuttonMask and use the RUN command to restart
>  > my program and have it not crash?

> I no longer have the source code for the PB/VISION kernel so I'm not sure
> exactly what the problem could be other than some form of string error.   I
> don't know how PB compacts and reorganizes memory when RUN is called.  Are
> you shutting down the PB/VISION interface before calling RUN?

> Daniel
> --
> Daniel P. Stasinski  (PB/VISION Author)
> http://www.disabilities-r-us.com




Sat, 06 Sep 2003 08:36:43 GMT  
 PB Vision Bug?
Thanks for being intrested!!!  I have found the answer to the problem...

It seems that when you use define the  TEXTBUTTONMASK  option you MUST undefine
it before restarting the program!   Because if I go and issue use the line:

TEXTBUTTONMASK 1, "99-99-9999"

at the start of the program then I will need to use

TEXTBUTTONMASK 1, ""

at the end of the program to remove it...  Then I can restart the program using
"RUN" and redefine the textbuttonmask again...  It seems like eather the "RUN"
or "APPCLOSE" does not remove this out of memory or somthing, I don't
understand why but it doesn't...  But it seems like this fixes the problem!

Thanks for your intrested Daniel!

Bobby

Quote:

>  > I have tryed this on two systems (same thing)! Any Idea how
>  > I can use TextbuttonMask and use the RUN command to restart
>  > my program and have it not crash?

> I no longer have the source code for the PB/VISION kernel so I'm not sure
> exactly what the problem could be other than some form of string error.   I
> don't know how PB compacts and reorganizes memory when RUN is called.  Are
> you shutting down the PB/VISION interface before calling RUN?

> Daniel
> --
> Daniel P. Stasinski  (PB/VISION Author)
> http://www.disabilities-r-us.com




Sat, 06 Sep 2003 12:49:31 GMT  
 PB Vision Bug?

 > at the end of the program to remove it...  Then I can restart the program
 > using "RUN" and redefine the textbuttonmask again...  It seems like
 > eather the "RUN" or "APPCLOSE" does not remove this out of memory
 > or somthing, I don't understand why but it doesn't...  But it seems like
 > this fixes the problem!

That makes sense.  powerbasic's RUN command may not be re-initializing the
data segment so that when TEXTBUTTONMASK() is called again, it sees there is
already a string pointer there (but now invalid) and tries to free it before
assigning a new string pointer.  This will certainly cause all sorts of bad
things to happen.

Daniel P. Stasinski
http://www.disabilities-r-us.com



Sun, 07 Sep 2003 02:56:21 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. PB 3.2.PB/Vision 2.0 Timerinstallcode.Shared Arrays

2. setup program with PB/VISION

3. PB/DLL 6.0 - PBEDIT Bug found...

4. Bug report : pb with 64Bits RS8000 ?

5. MX Lookup with PB/CC or PB/DLL

6. TCPADDR for PB/DLL & PB/CC

7. Info on new PB/CC and PB/DLL

8. Announcing the JazzAge COM Wizard for PB/DLL and PB/CC

9. animated characters, speech input/output in PB/DLL and PB/CC

10. email enable PB/DLL-PB/CC using Outlook

11. SQL, ADO/OLE-DB programming in PB/DLL and PB/CC

12. BUGS, BUGS, BUGS, BUGS, C4 BUGS

 

 
Powered by phpBB® Forum Software