Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AbrahamR), 717 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Bug in pan_create, PANEL Dissapears #331034
07/01/10 16:59
07/01/10 16:59
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
Hello this could be a something im doing wrong.
But i think my scripts speaks for it self.

The first panel is created local, with pan-create
Later i remove that panel, and then i create another pan_create local panel.

The thing is , because i removed the first using a different function, that same one will remove the 2nd panel.

CHECK LINE 35 of the included attached script, which is the fade out panel function that will also fade the new created panel, with no pointer or reason to do so ( i THINK)


its 1 file , the whole script is 69 lines.
And its very easy to read

Attached Files
testbug.rar (18 downloads)
Last edited by MMike; 07/01/10 17:11.
Re: Bug in pan_create, PANEL Dissapears [Re: MMike] #331035
07/01/10 17:10
07/01/10 17:10
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
I should add: the problem could be in the ptr_remove too, because it removes the new panel created instead of the old.

Re: Bug in pan_create, PANEL Dissapears [Re: MMike] #331037
07/01/10 17:41
07/01/10 17:41
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
No, ptr_remove can not remove two panels at once. This looks like a typical script bug, such as accessing pointers to already-removed objects.

Unfortunately your script does not speak for itself... When writing scripts, make it a habit to have clear structured code. Use indentations and don't clutter lines with rat's nests of commands. Then other people and yourself have a better chance to see what the script is doing. Be always aware of when pointers are valid and when not, and don't pass pointers to coroutines while removing them in other functions. Then such problems won't happen. If they do, they might really be engine bugs.

Re: Bug in pan_create, PANEL Dissapears [Re: jcl] #331093
07/01/10 21:06
07/01/10 21:06
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
im not sure if i understood, but, i did not removed a poiter of an already removed pointer, nor acessing a pointer of a removed pointer..

i create the 1st panel, then i fade it out,then remove it with ptr_remove (now here, could is the problem , because it will remove a fading panel, and wont wait for it)
Anyway later on main(), i use the wait_for function to check when the panel is removed...

then i create a new panel.. but that panel is somehow affected because the 1st one, that has nothing to do with the 2nd. thats what made me wonder



Last edited by MMike; 07/01/10 21:16.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1