GdiPlus ValidateBitmapInfo crash

Marcio
1
Reputation point
I was assigned to review a crash that affect a few users sporadically. Program is written in C++ (no clr). The call stack of the crash is:
GdiPlus!ValidateBitmapInfo
GdiPlus!CopyOnWriteBitmap::CopyOnWriteBitmap
GdiPlus!CopyOnWriteBitmap::Create
GdiPlus!GpBitmap::GpBitmap
GdiPlus!GdipCreateBitmapFromGdiDib
MyApp!Gdiplus::Bitmap::{ctor}
The crash seems to be random, environmental, and complex (impossible) to reproduce user steps.
Could this crash be caused by memory fault?
I can see some debug data from the DUMP file. BitmapInfoHeader seems to be correct:
{
biSize=40
biWidth=1224
biHeight=1584
biPlanes=1
biBitCount=8
biCompression=0
biSizeImage=1938816
biXPelsPerMeter=5669
biYPelsPerMeter=5669
biClrUsed=0
biClrImportant=0
}
Pointer with data was copied and allocated in a std::vector prior to building the GdiPlus::Bitmap.
This is what comes from Visual Studio opening the miniDump file:
Unhandled exception at 0x73EF12D3 (GdiPlus.dll) in file.dmp: 0xC0000005: Access violation reading location 0x06101002.
Please, any help is welcome!
Best regards
Márcio