Possible bug.

Just starting out? Need help? Post your questions and find answers here.
User avatar
matalog
Enthusiast
Enthusiast
Posts: 304
Joined: Tue Sep 05, 2017 10:07 am

Possible bug.

Post by matalog »

Should it be considered a bug if I'm doing some testing on programs. I run a test program that does something, lets say it works out values of PI and draws them to screen (anything that can continue forever), something that does not end. Then I stop the program and amend it to Print out via Serial Port, all values of PI (anything that can continue forever).

I then, while the latest program is printing via serial port, save that program as a different name, so that I can go and open the old program that only drew them to screen.

I then open the old program, and find that the Kill Program red X is already red - even though I didn't run it yet, and PB thinks it is already running, but PB also thinks (knows, because I did run it) that the new program printing via Serial Port is already running because the Red "Kill Program" X is also live on that program.

I then Kill the program that does not print to serial port, but both programs end.

I would consider that a bug, given that we use these programs to test things, run test programs and save from them, it seems like it shouldn't do that.

What do you think?
User avatar
Demivec
Addict
Addict
Posts: 4265
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Possible bug.

Post by Demivec »

Are you running one instance of the IDE or two?
User avatar
matalog
Enthusiast
Enthusiast
Posts: 304
Joined: Tue Sep 05, 2017 10:07 am

Re: Possible bug.

Post by matalog »

I was running one instance of the IDE, just the 2 windows on it that I described.
User avatar
Demivec
Addict
Addict
Posts: 4265
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Possible bug.

Post by Demivec »

I understood that you did these steps:
  • ProgA load
  • ProgA run
  • ProgA stop/kill
  • ProgA change
  • ProgA new run
  • SaveAs ProgB
  • ProgA load
  • (menu indicates a Prog is already running)
  • Kill running Prog
  • ---The only program running stops--
I would think that the IDE only allows one active compiled program. All menu options reference that one program. If you want to run more than one then compile at least one as an executable and then execute it and compile and run the other from the IDE
User avatar
matalog
Enthusiast
Enthusiast
Posts: 304
Joined: Tue Sep 05, 2017 10:07 am

Re: Possible bug.

Post by matalog »

I have recreated it in a simple way.

Save this program:

Code: Select all

OpenWindow(0,0,0,100,100,"New")
Repeat 
  Event = WaitWindowEvent()
  Select Event
      EndSelect
    Case #PB_Event_Menu
      Select EventMenu()
      EndSelect
  EndSelect
Until Event = #PB_Event_CloseWindow Or quit=#True
Save it as New1.pb

Run that program.

While it is running, save it as New2.pb

Then open New1.pb and you will see that it is already running, and it will stop running when you stop either New1.pb or New2.pb.
User avatar
matalog
Enthusiast
Enthusiast
Posts: 304
Joined: Tue Sep 05, 2017 10:07 am

Re: Possible bug.

Post by matalog »

This can be looked at in at least 2 ways which seem problematic:

1. The IDE allows 2 open Purebasic files to have control over the running compilation.

2. The other impication that number 1 has is that the user can not edit either of the 2 Purebasic files even though only one has been run.
Post Reply