Nonsense exception (debug+threaded) (Bmax 1.41)

Archives Forums/BlitzMax Bug Reports/Nonsense exception (debug+threaded) (Bmax 1.41)

BlitzProg(Posted 2011) [#1]
Edit:
I'm now fairly sure this is a glitch and abnormal behaviour - check post #5

this could be a memory leak. Modifying a bit the source provided resulted in outputing a binary block out of the memory rather than the value of an integer.

---

Beause of the insane behaviour of this, I don't have the slightest clue of what could be causing this error.

It is volatile, so it can work on your computer. or not. I have no clue.

I managed to shrink the source code down into this:


  Global a[16]
  Global b[256]
  Global c[36]
  Global d[2048]
  Global e[16]

file=WriteFile("test_deleteme")
WriteString file,"abcdefgh"
CloseFile file

Function readstringdat:String(stream:TStream,l:Byte)
	Local array:Byte[l]
	Local i
	For i=0 To l-1
		array[i]=ReadByte(stream)
	Next
	
	Local result:String=""
	For i=0 To l-1
		If array[i]=0 Then Return result Else result=result+Chr(array[i])
	Next
	Return result
End Function

Type Problem
	Field count
	
	Function make:Problem(path$)
		Local in:TStream = ReadFile(path)
		If in=Null Return Null

		Local result:Problem = New Problem

		Local a$=readstringdat(in,4)
		Local b$=readstringdat(in,4)
		

		result.count=10

		Print "result.count = "+result.count
		For Local i=0 To result.count-1
			Print "value of i is"
			Print i
			Print "value of i is"+i
			Print "*"
		Next
		Print "*"
		DebugStop
		CloseFile in
		Return result
	End Function

End Type

Type Ta
	Global a:Ta[2048]
	Function GLITCH:Object(data:Object=Null)
		Local test:Problem = Problem.make("test_deleteme")
	End Function
End Type

Local thread:TThread=CreateThread(Ta.GLITCH,Null)
WaitKey()
End


And something completly unexplainable occurs:
Building test
Compiling:test.bmx
flat assembler  version 1.68  (1621336 kilobytes memory)
4 passes, 10740 bytes.
Linking:test.debug.mt.exe
Executing:test.debug.mt.exe
result.count = 10
value of i is
0

EXCEPTION: ACCESS VIOLATION

More insanity, here you go. If I replace
Print "value of i is"+i
by
Print "value of i is "+i

I get
Building test
Compiling:test.bmx
flat assembler  version 1.68  (1593617 kilobytes memory)
4 passes, 10790 bytes.
Linking:test.debug.mt.exe
Executing:test.debug.mt.exe
result.count = 10
value of i is
0
value of i is 0
*
value of i is
1
value of i is 1
*
value of i is
2
value of i is 2
*
value of i is
3
value of i is 3
*
value of i is
4
value of i is 4
*
value of i is
5
value of i is 5
*
value of i is
6
value of i is 6
*
value of i is
7
value of i is 7
*
value of i is
8
value of i is 8
*
value of i is
9
value of i is 9
*
*

EXCEPTION: ACCESS VIOLATION

---

This code is a shrunk version of something that was supposed to load me graphics. It works fine on release or if I call the function in the main process (no threading) and sometimes works in debug even if you didn't change the code at all - but if you run another program then try this one again, it will throw an exception.

summary of facts:

- if you remove a[] or e[] it will still crash.
- if you remove a[] and e[] or b[], c[], or d[], it won't crash and stop correctly at debugstop
- if you remove any call to "readstringdat' it won't crash
- if you add a space at the end of the string in the line print "value of i is"+i OR remove this line altogether, debugstop will crash
- if you replace Global a:Ta[2048] by Global a:Ta[9999] it won't crash

Thanks for the support. :)

Last edited 2011

Last edited 2011


col(Posted 2011) [#2]
Hiya.
I copied and pasted the code above straight into the standard MaxIDE ( 1.42 ). Sure enough It works perfect every time, no crashing at all.

When you say run another program, I assume you mean another BMax source, ie compile and run? I've compiled and run my own sources in-between compiling and running yours, no regular pattern, just run and exit mine code maybe once or a couple of times, then yours maybe once or a couple of times to try to reproduce how you say, but it runs glitch free everytime.

The only difference I see is that I'm using V1.42

This may or may not be the cause :- but you are setting up 2 Global arrays as a[]. The main one in the main global scope is an integer array, the other as a:Ta[...] within the Ta Type, and you are also then assigning 'a' again as a Local a$ within the Problem.Make function.

I've experienced a similar issue in the past, and I was using a Global variable name and then a Local one with the same name and same type, one minute it would work as expected and the next compile - the program would be erratic, even though it compiled ok and I always use SuperStrict. Not really sure if its a bug or not as at the end of the day you are defining 'a' as Global. Maybe the compiler error checking should pick this up?? Not sure on other peoples thoughts about this bit.

Although you say it still crashes for you even when you remove the a[].
I would advise against using the same names if one or both are Global - even if this isn't the cause for you.

EDIT :- Sony Vaio VGN-FW31M - Vista Home Premium 32bit SP2, Standard BlitzMax IDE 1.40 with compiler V1.42, FASM 1.69.14, GCC 3.4.5, G++ 3.4.5

Last edited 2011


BlitzProg(Posted 2011) [#3]
Thanks, i'll upgrade tomorrow and see if i'm still getting the crash.

It's true that two globals are named a (i shrunk down the name to something simple and didn't realise this) but if i rename a to, say, f, nothing changes

Also:
Window XP 32bits SP3
MaxIDE 1.40
Release version 1.41
FASM 1.68
GCC: n/a
G++: n/a

Also important: It only crash on threaded debug, amonst the things i mentionned earlier. If i'm debugging but running with no threading (removing the thread call so it compiles) it will work with no problem. If i switch to release mode it will also work.

Edit - screened the error:


Last edited 2011


BlitzProg(Posted 2011) [#4]
Upgrading to 1.42 with FASM 1.69.14 didn't solve the problem.


BlitzProg(Posted 2011) [#5]
Global a[16]
  Global b[256]
  Global c[36]
  Global d[2048]
  Global e[16]

file=WriteFile("test_deleteme")
WriteString file,"abcdefgh"
CloseFile file

Function readstringdat:String(stream:TStream,l:Byte)
	Local array:Byte[l]
	Local i
	For i=0 To l-1
		array[i]=ReadByte(stream)
	Next
	
	Local result:String=""
	For i=0 To l-1
		If array[i]=0 Then Return result Else result=result+Chr(array[i])
	Next
	Return result
End Function

Type Problem
	Field count
	
	Function make:Problem(path$)
		Local in:TStream = ReadFile(path)
		If in=Null Return Null

		Local result:Problem = New Problem

		Local a$=readstringdat(in,4)
		Local b$=readstringdat(in,4)
		

		result.count=100

		Print "result.count = "+result.count
		For Local i=0 To result.count-1
			Print "value of i is"
			Print i
			Print "value of i is "+i
			Print "*"
		Next
		Print "*"
		DebugStop
		CloseFile in
		Return result
	End Function

End Type

Type Ta
	Global a:Ta[2048]
	Function GLITCH:Object(data:Object=Null)
		Local test:Problem = Problem.make("test_deleteme")
	End Function
End Type

Local thread:TThread=CreateThread(Ta.GLITCH,Null)
WaitKey()
End



(changed:
result.count=100
Print "value of i is "+i (re-added the space)

Results:

Building untitled1
Compiling:untitled1.bmx
flat assembler version 1.69.14 (1399164 kilobytes memory)
4 passes, 10742 bytes.
Linking:untitled1.debug.mt.exe
Executing:untitled1.debug.mt.exe
result.count = 100
value of i is
0
value of i is 0
*
value of i is
1
value of i is 1
*
value of i is
2
value of i is 2
*
value of i is
3
value of i is 3
*
value of i is
4
value of i is 4
*
value of i is
5
value of i is 5
*
value of i is
6
value of i is 6
*
value of i is
7
value of i is 7
*
value of i is
8
value of i is 8
*
value of i is
9
value of i is 9
*
value of i is
1Dz
value of i is 10
*
value of i is
&#3067;&#63047;&#64740;&#61712;[<&#2590;&#64579;0&#2502;d&#2590;&#65091;&#65060;&#62968;&#3071;/ &#2132;&#62019;&#65057;&#62680;&#2136;&#26257;pend&#2426;Z257{AppSuspend}&#2114;C&#2426;Z}257{AppSuspend}&#2116;&#63555;!&#2426;Z&#2308;[&#3067;&#62791;&#64740;&#61760;[K&#2235;&#62531;!&#2426;Z&#2309;[&#3067;&#62791;&#64740;&#61808;[H&#2595;&#64579;0&#2502;d&#2595;&#65091;&#65060;&#62904;&#2132;&#62019;&#65057;&#63064;&#2117;&#65091;ume&#2600;&#64579;0&#2502;d&#2600;&#65091;&#65060;&#62024;&#3071;/ &#2117;&#62019;&#65057;&#63384;&#2142;&#63043;ume}&#2638;&#62531;P&#2497;c&#2432;Z&#2645;&#63043;&#65065;&#62832;&#2304;Z&#2432;Z&#2120;&#62531;!&#2426;Z&#2315;[&#3066;&#65095;&#64740;&#61844;[F&#2245;&#64579;!&#2426;Z&#2665;[&#3066;&#63303;&#64740;&#62208;[<&#2115;C&#2426;Z259{AppTerminate&#2120;&#64579;&#2426;Z259{AppTerminate}&#2645;&#62531;&#65026;&#2301;Z&#2750;c`&#2125;&#62531;!&#2426;Z&#2628;Z&#3066;G&#64745;&#30452;ZK&#2246;&#64579;!&#2426;Z&#2620;Z&#3065;&#63303;&#64745;&#61816;ZH&#2121;&#64579;&#2426;Z260{AppOpenFile&#2125;&#64579;&#2426;Z260{AppOpenFile}&#2149;C&#65026;&#2301;Z&#2508;b&#128; &#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2130;&#64579;!&#2426;Z&#2622;Z&#3065;&#63303;&#64744;&#65520;ZF&#2258;C!&#2426;Z&#2360;Z&#3064;&#64583;&#64744;&#65508;Z<&#2605;&#62531;0&#2502;d&#2605;&#63043;&#65060;&#61960;&#2113;&#63043;&#65057;&#63384;&#2694;&#65091;e&#2610;&#62531;0&#2502;d&#2610;&#63043;&#65059;&#65208;&#2142;&#63043;&#65057;&#61768;&#2113;&#63043;e}&#2301;Z&#2241;b$&#2652;&#65091;&#65065;&#63352;&#2603;&#2620;&#65091;&#65065;&#63480;&#2656;&#65091;&#65065;&#63608;&#2658;&#65091;&#65065;&#63736;&#2660;&#65091;&#65065;&#20841;&#2662;&#65091;&#65065;&#31520;&#2664;&#65091;&#65065;&#21917;&#2666;&#65091;&#65065;&#64248;&#2668;&#65091;&#65065;&#64376;&#2670;&#65091;&#65065;&#64504;&#2672;&#65091;&#65065;&#64408;&#2668;&#63043;&#65065;&#28379;&#2664;&#63043;&#65065;&#36646;&#2660;&#63043;&#65065;&#63640;&#2656;&#63043;&#65065;&#63384;&#2652;&#63043;&#65065;&#62744;&#2643;&#63043;&#65065;&#62264;&#2635;&#63043;&#65065;&#62040;&#2136;C!&#2426;Z&#2360;[&#3064;&#64583;&#64740;&#65096;[K&#2259;C!&#2426;Z6H&#2615;&#62531;0&#2502;d&#2615;&#63043;&#65059;&#65144;&#2113;&#63043;&#65057;&#63384;&#2693;&#63043;n&#2620;&#62531;0&#2502;d&#2620;&#63043;&#65059;&#1512;&#1468;&#3071;/ &#2117;&#62019;&#65057;&#63384;&#2142;&#63043;n}&#2426;ZW}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}&#2141;&#64579;!&#2426;Z5F&#2270;&#64579;!&#2426;Z5<&#2627;&#62531;0&#2502;d&#2432;Z&#2432;Z&#2142;&#63043;&#65057;&#63384;&#2142;&#63043;&#2673;&#62531;0&#2935;c&#1896;&#2937;c&#2432;Zdd7=0&#2426;Za}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}&#2147;&#64579;!&#2426;Z4<&#2375;&#64579;!&#2426;Z4K&#2557;&#62531;1&#2301;Z&#2345;char&#2154;&#63555;1&#2301;Z&#2562;`&#2681;&#65135;&#62724;&#2337;&#63649;&#61906;&#1956;&#2688;[&#62122;&#63529;&#2426;Zm}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}&#2154;C!&#2426;Z3H&#2374;&#64579;!&#2426;Z3F&#2155;&#62531;1&#2301;Z&#2562;`&#2295;&#63592;&#62694;&#2330;&#64225;&#61903;&#2494;&#2179;f&#65045;&#2161;&#62531;1&#2301;Z&#2562;`&#2681;&#65071;&#62724;&#2337;&#63649;&#61906;&#1956;&#2688;[&#62122;&#63529;&#2426;Z{}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}&#2160;&#64579;!&#2426;Z2<&#2359;&#62531;!&#2426;Z2K&#2168;&#64579;1&#2301;Z&#2983;_&#2427;a&#62950;&#2286;&#63329;&#61906;&#2238;&#65190;&#61440;&#2603;&#2620;&#63013;&#64490;&#2126;&#64579;&#2426;Z1025{MouseDown}&#2426;Z&#138;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}&#2168;&#62531;!&#2426;Z1H&#2358;&#62531;!&#2426;Z1F&#2169;&#63555;1&#2301;Z&#3047;[&#2176;&#63555;1&#2301;Z&#3047;[&#2426;Z&#151;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}&#2176;C!&#2426;Z0<&#2284;C!&#2426;Z0K&#2213;&#62531;1&#2301;Z&#3046;[&#2162;C&#2426;Z1027{MouseMove}&#2426;Z}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}&#2184;&#62531;!&#2426;Z100H&#2202;&#62531;!&#2426;ZefghF&#2177;&#62531;&#2426;Z1028{MouseWheel&#2184;&#64579;&#2426;Z1028{MouseWheel}&#2426;Z}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}&#2739;C"&#2595;Z&#3059;&#63591;&#63426;&#2192;&#64579; &#3067;hd&#576;<&#2185;&#64579;&#2426;Z1029{MouseEnter&#2193;&#64579;&#2426;Z1029{MouseEnter}&#2426;Z}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}&#2202;&#64579;!&#2426;Zh<&#2212;&#62531;!&#2426;ZefgK&#2194;&#64579;&#2426;Z1030{MouseLeave&#2203;&#62531;&#2426;Z1030{MouseLeave}&#2426;Z}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}&#2222;&#63555;!&#2426;Zg&#2222;&#26257;&#2223;C &#2089;\&#640;&#480; <&#2538;C1&#2301;Z&#3046;[&#2204;&#62531;&#2426;Z2049{TimerTick}&#2426;Z}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}&#2233;&#62531;!&#2426;Zef&#2233;&#65091;&#2245;&#62531; &#2089;\&#640;&#480;<&#2632;&#62531;0&#2838;[&#2432;Z&#2432;Zit&#2214;C&#2426;Z4097{HotkeyHit}&#2426;Z}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}4097{HotkeyHit}&#2233;&#64579;!&#2426;Zf<&#2244;&#64579;!&#2426;Zebc{&#2116;CA&#2426;Zvalue of i is 10n&#2119;&#64579;A&#2426;Zvalue of i is 9on}&#2426;Z&#262;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}4097{HotkeyHit}8193{GadgetAction}&#2743;C!&#2426;Ze194&#2257;C &#2367;[&#2245;&#63043;&#65059;&#61784;&#2245;&#63043;{&#2124;&#64579;A&#2426;Zvalue of i is 8t&#2130;&#62531;A&#2426;Zvalue of i is 7t}&#2426;Z&#279;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}4097{HotkeyHit}8193{GadgetAction}8194{GadgetPaint}&#2257;&#63555; &#2384;[&#2245;&#63043;8195&#2269;&#64579; &#2367;[&#2257;&#26257;&#65059;&#62568;&#2257;&#26257;{&#2135;&#63555;A&#2426;Zvalue of i is 6ct&#2141;&#62531;A&#2426;Zvalue of i is 5ct}&#2426;Z&#297;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}4097{HotkeyHit}8193{GadgetAction}8194{GadgetPaint}8195{GadgetSelect}&#2271;&#64579; &#2384;[&#2257;&#26257;8196&#2193;&#62531;!&#2426;Zabcd73&#2147;&#62531;A&#2426;Zvalue of i is 4&#2559;&#64579;@... = 100}&#2625;&#62531;@&#2755;d&#2757;d&#2428;Z&#2624;&#63043;&#65064;&#65432;&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2426;Z&#329;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}4097{HotkeyHit}8193{GadgetAction}8194{GadgetPaint}8195{GadgetSelect}8196{GadgetMenu}8197{GadgetOpen}&#2297;&#62531;&#2426;Z65537{&#2311;C&#2426;Z65537&#2137;&#62531;@&#2755;d&#2758;d&#2428;Z&#2619;&#63043;&#65064;&#65112;&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2136;&#63555;@&#2755;d&#2758;d&#2428;Z&#2616;&#2620;&#63043;&#65064;&#64792;&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2426;Z&#346;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}4097{HotkeyHit}8193{GadgetAction}8194{GadgetPaint}8195{GadgetSelect}8196{GadgetMenu}8197{GadgetOpen}8198{GadgetClose}&#2311;&#63555;&#2426;Z32769{&#2325;&#64579;&#2426;Z32769&#2132;C@&#2755;d&#2759;d&#2428;Z&#2609;&#63043;&#65064;&#64472;&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2131;&#62531;@&#2755;d&#2759;d&#2428;Z&#2604;&#63043;&#65064;&#28379;&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2426;Z&#362;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}4097{HotkeyHit}8193{GadgetAction}8194{GadgetPaint}8195{GadgetSelect}8196{GadgetMenu}8197{GadgetOpen}8198{GadgetClose}8199{GadgetDone}&#2326;&#62531;&#2426;Z16389{&#2341;&#62531;&#2426;Z16389&#2117;&#64579;@&#2755;d&#2760;d&#2428;Z&#2599;&#65091;&#65064;&#20841;&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2117;C@&#2755;d&#2760;d&#2428;Z&#2430;Z&#2594;&#65091;&#65064;&#63544;&#2432;Z&#2432;Z&#2432;Z&#2432;Z}&#2426;Z&#383;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}4097{HotkeyHit}8193{GadgetAction}8194{GadgetPaint}8195{GadgetSelect}8196{GadgetMenu}8197{GadgetOpen}8198{GadgetClose}8199{GadgetDone}8200{GadgetLostFocus}&#2341;&#64579;&#2426;Z16388{&#2357;&#62531;&#2426;Z16388&#2692;&#63555;@&#2755;d&#2761;d&#2428;Z&#2426;Z&#2588;&#65091;&#65064;&#63160;&#2327;&#65091;&#65062;0Z&#2432;Z&#2432;Z&#2694;C@&#2755;d&#2762;d&#2428;Z&#2301;Z&#2582;&#65091;&#65064;&#62776;&#2327;&#65091;&#65062;0Z&#2432;Z&#2432;Z&#2426;Z&#400;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}4097{HotkeyHit}8193{GadgetAction}8194{GadgetPaint}8195{GadgetSelect}8196{GadgetMenu}8197{GadgetOpen}8198{GadgetClose}8199{GadgetDone}8200{GadgetLostFocus}8201{GadgetShape}&#2357;&#64579;&#2426;Z16387{&#2374;&#62531;&#2426;Z16387{&#2175;&#63555;A&#2426;Zvalue of i is 0ivate}&#2167;&#64579;A&#2426;Zvalue of i is 1ivate&#2426;Z&#417;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}4097{HotkeyHit}8193{GadgetAction}8194{GadgetPaint}8195{GadgetSelect}8196{GadgetMenu}8197{GadgetOpen}8198{GadgetClose}8199{GadgetDone}8200{GadgetLostFocus}8201{GadgetShape}16385{WindowMove}&#2426;Z16386&#2373;&#64579;&#2426;Z16386{&#2160;&#62531;A&#2426;Zvalue of i is 2se}&#2153;&#63555;A&#2426;Zvalue of i is 3se&#2426;Z&#434;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}4097{HotkeyHit}8193{GadgetAction}8194{GadgetPaint}8195{GadgetSelect}8196{GadgetMenu}8197{GadgetOpen}8198{GadgetClose}8199{GadgetDone}8200{GadgetLostFocus}8201{GadgetShape}16385{WindowMove}16386{WindowSize}&#2426;Z&#452;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}4097{HotkeyHit}8193{GadgetAction}8194{GadgetPaint}8195{GadgetSelect}8196{GadgetMenu}8197{GadgetOpen}8198{GadgetClose}8199{GadgetDone}8200{GadgetLostFocus}8201{GadgetShape}16385{WindowMove}16386{WindowSize}16387{WindowClose}&#2426;Z&#473;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}4097{HotkeyHit}8193{GadgetAction}8194{GadgetPaint}8195{GadgetSelect}8196{GadgetMenu}8197{GadgetOpen}8198{GadgetClose}8199{GadgetDone}8200{GadgetLostFocus}8201{GadgetShape}16385{WindowMove}16386{WindowSize}16387{WindowClose}16388{WindowActivate}&#2426;Z&#492;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}4097{HotkeyHit}8193{GadgetAction}8194{GadgetPaint}8195{GadgetSelect}8196{GadgetMenu}8197{GadgetOpen}8198{GadgetClose}8199{GadgetDone}8200{GadgetLostFocus}8201{GadgetShape}16385{WindowMove}16386{WindowSize}16387{WindowClose}16388{WindowActivate}16389{WindowAccept}&#2426;Z&#509;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}4097{HotkeyHit}8193{GadgetAction}8194{GadgetPaint}8195{GadgetSelect}8196{GadgetMenu}8197{GadgetOpen}8198{GadgetClose}8199{GadgetDone}8200{GadgetLostFocus}8201{GadgetShape}16385{WindowMove}16386{WindowSize}16387{WindowClose}16388{WindowActivate}16389{WindowAccept}32769{MenuAction}&#2700;&#62531;&#65040;&#2301;Z&#2582;&#2620;e&#1024;&#256;mEof}&#2426;Z&#543;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}4097{HotkeyHit}8193{GadgetAction}8194{GadgetPaint}8195{GadgetSelect}8196{GadgetMenu}8197{GadgetOpen}8198{GadgetClose}8199{GadgetDone}8200{GadgetLostFocus}8201{GadgetShape}16385{WindowMove}16386{WindowSize}16387{WindowClose}16388{WindowActivate}16389{WindowAccept}32769{MenuAction}65537{StreamEof}65538{StreamAvail}&#2095;&#64579;&#65042;&#2426;Z&#562;}257{AppSuspend}258{AppResume}259{AppTerminate}260{AppOpenFile}261{AppIdle}513{KeyDown}514{KeyUp}515{KeyChar}516{KeyRepeat}1025{MouseDown}1026{MouseUp}1027{MouseMove}1028{MouseWheel}1029{MouseEnter}1030{MouseLeave}2049{TimerTick}4097{HotkeyHit}8193{GadgetAction}8194{GadgetPaint}8195{GadgetSelect}8196{GadgetMenu}8197{GadgetOpen}8198{GadgetClose}8199{GadgetDone}8200{GadgetLostFocus}8201{GadgetShape}16385{WindowMove}16386{WindowSize}16387{WindowClose}16388{WindowActivate}16389{WindowAccept}32769{MenuAction}65537{StreamEof}65538{StreamAvail}131073{ProcessExit}&#2486;&#64579;&#2973;[&#2504;&#64579;&#65040;&#2301;Z&#3046;[&#1024;&#256;&#2505;C&#65040;&#2301;Z&#3046;[&#1024;&#256;&#2521;&#63555;&#65040;&#2301;Z&#3046;[&#1024;&#256;&#2127;&#64579;&#2237;c&#2554;&#63555;&#65026;&#2301;Z&#2240;c&#128;&#2554;&#64579;&#65026;&#2301;Z&#2240;c&#128;&#2148;&#62531;&#2341;c&#2531;`&#380;&#2543;&#26391;&#62658;&#3065;&#64614;j&#656;&#2387;&#63649;&#62125;&#1536;&#2872;`&#65249;&#3032;`&#64449;@&#2112;&#3019;&#64994;R&#2360;&#2360;&#2544;>&#2543;&#26391;&#62658;&#656;&#2387;&#63649;&#62125;&#3065;&#64614;j&#2543;&#26391;&#62658;&#3065;&#64614;j&#656;&#2387;&#63649;&#62125;@&#256;&#2080;a&#61440;&#2304;h&#61440;&#3019;&#64994;R&#512;&#2566;&#64579;&#1156;i&#2295;[&#3068;&#63303;&#64739;&#65016;[K&#2567;&#64579;&#1156;i&#2361;[&#3068;&#64839;&#64740;&#65148;[F&#2212;&#64579; &#2089;\&#640;&#480;F&#2568;&#64579;&#1156;i&#476;i&#3069;&#63303;&#64716;i&#2567;&#62531; &#2089;\&#640;&#480;H&#2569;&#64579;&#1156;i&#980;i&#3069;&#64839;&#64720;i&#2568;&#62531; &#2089;\&#640;&#480;K&#2570;&#64579;&#1156;i&#2539;e&#3070;&#62791;&#64743;&#64296;e&#2569;&#62531; &#2089;\&#720;&#480;<&#2634;&#62531;&#1156;i&#2570;&#62531; &#2089;\&#720;&#576;<&#2737;&#63555;*&#2595;Z&#2571;&#62531; &#2089;\&#800;&#600;<&#2573;&#64579; &#2615;e&#2576;&#65091;&#65064;&#62328;&#2571;&#65091;&#2572;&#62531; &#2089;\&#800;&#600;F&#2696;&#63555; &#2518;e&#2574;&#65091;&#65064;&#62264;&#2573;&#62531; &#2089;\&#800;&#600;H&#2575;&#64579; &#2462;e&#2575;&#65091;&#65064;&#62456;&#2573;&#65091;&#2574;&#62531; &#2089;\&#800;&#600;K&#2576;&#64579; &#2382;e&#2627;&#63043;&#65064;&#62520;&#2574;&#65091;&#2575;&#62531; &#2089;\&#1024;&#768;<&#2696;&#62531; &#3043;d&#2432;Z&#2577;&#65091;&#65064;&#62456;&#2576;&#62531; &#2089;\&#1024;&#768;F&#2694;&#64579; &#2714;d&#2301;Z&#2578;&#65091;&#65064;&#62520;&#2577;&#62531; &#2089;\&#1024;&#768;H&#2579;&#64579;!&#2426;Znull[]&#2578;&#62531; &#2089;\&#1024;&#768;K&#2580;&#64579; &#2367;[&#2579;&#65091;&#65064;&#62712;&#2579;&#65091;&#2579;&#62531; &#2089;\&#1152;&#864;<&#2581;&#64579; &#2384;[&#2579;&#65091;&#65064;&#62840;&#2579;&#65091;&#2580;&#62531; &#2089;\&#1152;&#864;F&#2582;&#64579; &#2367;[&#2581;&#65091;&#65064;&#62840;&#2581;&#65091;&#2581;&#62531; &#2089;\&#1152;&#864;H&#2343;&#62531; &#2384;[&#2581;&#65091;&#65064;&#62968;&#2581;&#65091;&#2582;&#62531; &#2089;\&#1152;&#864;K&#2693;&#62531; &#2714;d&#2426;Z&#2584;&#65091;&#65064;&#62904;&#2583;&#62531; &#2089;\&#1280;&#720;<&#2585;&#64579;!&#2426;Zstring&#2584;&#62531; &#2089;\&#1280;&#768;<&#2586;&#64579; &#2367;[&#2585;&#65091;&#65064;&#63096;&#2585;&#65091;&#2585;&#62531; &#2089;\&#1280;&#768;F&#2587;&#64579; &#2384;[&#2585;&#65091;&#65064;&#63224;&#2585;&#65091;&#2586;&#62531; &#2089;\&#1280;&#768;H&#2588;&#64579; &#2367;[&#2587;&#65091;&#65064;&#63224;&#2587;&#65091;&#2587;&#62531; &#2089;\&#1280;&#768;K&#2342;&#62531; &#2384;[&#2587;&#65091;&#65064;&#63352;&#2587;&#65091;&#2588;&#62531; &#2089;\&#1280;&#800;<&#2113;&#62531; &#2714;d&#2430;Z&#2590;&#65091;&#65064;&#63288;&#2589;&#62531; &#2089;\&#1280;&#800;F&#2591;&#64579;!&#2426;Zobject&#2590;&#62531; &#2089;\&#1280;&#800;H&#2592;&#64579; &#2367;[&#2591;&#65091;&#65064;&#63480;&#2591;&#65091;&#2591;&#62531; &#2089;\&#1280;&#800;K&#2593;&#64579; &#2384;[&#2591;&#65091;&#65064;&#63608;&#2591;&#65091;&#2592;&#62531; &#2089;\&#1280;&#960;<&#2594;&#64579; &#2367;[&#2593;&#65091;&#65064;&#63608;&#2593;&#65091;&#2593;&#62531; &#2089;\&#1280;&#960;F&#2327;&#64579; &#2384;[&#2593;&#65091;&#65064;&#63736;&#2593;&#65091;&#2594;&#62531; &#2089;\&#1280;&#960;H&#2596;&#64579;!&#2426;Zdouble&#2595;&#62531; &#2089;\&#1280;&#960;K&#2597;&#64579; &#2367;[&#2596;&#65091;&#65064;&#38706;&#2596;&#65091;&#2596;&#62531; &#2089;\&#1280;&#1024;<&#2598;&#64579; &#2384;[&#2596;&#65091;&#65064;&#38584;&#2596;&#65091;&#2597;&#62531; &#2089;\&#1280;&#1024;F&#2599;&#64579; &#2367;[&#2598;&#65091;&#65064;&#38584;&#2598;&#65091;&#2598;&#62531; &#2089;\&#1280;&#1024;H&#2326;&#64579; &#2384;[&#2598;&#65091;&#65064;&#22120;&#2598;&#65091;&#2599;&#62531; &#2089;\&#1280;&#1024;K&#2601;&#62531;!&#2426;Zfloat&#2602;&#62531; &#2367;[&#2601;&#63043;&#65064;&#32265;&#2601;&#63043;H&#2600;&#62531; &#2089;\&#640;&#480; F&#2603;&#62531; &#2384;[&#2601;&#63043;&#65064;&#40771;&#2600;&#65091;&#2601;&#64579; &#2089;\&#640;&#480; H&#2604;&#62531; &#2367;[&#2603;&#63043;&#65064;&#40771;&#2603;&#63043;&#2602;&#64579; &#2089;\&#640;&#480; K&#2313;C &#2384;[&#2603;&#63043;&#65064;&#64344;&#2603;&#63043;&#2603;&#64579; &#2089;\&#720;&#480; <&#2606;&#62531;!&#2426;Zlong&#2604;&#64579; &#2089;\&#720;&#576; <&#2607;&#62531; &#2367;[&#2606;&#63043;&#65064;&#64408;&#2606;&#63043;&#2605;&#64579; &#2089;\&#800;&#600; <&#2608;&#62531; &#2384;[&#2606;&#63043;&#65064;&#64536;&#2606;&#63043;&#2606;&#64579; &#2089;\&#800;&#600; F&#2609;&#62531; &#2367;[&#2608;&#63043;&#65064;&#64536;&#2608;&#63043;&#2607;&#64579; &#2089;\&#800;&#600; H&#2312;C &#2384;[&#2608;&#63043;&#65064;&#64664;&#2608;&#63043;&#2608;&#64579; &#2089;\&#800;&#600; K&#2610;&#2620;&#62531;!&#2426;Zint&#2609;&#64579; &#2089;\&#1024;&#768; <&#2612;&#62531; &#2367;[&#2610;&#2620;&#63043;&#65064;&#64728;&#2610;&#2620;&#63043;&#2610;&#64579; &#2089;\&#1024;&#768; F&#2613;&#62531; &#2384;[&#2610;&#2620;&#63043;&#65064;&#64856;&#2610;&#2620;&#63043;&#2610;&#2620;&#64579; &#2089;\&#1024;&#768; H&#2616;&#2620;&#62531; &#2367;[&#2613;&#63043;&#65064;&#64856;&#2613;&#63043;&#2612;&#64579; &#2089;\&#1024;&#768; K&#2298;&#64579; &#2384;[&#2613;&#63043;&#65064;&#64984;&#2613;&#63043;&#2613;&#64579; &#2089;\&#1152;&#864; <&#2616;&#62531;!&#2426;Zshort&#2616;&#2620;&#64579; &#2089;\&#1152;&#864; F&#2617;&#62531; &#2367;[&#2616;&#63043;&#65064;&#65048;&#2616;&#63043;&#2615;&#64579; &#2089;\&#1152;&#864; H&#2618;&#62531; &#2384;[&#2616;&#63043;&#65064;&#65176;&#2616;&#63043;&#2616;&#64579; &#2089;\&#1152;&#864; K&#2619;&#62531; &#2367;[&#2618;&#63043;&#65064;&#65176;&#2618;&#63043;&#2617;&#64579; &#2089;\&#1280;&#720; <&#2297;&#64579; &#2384;[&#2618;&#63043;&#65064;&#65304;&#2618;&#63043;&#2618;&#64579; &#2089;\&#1280;&#768; <&#2621;&#62531;!&#2426;Zbyte&#2619;&#64579; &#2089;\&#1280;&#768; F&#2622;&#62531; &#2367;[&#2621;&#63043;&#65064;&#65368;&#2621;&#63043;&#2620;&#64579; &#2089;\&#1280;&#768; H&#2623;&#62531; &#2384;[&#2621;&#63043;&#65064;&#65496;&#2621;&#63043;&#2621;&#64579; &#2089;\&#1280;&#768; K&#2624;&#62531; &#2367;[&#2623;&#63043;&#65064;&#65496;&#2623;&#63043;&#2622;&#64579; &#2089;\&#1280;&#800; <&#2285;C &#2384;[&#2623;&#63043;&#65065;X&#2623;&#63043;&#2623;&#64579; &#2089;\&#1280;&#800; F&#2626;&#62531; &#2465;&#2492;d&#2694;&#62019;&#65065;&#152;&#2624;&#63043;&#2624;&#64579; &#2089;\&#1280;&#800; H&#2142;&#62531; &#2465;&#2492;d&#2132;&#62019;&#65065;&#2625;&#63043;&#2625;&#64579; &#2089;\&#1280;&#800; K&#2628;&#62531; &#2471;d&#2095;&#63043;&#65065;&#61720;&#2626;&#63043;&#2626;&#64579; &#2089;\&#1280;&#960; <&#2629;&#62531; &#2152;d&#2432;Z&#2629;&#63043;&#65065;&#2627;&#64579; &#2089;\&#1280;&#960; F&#2630;&#62531; &#3065;c&#2630;&#63043;&#65071;&#65420;c&#3071;/ &#2628;&#64579; &#2089;\&#1280;&#960; H&#2631;&#62531; &#3065;c&#2631;&#63043;&#65071;&#65356;c&#2629;&#64579; &#2089;\&#1280;&#960; K&#2223;&#63555; &#3065;c&#2143;&#62019;&#65071;&#65288;c&#2630;&#64579; &#2089;\&#1280;&#1024; <&#2676;C &#2772;[&#2432;Z&#2915;&#64623; &#2887;V&#2432;Z&#2631;&#64579; &#2089;\&#1280;&#1024; F&#2635;&#62531; &#2089;\&#800;&#600; 8&#2632;&#64579; &#2089;\&#1280;&#1024; H&#2635;&#64579;&#2120;a&#800;&#600;8&#2633;&#64579; &#2089;\&#1280;&#1024; K&#2636;&#64579; &#2089;\&#1280;&#1024; K&#2637;&#64579;&#2120;a&#1280;&#1024;K&#2634;&#64579; &#2089;\&#800;&#600;8&#2643;&#62531; &#2089;\&#1280;&#1024; H&#2636;&#62531; &#2089;\&#800;&#600; 8&#2643;&#64579;&#2120;a&#1280;&#1024;H&#2637;&#62531;&#65029;&#2301;Z&#2136;b&#288;H&#2223;&#62019;&#65058;&#38706;&#2567;&#63043;&#65064;&#61976;&#2569;&#63043;&#65064;&#62104;&#2571;&#63043;&#65064;&#62232;&#2573;&#63043;&#65064;&#62360;&#2575;&#63043;&#65064;&#62488;&#2577;&#63043;&#65064;&#62616;&#2579;&#63043;&#65064;&#62744;&#2581;&#63043;&#65064;&#62872;&#2583;&#63043;&#65064;&#63000;&#2585;&#63043;&#65064;&#63128;&#2587;&#63043;&#65064;&#63256;&#2589;&#63043;&#65064;&#63384;&#2591;&#63043;&#65064;&#63512;&#2593;&#63043;&#65064;&#63640;&#2595;&#63043;&#65064;&#33853;&#2597;&#63043;&#65064;&#36646;&#2599;&#63043;&#65064;&#31036;&#2601;&#65091;&#65064;&#35222;&#2603;&#65091;&#65064;&#1496;&#1468;&#2605;&#65091;&#65064;&#64440;&#2607;&#65091;&#65064;&#64568;&#2609;&#65091;&#65064;&#64696;&#2610;&#2620;&#65091;&#65064;&#64824;&#2613;&#65091;&#65064;&#64952;&#2615;&#65091;&#65064;&#65080;&#2617;&#65091;&#65064;&#65208;&#2619;&#65091;&#65064;&#65336;&#2621;&#65091;&#65064;&#65464;&#2623;&#65091;&#65065;8&#2625;&#65091;&#65065;&#2627;&#65091;&#65065;&#61752;&#2629;&#65091;&#65065;&#61880;&#2631;&#65091;&#65065;&#62008;&#2633;&#65091;&#65065;&#62136;&#2636;&#63043;&#65065;&#62296;&#2644;&#62531; &#2089;\&#1280;&#1024; F&#2644;&#64579;&#2120;a&#1280;&#1024;F&#2652;&#62531; &#2089;\&#1280;&#1024; <&#2653;&#62531;&#2120;a&#1280;&#1024;<&#2118;&#63555;a&#2301;Z&#2513;c@&#2122;&#64579;&#2746;c&#2646;&#64579;&#2179;b&#2647;C&#65029;&#2643;`&#2432;&#2560;&#2811;&#2875;
&#2182;&#62621;&#64771;&#2303;&#2303;&#2312;&#2995;&#1792;&#771;&#768;&#771;&#768;&#771;??&#2112;&#2112;&#512;&#2176;&#2112;&#761;&#2368;&#62891;&#64544;&#2866;&#65515;&#64544;&#2866;&#65515;&#64544;&#2354;&#65515;&#64544;&#2354;&#511;&#3071;&#315;&#2328;o &#3071;&#768;&#3071;&#65476;&#768;&#3071;.&#61440;&#2333;q&#783;&#768;&#768;  &#512;&#256;&#257;&#3071;&#3071;&#544;&#2112;&#2603;&#2620;&#62531; &#2089;\&#1280;&#960; K&#2647;&#62531; &#2089;\&#640;&#480; <&#2655;&#62531;&#2120;a&#1280;&#960;K&#2652;&#64579; &#2089;\&#640;&#480; F&#2656;&#62531; &#2089;\&#1280;&#960; H&#2653;&#64579; &#2089;\&#640;&#480; H&#2657;&#62531;&#2120;a&#1280;&#960;H&#2603;&#2620;&#64579; &#2089;\&#640;&#480; K&#2658;&#62531; &#2089;\&#1280;&#960; F&#2655;&#64579; &#2089;\&#720;&#480; <&#2659;&#62531;&#2120;a&#1280;&#960;F&#2656;&#64579; &#2089;\&#720;&#576; <&#2660;&#62531; &#2089;\&#1280;&#960; <&#2657;&#64579; &#2089;\&#800;&#600; <&#2661;&#62531;&#2120;a&#1280;&#960;<&#2658;&#64579; &#2089;\&#800;&#600; F&#2662;&#62531; &#2089;\&#1280;&#800; K&#2659;&#64579; &#2089;\&#800;&#600; H&#2663;&#62531;&#2120;a&#1280;&#800;K&#2660;&#64579; &#2089;\&#800;&#600; K&#2664;&#62531; &#2089;\&#1280;&#800; H&#2661;&#64579; &#2089;\&#1024;&#768; <&#2665;&#62531;&#2120;a&#1280;&#800;H&#2662;&#64579; &#2089;\&#1024;&#768; F&#2666;&#62531; &#2089;\&#1280;&#800; F&#2663;&#64579; &#2089;\&#1024;&#768; H&#2667;&#62531;&#2120;a&#1280;&#800;F&#2664;&#64579; &#2089;\&#1024;&#768; K&#2668;&#62531; &#2089;\&#1280;&#800; <&#2665;&#64579; &#2089;\&#1152;&#864; <&#2669;&#62531;&#2120;a&#1280;&#800;<&#2666;&#64579; &#2089;\&#1152;&#864; F&#2670;&#62531; &#2089;\&#1280;&#768; K&#2667;&#64579; &#2089;\&#1152;&#864; H&#2671;&#62531;&#2120;a&#1280;&#768;K&#2668;&#64579; &#2089;\&#1152;&#864; K&#2672;&#64579; &#2089;\&#1280;&#768; H&#2669;&#64579; &#2089;\&#1280;&#720; <&#2672;&#62531;&#2120;a&#1280;&#768;H&#2670;&#64579; &#2089;\&#1280;&#768; <&#2283;C&#2120;a&#1280;&#768;F&#2671;&#64579; &#2089;\&#1280;&#768; F&#2633;&#62531;&#65026;&#2301;Z&#2243;b$&#2652;&#65091;&#65065;&#63352;&#2603;&#2620;&#65091;&#65065;&#63480;&#2656;&#65091;&#65065;&#63608;&#2658;&#65091;&#65065;&#63736;&#2660;&#65091;&#65065;&#20841;&#2662;&#65091;&#65065;&#31520;&#2664;&#65091;&#65065;&#21917;&#2666;&#65091;&#65065;&#64248;&#2668;&#65091;&#65065;&#64376;&#2670;&#65091;&#65065;&#64504;&#2672;&#65091;&#65065;&#64408;&#2668;&#63043;&#65065;&#28379;&#2664;&#63043;&#65065;&#36646;&#2660;&#63043;&#65065;&#63640;&#2656;&#63043;&#65065;&#63384;&#2652;&#63043;&#65065;&#62744;&#2643;&#63043;&#65065;&#62264;&#2635;&#63043;&#65065;&#62040;&#2143;C&#65040;&#2301;Z&#3016;c&#1024;&#256;&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2432;Z&#2589;&#64579;0&#2502;d&#2589;&#65091;&#65060;&#62968;&#3071;/ &#2694;&#62019;&#65057;&#63384;&#2142;&#63043;&#2584;&#64579;0&#2502;d&#2584;&#65091;&#65060;&#36646;&#3071;/ &#2136;&#26257;&#65057;&#63384;&#2142;&#63043;&#2583;&#64579;0&#2502;d&#2583;&#65091;&#65060;&#36646;&#2142;&#63043;&#65066;&#61928;&#2692;&#26257;&#2578;&#64579;0&#2502;d&#2578;&#65091;&#65060;&#24459;&#3071;/ &#2131;&#63043;&#65057;&#63384;&#2142;&#63043;&#2577;&#64579;0&#2502;d&#2577;&#65091;&#65060;&#24459;&#3071;/ &#2694;&#62019;&#65057;&#63384;&#2142;&#63043;&#2695;&#63555;&#2923;d&#2574;&#64579;2&#2514;e&#2432;Z&#2891;Q&#2432;Z&#2572;&#64579;a&#2301;Z&#2648;e@&#2697;&#62531;a&#2301;Z&#2648;e@&#2698;&#64579;&#65040;&#2301;Z&#2648;e&#1024;&#256;&#2322;4a&#2301;Z&#3070;h@&#2716;&#64579;&#65040;&#2301;Z&#3071;h&#1024;&#256;&#2718;&#62531;&#65026;&#2301;Z&#3071;h$&#2515;4a&#2301;Z&#3071;h@&#2571;&#64579;2&#2514;e&#2644;4&#2432;Z&#2259;Y&#2432;Z&#1600;i&#2112;&#63043;&#65066;&#64808; &#2304;Z&#2301;Z&#1373;i&#128; &#2569;&#65091;&#65064;&#62008;&#2567;&#65091;&#65064;&#61880;&#2566;&#63043;&#65032;&#26257;&#65057;&#61464;&#2112;&#65091;&#65057;&#61704;&#2116;&#26257;&#65057;&#61944;&#2120;&#63043;&#65057;&#62264;&#2125;&#63043;&#65057;&#62616;&#2130;&#65091;&#65057;&#62952;&#2136;&#62019;&#65057;&#63320;&#2141;&#65091;&#65057;&#63704;&#2147;&#65091;&#65057;&#38627;&#65057;&#24840;&#2160;&#63043;&#65057;&#64568;&#2167;&#65091;&#65057;&#65048;&#2175;&#26257;&#65058;&#61448;&#2183;&#65091;&#65058;&#61976;&#2270;&#62531;1&#2301;Z&#300;i&#2457;&#31806;&#63591;&#513;&#2176;&#61764;&#28670;

Exception: Access Violation

Last edited 2011


col(Posted 2011) [#6]
Errrr,
Something's definitely not right there!!!

And it works perfectly on my system everytime! I've tried so many to get this to replicate in many different orders of trying things, and it's just not having it, I cant reproduce what you have there.

Last edited 2011


BlitzProg(Posted 2011) [#7]
when executed with Framework&import the glitch go away. I'm going to look if there is a particular module causing this.

Using delay 1000 instead of WaitKey seems to produce some more garbage after the 1 second waiting

&#2385;&#61856;&#64341;&#2178;&#61960;&#2080;
&#2122;&#63588;&#38475;&#2594;&#38627;&#23138;&#2688;&#62018;&#62689;&#62036;&#2216;	&#2084;&#64229;&#62464;&#2122;&#2194;&#2185;&#2594;&#2602;&#2688;H&#2122;&#2304;H&#2216;"&#2602;&#2132;&#2720;B&#2116;&#2602;&#2116;&#2720;B&#2216;"&#2216;"&#2720;B&#2560;&#512;@ @&#512;&#2560;&#384;&#1024;&#2112;&#2816;H&#2688;j&#30528;&#2730;&#64234;&#30528;&#2730;&#64234;&#30528;&#2730;&#64234;&#30528;&#2730;&#64234;&#30528;&#2730;&#64234;&#30528;&#2730;&#64234;&#30528;&#2730;&#64234;&#30528;&#2730;&#64234;&#30528;&#2218;&#2570;&#2730;&#63594;&#30528;&#2730;&#64234;&#30528;&#2730;&#38911;&#2633;h&#62052; &#2178;&#2560;PI&#513;&#412;&#264;4&#399;&#264;&#2279;&#64612;&#65511;4&#446;&#264;&#2172;&#64039;&#63311;&#2172;&#64551;&#63311;&#2182;&#65319;&#63311;&#2182;&#63143;&#63311;&#2183;&#64295;&#63311;&#2172;&#65063;&#63311;&#2185;&#63655;&#63311;&#2173;&#65255;&#63311;&#2174;&#62183;&#63311;&#2173;&#62631;&#63311;&#2173;&#63591;&#63311;&#465;&#264;&#2212;&#64295;&#62439;4
&#448;&#266;44&#2122;&#62531;BBDX7Device Window Class
&#458;&#264;4 &#509;&#264;&#2146;&#63555;&#2721;&#3071;/  &#482;&#264;&#2207;4&#2205;4&#2722;&#3071;/ &#494;&#268;&#2723;&#3071;/ &#276;&#268;&#2723;&#3071;/ 
&#282;&#264;&#2453;&#64742;&#62574;&#2441;j&#2207;4&#279;&#2934;&#63556;&#2176;&#64836;&#63047;&#64964;&#2130;&#64579;&#2489;dQ
&#260;&#264;&#3057;&#65348;&#63143;&#62200;&#283;&#282;&#2507;&#65092;&#2140;&#65091;&#708;&#282;&#2507;&#65092;&#1836;&#282;&#2507;&#65092;&#3057;&#65348;&#63143;&#62200;&#283;&#2087;&#31840;&#63207;&#62200;&#283;&#2141;&#62019;&#3057;&#65348;&#63143;&#62200;&#283;&#2093;D&#63207;&#62200;&#283;&#2098;&#63300;&#63207;&#62200;&#283;&#2103;&#65092;&#63207;&#62200;&#283;&#2109;&#62788;&#63207;&#62200;&#283;&#2114;&#64580;&#63207;&#62200;&#283;&#2120;&#62276;&#63207;&#62200;&#283;&#3057;&#65348;&#63143;&#62200;&#283;&#3057;&#65348;&#63143;&#62200;&#283;&#2250;&#62020;&#63207;&#62200;&#283;&#2277;&#64836;&#63207;&#62200;&#283;&#2451;&#26757;&#63207;&#62200;&#283;&#2812;&#26757;&#63207;&#62200;&#283;&#2889;&#62276;&#63207;&#62200;&#283;&#2926;&#31840;&#63207;&#62200;&#283;&#2157;&#65348;&#63271;&#62200;&#283;&#2199;&#1508;&#1468;&#63271;&#62200;&#283;&#2458;&#63300;&#63271;&#62200;&#283;&#3057;&#65348;&#63143;&#62200;&#283;&#3057;&#65348;&#63143;&#62200;&#283;&#3057;&#65348;&#63143;&#62200;&#283;&#3057;&#65348;&#63143;&#62200;&#283;&#3057;&#65348;&#63143;&#62200;&#283;&#2468;&#62532;&#63271;&#62200;&#283;&#2486;&#63556;&#63271;&#62200;&#283;&#2502;&#63300;&#63271;&#62200;&#283;Q&#375;&#268;&#2510;&#63556;&#63237;4&#377;&#268;&#2513;&#62020;&#63237;4&#379;&#264;b
&#264;&#2453;&#64742;&#62574;&#2441;j&#2207;4&#279;&#2277;&#63556;&#2176;&#64836;&#63047;&#62276;
&#2142;&#65091;&#2489;d
&#359;&#268;&#2314;&#63300;&#63136;&#21570;&#279;&#2316;&#63044;&#63136;&#21570;&#279;&#2321;&#64836;&#63136;&#21570;&#279;&#2327;&#62532;&#63136;&#21570;&#279;&#2332;&#1508;&#1468;&#63136;&#21570;&#279;&#2338;&#62020;&#63136;&#21570;&#279;&#2343;&#31840;&#63136;&#21570;&#279;&#2349;D&#63136;&#21570;&#279;&#2354;&#63300;&#63136;&#21570;&#279;&#2359;&#65092;&#63136;&#21570;&#279;&#2365;&#62788;&#63136;&#21570;&#279;&#386;&#264;&#2129;&#63555;&#2141;&#26257;&#394;&#264;&#2772;&#63271;&#62356;4&#445;&#264;&#2229;&#3071;/ &#2110;
&#417;&#266;&#2150;&#62019;BBDX9Device Window Class
&#427;&#268;&#2151;&#63043;&#65126;&#64609;&#2469;&#61799;&#62579;&#2489;&#63654;&#62819;&#2493;&#62374;&#62820;ly &#465;&#264;&#2152;&#62019;test_deleteme &#470;&#264;4&#457;&#264;4&#504;&#264;4&#491;&#264;&#2803;&#64615;&#63390;4&#282;&#264;&#2125;&#63527;&#63172;&#2125;&#64615;&#63172;&#2130;&#63655;&#63172;&#2126;&#63172;&#2127;&#65063;&#63172;&#2126;&#62759;&#63172;&#269;&#264;&#2145;&#63527;&#63166;&#1176;4&#316;&#264;&#464;&#3071;/ &#3036;&#62567;&#63426;&#302;&#264;&#2105;&#3071;/ &#3036;&#62567;&#63426;&#320;&#264;&#752;4&#371;&#264;&#616;4&#354;&#264;&#2230;&#3071;/ &#2110;&#358;&#264;&#448;4&#448;4&#2175;C&#2576;&#65091;&#2112;DF4&#408;4

you can see test_deleteme on the last line if you look a bit. Looks like it's dumping memory from the source code created. How strange.

More info:

if you successfully enter into debugmode it won't crash if you continue the execution^.

you can enter debugmode before local a$ receive its value
you can enter debugmode before local b$ receive its value
you will get EXCEPTION ACCESS VIOLATION if you use start using debugstop anywhere after local b$

Renaming variable to x$ and y$ doesn't change anything

Following those discoveries, i've made a duplicate of the function readstringdat so i can use debug in only one of those.

Local a$=readstringdat(in,4)
Local b$=readstringdat2(in,4)


Function readstringdat2:String(stream:TStream,l:Byte)
	
	DebugStop
	
	Local array:Byte[l]
	
	'DebugStop
	
	Local i
	For i=0 To l-1
		array[i]=ReadByte(stream)
	Next
	Local result:String=""
	For i=0 To l-1
		If array[i]=0 Then Return result Else result=result+Chr(array[i])
	Next
	Return result
End Function


Won't crash, but

Function readstringdat2:String(stream:TStream,l:Byte)
	
	'DebugStop
	
	Local array:Byte[l]
	
	DebugStop
	
	Local i
	For i=0 To l-1
		array[i]=ReadByte(stream)
	Next
	Local result:String=""
	For i=0 To l-1
		If array[i]=0 Then Return result Else result=result+Chr(array[i])
	Next
	Return result
End Function

WILL crash.

Very curious...

Last edited 2011


col(Posted 2011) [#8]
As a long shot in the dark, have you tried turning off Garbage Collection while the second thread is being used ?

GCSuspend()
GCResume()

GCSuspend()

Local thread:TThread=CreateThread(Ta.GLITCH,Null)
WaitThread( thread )

GCResume()
End



BlitzProg(Posted 2011) [#9]
I tried but it did the same thing.

I have used some process hacking to check the integer value while it's being incremented, the problem don't seem to comme from here though, it goes without problem from 0 to where it crash (11)

Beside, i tried starting from I=11 and... it crashed at i=22.

It seems to fail to access the value properly, this is very weird. O_o

value of i is
11
value of i is 11
*
value of i is
12
value of i is 12
*
value of i is
13
value of i is 13
*
value of i is
14
value of i is 14
*
value of i is
15
value of i is 15
*
value of i is
16
value of i is 16
*
value of i is
17
value of i is 17
*
value of i is
1&#498;
value of i is 18
*
value of i is
1&#498;
value of i is 19
*
value of i is
2&#498;
value of i is 20
*
value of i is
2&#498;
value of i is 21
*
value of i is
&#3067;&#63047;&#64741; etc... with exception access violation


BlitzProg(Posted 2011) [#10]
Screenie of excecution (just in case)




Brucey(Posted 2011) [#11]
Works fine here too.

Always a good idea to use Strict/SuperStrict and Framework anyway...


col(Posted 2011) [#12]
Still works perfect every time here.

Another long shot as it seems specific to your machine... 'rebuild all modules'? in both 'Threaded' and 'Non-Threaded'.

I'm not expecting that to work though, but you never know.

Some other things to try ( though not too constructive, but might help pinning this one down )...

Use 'Superstrict',
Close the file before the loop,
Close the file before 'DebugStop',
Create a mutex for the file if you are keeping the file open, so as to 'lock' it.
Create a mutex for the loop variable.

Just shots in the dark as it seems ok here every time.


BlitzProg(Posted 2011) [#13]
Remember that I already have found many way of fixing the problem. What i'm wanting to know is WHY it's happening :P

As in, for example, why
Global a:Ta[2112]
will crash on my computer and why
Global a:Ta[2113]
will make it run fine, as if there was no bug at all. (you'd expect the opposite, usually, using more memory is supposed to make things worse. lol)

Edit: Global a:Ta[2001] to Global a:Ta[2112] seems to be the glitch range since anything 2000 or below is also working. very strange

Last edited 2011


col(Posted 2011) [#14]
Sounds like some kind of overflow and you're just taking care of the 'overflow' with making the array bigger?

EDIT :- After reading your edit, I'm lost with this one :p


Remember that I already have found many way of fixing the problem. What i'm wanting to know is WHY it's happening :P



Good luck :P

:D

Last edited 2011


BlitzProg(Posted 2011) [#15]
Just as I said changing the size of most arrays can delete the problem off, but I don't know why. I could also not use the 2nd call to readstringdat to make it work nicely. the behaviour of that 'i' variable also changes depending on how and what I choose to use it with. Print "value of i is "+i and Print "value of i is"+i will lead to two completly different crashes, the last one being completly unable to be processed without a crash. In my library, it is used this way
result.list:+[TGamefile.readgamefile(in,i)]
and is simply unable to access the i variable, resulting in crash.

Or I could give up on the threaded mode and replace this
Local thread:TThread=CreateThread(Ta.GLITCH,Null)
by this...
Ta.GLITCH()
It won't crash at all.

Or I could give up on the Debug Mode and untick Debug Build in Program>Build options. The glitch will no longer occur either.


But this is quite an evasive way of fixing the problem, who know, I might just end up with something compatible for me but not for others?