Strange problem. Help!

BlitzMax Forums/BlitzMax Programming/Strange problem. Help!

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Im having strange problems with my latest project.
Everything was working up until an hour ago where i only did a recompile without changing any major code (im 99% sure).

And suddenly it starts to skip method calls in Release mode, and throw memory exceptions in debug mode.

I havent been able to reproduce it with a smaller sample im afraid.

As far as i can tell, this is the offending code:
Method FindRule:TParserElement( name:String)
	Print "** FindRule()"
	For Local r:TParserElement = EachIn Rules
		Print "** comparing " + r.Name + " == " + name
		If r.IsRule And (r.Name = name) Then Return r
	Next
EndMethod
	
Method Generate( stream:TStream)
	Function GenerateCharSearch( r:TParserElement)
		Select r.Tag
			Case PE_RULE
				Print "** looking up " + r.Value
				Local rule:TParserElement = FindRule( r.Value)			<---------
				If rule Then
					Print "** found " + r.Value
					Return GenerateCharSearch(rule)
				Else
					Throw "ERROR: undefined rule '" + r.Value + "'"
				EndIf
	.....


** looking up XXX is printed but but nothing else, not even whats inside FindRule()
and the "return" is allways null

Any pointers? im going crazy soon :(

EDIT: is there a limit to how many functions inside a method? or how big they are?