Hello, I encountered a similar issue as well. By adding the argument is_trivial_abi=false in the --args parameter in GN, I was able to resolve it.
(I also try add -O0 in extra_cflags_cc, but it does not work for me.)
gn gen out/Shared --args='is_trivial_abi=false ......'
The root cause of the problem was related to optimization. it in in include/core/SkSurface.h
inline sk_sp<SkSurface> Raster(const SkImageInfo& imageInfo,
const SkSurfaceProps* props = nullptr) {
return Raster(imageInfo, 0, props);
}
Use gdb, by inspecting the parameter addresses, I identified an offset 8. U can input: print imageInfo -> step -> print info, the imageInfo and info address is diffrent, they should be same.
(gdb) print imageInfo
$1 = (const SkImageInfo &) @0x7fffffffd0d0: {fColorInfo = {fColorSpace = {fPtr = 0x0}, fColorType = kBGRA_8888_SkColorType, fAlphaType = kPremul_SkAlphaType}, fDimensions = {fWidth = 800, fHeight = 563}}
[Thread 0x7fffdbfff6c0 (LWP 136331) exited]
(gdb) step
SkSurfaces::Raster (info=..., rowBytes=0, props=0x0) at ../../src/image/SkSurface_Raster.cpp:187
187 if (!SkSurfaceValidateRasterInfo(info)) {
(gdb) print info
$2 = (const SkImageInfo &) @0x7fffffffd0c8: {fColorInfo = {fColorSpace = {fPtr = 0x7ffff7be0562}, fColorType = kUnknown_SkColorType, fAlphaType = kUnknown_SkAlphaType}, fDimensions = {fWidth = 6, fHeight = 2}}