Error: GetFrontBufferData failed

Started by Radiant, Tue 14/01/2014 01:05:25

Previous topic - Next topic

Radiant

A player of HQ reports getting the following error when trying to start the game,

"An internal error has occured. Please note down the following information. If the problem persists, post the details on the AGS Technical Forum. (ACI version 3.3.0.1148)
Error: GetFrontBufferData failed"

What does that mean though?

Khris

This error seems to be Direct3D related.
They should probably update their graphics driver (or try the DirectDraw driver instead).

Alan v.Drake

GetFrontBufferData is used by the D3D driver for getting the whole screen bitmap to later cut away the needed piece, it is usually used by AGS by anything that involves taking snapshots of the screen.

GetFrontBufferData is also very slow and the worst tool for the task! I've implemented a faster alternative way in the draconian edition, but it should be tested more thoroughly to make sure there aren't any unwanted side effects.

The culprit is:
ali3dd3d.cpp @ void D3DGraphicsDriver::GetCopyOfScreenIntoBitmap(Bitmap *destination)

The fix is not complicated so if you wish I could compile a modified version of acwin for testing purposes, just let me know which AGS version to build.


- Alan

Radiant

Quote from: Alan v.Drake on Sun 09/02/2014 13:31:24it is usually used by AGS by anything that involves taking snapshots of the screen.

Such as creating the .999 saved game for restarting, while having screenshots in saved games enabled?

Alan v.Drake

Quote from: Radiant on Sun 09/02/2014 18:42:34
Quote from: Alan v.Drake on Sun 09/02/2014 13:31:24it is usually used by AGS by anything that involves taking snapshots of the screen.

Such as creating the .999 saved game for restarting, while having screenshots in saved games enabled?

Most likely.

- Alan

Crimson Wizard

Quote from: Alan v.Drake on Sun 09/02/2014 13:31:24
The fix is not complicated so if you wish I could compile a modified version of acwin for testing purposes, just let me know which AGS version to build.
You can also put it into "develop-3.3.1" branch we have now.

Alan v.Drake

Quote from: Crimson Wizard on Mon 10/02/2014 18:01:35
You can also put it into "develop-3.3.1" branch we have now.

I can't commit the changes because I know it produces bad images when the bitdepth is different from 32.
Here's a .patch instead: http://pastebin.com/emStwpKG

If you can fix the bitdepth issue it should be good to go. (I didn't fix it myself because there's too much D3D mumbo jumbo going on there, it's already a miracle I managed to get this to work!)

- Alan

SMF spam blocked by CleanTalk