Nope, no critical sections...and the error number is correct. I've also searched the internet and could'nt find it.

Some of my code:

[pascal]
//This is the player class
TPlayer = class(TImageSprite)
private
Fired: Integer; //This variable determines how many bullets have been fired, you can only fire 5 bullets a second.
public
procedure DoMove(MoveCount: Integer); override;
end;

//This is the Bomb class
TBomb = class(TImageSprite)
public
procedure DoMove(MoveCount: Integer); override;
procedure DoCollision(Sprite: TSprite; var Done: Boolean);override;
end;

function TForm1.NewPlayer;
begin
Player_No := Player_No + 1;
with TPlayer.Create(DXSpriteEngine1.Engine) do
begin
Player.Image := Form1.DXImageList1.Items.Find('Player');
Player.X := 500;
Player.Y := 710;
Player.Width := Player.Image.Width;
Player.Height := Player.Image.Height;
Result := True;
Lives:= Lives -1;
end;
end;

procedure TForm1.GameEnd;
begin
If Player_No >2 then
with DXDraw1.Surface.Canvas do
begin
DXTimer1.Enabled := False;
Timer1.Enabled := False;
DXWaveList1.Items.Find('Tada').Play(False);
Font.Size := 26;
Font.Color := clYellow;
DXDraw1.Surface.Fill(0);
TextOut(290,220,'GAME OVER,YOU LOST ');
TextOut(290,270,'PRESS ESCAPE KEY AND TRY AGAIN');
end;
end;

procedure TPlayer.DoMove(MoveCount: Integer);
var
MyX: Double;
MyY : Double;
begin
If moveLeft and
(x>5) then
X := X - 10;

If moveright and
((X+Form1.DXImageList1.Items.Find('Player').Width) <Form1>5) then
Y := Y - 10;

if Movedown and
(y<form1.DXDraw1.Height-65)then
Y:= Y + 10;

MyX := X;
MyY := y;

//Check whether button1 is pressed (SPACEBAR)
If isButton1 in Form1.DXInput1.States Then
begin
if Fired <= 3 then
begin
Inc(Fired);
with TBullet.Create(Form1.DXSpriteEngine1.Engine) do
begin
Image := Form1.DXImageList1.Items.Find('Bullet');
Form1.DXWaveList1.Items.Find('Fire').Play(False);
X := MyX + 30; //Set it's X pos to our current X pos
Y := MyY; //Set it's Y pos to our current Y pos
Width := Image.Width; //Set it's size
Height := Image.Height;
end;
end;
end;
end;


procedure TBomb.DoMove(MoveCount: integer);
begin

Y := Y + 25;
Collision;
if (Y >= Form1.DXDraw1.Height +20) Then
Dead;
end;


procedure TBomb.DoCollision(Sprite: TSprite; var Done: Boolean);
begin
If (Sprite is TPlayer) Then
begin
Sprite.Collisioned := False;
Sprite.Dead; //Kill the Sprite
Form1.DXWaveList1.Items.Find('hit').Play(False);
Player.Dead;
Done := False;
end;
end;


Called in DXTimer:
if (player.Deaded) and (Player_No <= 2) then
NewPlayer;
GameEnd;
[/pascal]

I suspect that it might have to do with the bomb collision, the freeze happens when the bomb hits my player...funny thing is that it works as it should some times and not other times.

EDITED - to include pascal BB tag.