Menu

#9 Access violation when starting TS 2.41 on XP

open-fixed
nobody
None
3
2005-02-09
2003-05-05
Anonymous
No

In the procedure TMainForm.FormCreate, the call to
SetEditorMode (mTile) causes a TMainForm.FormResize
when the ScrollBox.Align is set to alClient. The
FormResize calls UpdateBmp (TRUE) which accesses the
Bmp before it has been created causing AV.

Calltree:
> [procedure FormCreate]
> SetEditorMode (mTile);

>> [procedure SetEditorMode]
>> ScrollBox.Align = alClient;

>>> [procedure FormResize]
>>> UpdateBmp (TRUE);

>>>> [procedure UpdateBmp]
>>>> Canvas.CopyRect (Rect (0, 0, W, H), Bmp.Canvas,
MakeRect (BORDER_W, BORDER_H, W, H));

***Access Violation***

Because Bmp is nil. One solution is to call
SetEditorMode (mTile) later. eg. after
CreateNewTileCollection().

Discussion

  • Mike Wiering

    Mike Wiering - 2004-02-21

    Logged In: YES
    user_id=258029

    I haven't been able to reproduce this AV (I'm also running
    XP), but I'm moving the call to where you suggested.

     
  • Mike Wiering

    Mike Wiering - 2005-02-09
    • priority: 5 --> 3
    • status: open --> open-fixed
     

Log in to post a comment.