HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Bounty: Find the exact reasons of the "timer set to null" bug

08-05-2006, 12:45 AM#1
Vexorian
I am going to give 50 rep to anyone that is able to find out the exact reasons of that bug. No I don't want you to reproduce it, anyone can, I have like 5 spells that suffer this bugs, but I want to know the exact reasons.
08-05-2006, 04:13 AM#2
Rising_Dusk
I think you could put a bounty of 500 rep on it and noone would figure it out.
Really, I think it's just caused by a quirk... Or something.
08-05-2006, 07:40 AM#3
EveningStar
care to explain it first?

I've faced a timer bug where pausing and un-pausing a periodic timer will cause it to stop running after 1~3 subsequent iterations. I end up having to just destroy the timer and re-make each time I need to "pause" it.
08-05-2006, 07:43 AM#4
vile
It's simple, there's a bug that if you start a timer and then you null its variable, the timer will eventually after many casts, will freeze.
08-05-2006, 09:19 AM#5
Captain Griffen
Maybe keeping (and leaking) a variable assigned to the timer could protect it against being dumped upon by the DestroyTimer bug?

EDIT: No, as if you don't make it a variable at all, then it doesn't bug...
08-05-2006, 09:23 AM#6
Jacek
Quote:
Originally Posted by vile
It's simple, there's a bug that if you start a timer and then you null its variable, the timer will eventually after many casts, will freeze.
What would happen if you don't pause the timer? I never do, just destroy them and never met any bugs ;/
08-05-2006, 09:26 AM#7
Wyvernoid
Also, if you try to pause a non-started timer, it would directly crash the game (at least on my machine)
08-05-2006, 09:50 AM#8
vile
It never crashes my pc if i try to pause or destroy a non started or a non existing timer. The only thing that caused a crash for me was using something like DestroyTimer(GetTriggeringTrigger()) or the other way around.
08-05-2006, 09:55 AM#9
Daelin
Vile, what version of the game you have? I personally never tried this bug on different versions, but I know that I used to have 1.18 and moving an unit outside the map (SetUnitX, SetUnitY) would not cause a crash!

~Daelin
08-05-2006, 10:04 AM#10
vile
1.20E, the latest, i never tried out that setunitx/y bug, but i do have a function made by someone, i think vex, that gets a safe x/y to set the x/y without crashes.
08-05-2006, 10:09 AM#11
Daelin
That's not a problem. You can check when the unit gets outside the map and not allow it, that's not difficult. But I could actually move the unit even outside the border and it worked (with 1.18) without crashing at all. In 1.19 I think, it crashed. Sorry for the off-topic.

~Daelin
08-05-2006, 11:01 AM#12
The)TideHunter(
Quote:
Originally Posted by vile
It never crashes my pc if i try to pause or destroy a non started or a non existing timer. The only thing that caused a crash for me was using something like DestroyTimer(GetTriggeringTrigger()) or the other way around.

Writing:

Collapse JASS:
call call DestroyTimer(GetTriggeringTrigger())

Just causes a compile error, it dosent even run.
08-05-2006, 11:18 AM#13
vile
Ah sorry, not that one. It caused a crash when I was trying to use a function relating to that. My bad.
08-05-2006, 11:24 AM#14
Daelin
Umm... Could anyone point me to a sample code where the bug takes place? Cuz I do not really know what this is all about... Is it supposed to be something like this?

Collapse JASS:
local timer t = CreateTimer()
call TimerStart(t, 0.01, true, function Whatever)
set t = null

Does function Whatever stop working after a large number of repeats?

~Daelin
08-05-2006, 11:48 AM#15
Blade.dk
No, it's not that simple. Take a search for the latests posts made by me if you want, there should be a map attached to the other gamecache thread where the problem occurs.