<html><head></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div dir="ltr" data-setdir="false">I<div>Hello,<br><br>I'm having a problem with the OS/2 version of the compiler.<br><br>This simplified version of my program keeps generating an exception<br>when compiled and run in EComStation 1.2, OS/2 versions 4.5 and 4 <br>but runs fine when compiled for Windows. <br><br>Program Test1( Input, Output );<br><br>{$S+}<br><br> Const<br> StackSize = 1000000;<br> <br> Max_Array = 5000;<br><br> Type<br> Data_Array = packed array[ 0 .. Max_Array ] of LongInt;<br><br> Function MyThread( P: Pointer ): PtrInt;<br> Var<br> Data: Data_Array;<br> Indexer: LongInt;<br> Begin<br> MyThread := 0;<br> For Indexer := 1 to Max_Array do<br> Data[ Indexer ] := 0;<br> End; <br> <br> Var<br> Handle: LongWord;<br> My_Result: LongInt;<br> Begin<br> WriteLn( 'Test1 starting' );<br> My_Result := BeginThread( @MyThread, Nil, Handle, StackSize );<br><br> My_Result := WaitForThreadTerminate( Handle, 0 );<br> WriteLn( 'Test1 finished' );<br> End.<br><br>The error generated is...<br><br>SYS1808:<br>The process has stopped. The sofware diagnostic <br>code (exception code) is 0005.<br><br>the command I used to compile it is:<br><br>fpc Test1.pas -Se -gl<br><br>This exception appears to be generated before my thread gets control,<br>so I can't install my own exception handlers to intercept it.<br><br>Any help would be appreciated.<br>Thanks,<br>Paul.</div><div><br></div></div></div></body></html>