[fpc-pascal] Runtime Error 216
Peter Vreman
peter at freepascal.org
Mon Jan 3 20:19:01 CET 2005
At 19:36 3-1-2005, you wrote:
>hi,
>
>after installing the new 1.9.6 release i tried to recompile and run my sdl
>programs. compilation runs fine ( but i had to restruct the majority of my
>for-loops, not beeing allowed to modify the counter variable ;\ ), but
>when i run my programs they all crashed beacuse of an access violation.
>this snippet is causing the crash. i'm not sure if it is my fault.
>
>thanks in advance
>bartek
>
>program bug3;
>type
> PSDL_Surface = ^TSDL_Surface;
> TSDL_Surface = record
> offset: Integer;
> end;
>var
> screen :psdl_surface;
>
>function SDL_MustLock(Surface: pSDL_Surface): Boolean;
>begin
> Result := ( surface^.offset <> 0 );
>end;
>
>begin
>getmem(screen,sizeof(tsdl_surface));
>sdl_mustlock(screen);
>freemem(screen)
>end.
It runs fine here.
Try the commandline compiler without optimizer
Peter
More information about the fpc-pascal
mailing list