• Order of the Butterfly
    Order of the Butterfly
    ChrisH
    Posts: 167 from 2009/11/26
    I have found that if I load pictures of <=256 colours via datatypes, then I get a crash when I dispose of the datatype object.

    The same code works fine on AROS & OS4, and also for 24-bit pictures on MorphOS! The only way I've found is to stop the crashing is to either use PDTA_DESTMODE,PMODE_V42 or to not provide PDTA_SCREEN.

    Can anyone suggest what I might be doing wrong? As far as I can tell, I am not accessing the internals of the bitmap (which V43 disallows).

    Here is the offending E code:
    Code:
    datatypeObject := NewDTObjectA(file, [DTA_GROUPID,GID_PICTURE, PDTA_DESTMODE,PMODE_V43, PDTA_SCREEN,window.wscreen, PDTA_USEFRIENDBITMAP,useFriendBitmap, TAG_END]:tagitem)

    GetDTAttrsA(datatypeObject, [PDTA_BITMAPHEADER,ADDRESSOF bitmapheader, TAG_END]:tagitem)

    DoDTMethodA(datatypeObject, NIL, NIL, [DTM_PROCLAYOUT, NIL, TRUE]:gplayout)

    GetDTAttrsA(datatypeObject, [PDTA_DESTBITMAP,ADDRESSOF bitmap, TAG_END]:tagitem)

    and
    Code:
    WaitBlit()
    DisposeDTObject(datatypeObject)


    [ Edited by ChrisH 20.10.2011 - 17:43 ]
    Author of the PortablE programming language.
    It is pitch black. You are likely to be eaten by a grue...
  • »08.10.11 - 13:53
    Profile Visit Website