• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

[vJASS] Allocation Stack Corruption

Status
Not open for further replies.
So, I've had a problem recently that I haven't been able to solve.


1. There is no thread crash going on
2. There are no leaks
3. When the number of operations grows, the stack becomes corrupted. However, the thread does not crash.
4. The stack does not become corrupted when doing these operations in a separate thread. Once again, the thread isn't crashing when everything is just on the original thread. I don't understand what the difference is if the thread doesn't crash either way.

It has been verified with absolute certainty that the resource does not leak and that the operations do not cause stack corruption. It has also been verified with absolute certainty that the thread never crashes.


The culprit is this set of lines in ListHtNt at line 469.

JASS:
			debug private method clearNode takes thistype end returns nothing
				debug loop
					debug call clearAddress()
				
					debug exitwhen this == end
					debug set this = this.p_next
				endloop
			debug endmethod

The code being run is Untitled Trigger 001



Please help me figure this problem out. I'm at a total loss.
 

Attachments

  • Booolean Expression.w3m
    116.8 KB · Views: 25
Level 26
Joined
Aug 18, 2009
Messages
4,099
Something does crash or is on the precipe. You seem to forget that jasshelper inserts TriggerEvaluates when calling methods downwards. I added counters in calculateFreeMemoryLoop__$STACK$, calculateFreeMemoryLoop__$STACK$__main and clearNode like

JASS:
function abc...
    set udg_c=udg_c+1
    ...do stuff
    set udg_c=udg_c-1
endfunction

and at a point it was 1 after your "memory leaks" output.
 
I just realized what leaks

JASS:
	private static method clearCollections takes nothing returns nothing
		loop
			exitwhen collectionCount == 0
			set collectionCount = collectionCount - 1
			
			call thistype(collections[collectionCount]).destroy()
		endloop
	endmethod

This is not part of the crash detection test... heh


All of those errors indicated nothing but a crash occurring somewhere.

My bad ;D


Helps to not code when I'm not dead tired o-o


edit
test success! : D
 
Status
Not open for further replies.
Top