Unity Crashes when scripting

for ( int l = 0, t = 0; l < imgLining.GetLines(); l++, t++ )
	for ( int lt = 0; lt < imgLining.GetLineArg( l ); lt++ ){
		temp[t] = new TeNo( firstTextureArea.x + ( (firstTextureArea.width + firstTextureArea.x) * lt ),
	                                     firstTextureArea.y + ( (firstTextureArea.height + firstTextureArea.y) * l ),
	                                     firstTextureArea.width + (firstTextureArea.width * lt),
	                                     firstTextureArea.y + firstTextureArea.height );
	}

I have this code in a script and when i hit Play to test what i’ve done, i get this error:

Problem signature:
Problem Event Name: APPCRASH
Application Name: Unity.exe
Application Version: 3.2.0.61061
Application Timestamp: 4d4fc71f
Fault Module Name: ntdll.dll
Fault Module Version: 6.1.7600.16695
Fault Module Timestamp: 4cc7ab44
Exception Code: c0000005
Exception Offset: 00052073
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 1032
Additional Information 1: 1877
Additional Information 2: 1877fc2807db887cc6c6ea9ad3e030b7
Additional Information 3: 7350
Additional Information 4: 7350b214697a4ac811b0f0ed0b7f8916

Read our privacy statement online:

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt

if i make:

/*temp[t] = new TeNo( firstTextureArea.x + ( (firstTextureArea.width + firstTextureArea.x) * lt ),
	firstTextureArea.y + ( (firstTextureArea.height + firstTextureArea.y) * l ),
	firstTextureArea.width + (firstTextureArea.width * lt),
	firstTextureArea.y + firstTextureArea.height );*/
}

(i get compile errors on runtime ofc, and thats not my problem :stuck_out_tongue: ). dunno what’s happening…

Any help? :confused:

This could potentially be to do with the TeNo constructor or the GetLines or GetLineArg functions. For example, any of these could contain infinite loops or recursion among other things. Is there any chance you can post the whole script or at least the parts where these things are defined?

Well, since there are several scripts working together with this one, i cant upload only 1 or 2.
BUT!, you helped me a lot, and i found what was wrong in this.
Yeap, it contained an infinite loop, so, the solution was “Check always your scripts for infinite loops!”.
Thanks andeeee!!! :smile:DDD