Opened 3 years ago

Closed 3 years ago

#12731 closed defect (fixed)

AGS: Crash when starting Trilby's Note

Reported by: criezy Owned by: dreammaster
Priority: normal Component: Engine: AGS
Version: Keywords:
Cc: Game:


When starting Trilby's Note I get the following error:

Assertion failed: (format.bytesPerPixel == 2 || format.bytesPerPixel == 4 || (format.bytesPerPixel == 1 && srcBitmap->format.bytesPerPixel == 1)), function draw, file engines/ags/lib/allegro/surface.cpp, line 116.

In the debugger I can see that the source pixel format is 4bpp and the destination is 1bpp. This seems strange as I would expect the source to be 1bpp as well.

This is a regression as the game used to work.

Change History (2)

comment:1 by criezy, 3 years ago

I was afraid the regression was from the big source code update from upstream. But fortunately it seems to be more recent.
A git bisect blames the following commit:

commit f5a019d3b4b82e5ebd3113020287e5f3d4a21005 (HEAD, refs/bisect/bad)
Author: Paul Gilbert <>
Date:   Sat Jul 10 18:05:25 2021 -0700

    AGS: corrected GetDisplayDepthForNativeDepth
    From upstream 4c51ca2045b478b63f5e6b35be02fdce3ebf9b18

comment:2 by dreammaster, 3 years ago

Owner: set to dreammaster
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.