HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Possible Cache Error Isolated? Read on...

08-05-2006, 04:24 AM#1
Rising_Dusk
Okay people.
I have tested this spell over a hundred times in AotZ and it keeps bugging out exactly 16.5% of the time.
Notably, I wouldn't be posting this as a new topic if I hadn't gone to extreme lengths to figure this out myself.

I copied the entire spell and all code associated with it to a dummy map.
The spell still bugs out.

It recalls from gamecache an effect constantly from a timer (The timer is not ever nulled), and under certain conditions which my BJDebugMsg's assure me are ALWAYS met, it destroy the effect in question.
Notably...
This is what happens consistently --

Zoom (requires log in)

Those integers that are printed to the screen are the I2S(H2I(...))'s of the effect WHEN they should be destroyed.
Notably, you will see lots of 0's, and also lots of effects remain permanantly attached to the unit's that you attacked.

In all of my tests and an entire 2 days of work, I could not find any error in my code.
So I offer to you all this challenge.

Find me one of two things.
A ) The error in my code (It's all in the map) so I can continue working on my map.
B ) Or if I have possibly isolated the gamecache bug everyone is talking about.

I personally don't care WHICH happens, just that one happens.
Thanks, hope this gets figured out -- Attached is the testmap.
Attached Images
File type: jpgPerdLog.JPG (65.5 KB)
Attached Files
File type: w3xPerdition_Test.w3x (31.8 KB)
08-05-2006, 04:32 AM#2
Vexorian
If it really is a gamecache bug, then these last 24 hours were terrible for war3's programmers they are probably having nightmares right now.

I would like to say that they made a good work but the engine is seriously full of bugs makes me think that they had too little time to finish the engine.
08-05-2006, 04:37 AM#3
Rising_Dusk
I really just want some professionals to look over the testmap.
I have toiled over the code for so long, and I can find nothing to suggest my code is wrong anywhere.

But if anyone can find a mistake I made, then please, PLEASE do just that.
I don't want gamecache to have a bug, but if it is and it isn't my code... Well...
08-05-2006, 04:45 AM#4
Vexorian
Anyways, I have trouble finding out when an effect is supposed to be destroyed. The one with the problem is the dust one, right? Then it should be destroyed when the ghoul dies or it should stay there for a while?
08-05-2006, 04:49 AM#5
Vexorian
In case they are supposed to end when the ghouls die.

Then I have a suspect. From what I could witness, after replacing all calls to DestroyTrigger with DisableTrigger, the bug doesn't happen anymore, at least not in the first casts.

The DestroyTrigger bug is probably not specific to waits.
08-05-2006, 04:54 AM#6
Rising_Dusk
Well, it's supposed to end in the "SlideEffect_Update" function when the timer reaches or passes a certain duration.
It's in the custom script.

So no, not when the ghouls die, but rather the sliding ends (Since I've coordinated the duration of the effect to the time of the slide).

In any case, this DestroyTrigger bug seems problematic.
Even then, I dont destroy any triggers ANYWHERE nearby the effect that's being created.
The entire special effect is regulated in the custom script section, not the Perdition spell itself.

It is possible that an error so far back in the spell MIGHT influence future handle usage and cause errors in the effect recall...
I suppose... But explain further.
08-05-2006, 04:56 AM#7
Vexorian
Quote:
Originally Posted by Rising_Dusk
Well, it's supposed to end in the "SlideEffect_Update" function when the timer reaches or passes a certain duration.
It's in the custom script.

So no, not when the ghouls die, but rather the sliding ends (Since I've coordinated the duration of the effect to the time of the slide).

In any case, this DestroyTrigger bug seems problematic.
Even then, I dont destroy any triggers ANYWHERE nearby the effect that's being created.
The entire special effect is regulated in the custom script section, not the Perdition spell itself.

It is possible that an error so far back in the spell MIGHT influence future handle usage and cause errors in the effect recall...
I suppose... But explain further.
I don't think that matters, DestroyTrigger seems to screw the index of the next handle in some situations, so it won't matter if the code is separated by 567 lines, if DestroyTrigger causes the bug the next handle will be screwed.

--

Before replacing DestroyTrigger with DisableTrigger, some dust effects stayed for a long time even if the ghoul died. IT did not seem to happen anymore after that.
08-05-2006, 05:00 AM#8
Rising_Dusk
So then what?
Don't destroy the triggers? Just disable them?

And when was this bug found out and why have I seemed to totally miss it's discovery?
08-05-2006, 05:02 AM#9
Alevice
Quote:
Originally Posted by Rising_Dusk
And when was this bug found out and why have I seemed to totally miss it's discovery?

http://www.wc3campaigns.net/showthre...t=85984&page=2
08-05-2006, 05:03 AM#10
Vexorian
Quote:
Don't destroy the triggers? Just disable them?

I think we need to find out what is the action that should not be done after DestroyTrigger(), and then make sure to destroy the trigger when everything is finished instead.

Maybe not ever Destroying Triggering Trigger. but instead create a timer to destroy the trigger later.

The bug was discovered *today* well some hours ago.

Edit: My god my time sense is totally messed up, the bug was discovered 2 days ago.
08-05-2006, 05:05 AM#11
Rising_Dusk
*Sigh*
A day late and a dollar short. :/

But the bug itself isn't the problem for me so much as HOW to fix it.
And if this bug truly exists simply because of DestroyTrigger... Then 99% of my spells should NEVER work...
I destroy dozens of triggers in my map while threads created from them still run...
This bug only seems to occur with THIS spell reproduceably.
08-05-2006, 05:18 AM#12
Rising_Dusk
By the freaking Gods you're all correct.
I'm so sorry for the double post, but I can't believe I didnt realize it sooner.

I'm such a moron.
In every spell in AotZ there is a DestroyTrigger() SOMEWHERE.
These random bugs only occur in totally CACHE HEAVY (Stressful) situations like I always mentioned.
However, Disable triggers instead of destroying them... No bugs occur... Ever.

God, I'm so MAD I didn't see it sooner.
It was right under my freakin' nose the WHOLE time.

And you were right Vex, in my testmap, replacing all DestroyTriggers with DisableTriggers solves every instance of the problem.
It's so irritating that I didnt realize it sooner, but gratz to Masda... *Sigh*
08-05-2006, 06:39 AM#13
vile
So triggers will still leak if we dont destroy them.. maybe we should put a test, and put a timer to destroy the trigger later, and see if it still bugs out.

EDIT:
After rough testing, I added a function that runs a timer that destroys the trigger after 5 seconds and it didnt seem to bug out.

EDIT2:
After some tests WITH the destroytrigger (without delay), I got a fatal error and crashed to desktop! wow.

I spammed the spell like hell and it didnt bug out even once with the destroytrigger 5 seconds delay.

The question still remains if the timer nulling still exists.
08-05-2006, 12:07 PM#14
blu_da_noob
Another developement: I removed all the places where you set trigger variables to null. The spell then worked perfectly (from my testing); all the effects loaded properly. (Removing the trigger nulling was the only change I made)
08-05-2006, 12:18 PM#15
Rising_Dusk
Did you try adding timer nulling to the system?
I would do it right now but I have an important gathering to attend.

I'd like to know if timer nulling is really the culprit of a bug or if it was trigger nulling in disguise.
And since you tested and noticed that, then the problem is trigger NULLING not DESTROYING the triggers?
Hrm..