MicroTeX icon indicating copy to clipboard operation
MicroTeX copied to clipboard

静态变量析构崩溃

Open blackStar1314 opened this issue 1 year ago • 0 comments

现象: image 堆栈信息: image

原因: 该静态变量析构顺序在GdiplusShutdown(gdiplusToken)之后,导致Gdiplus::FontFamily()析构异常。

问题源码:https://github.com/NanoMichael/MicroTeX/blob/086f4eb740270b28bd0c61a0a359aea9300d61ae/platform/gdi_win/graphic_win32.cpp#L24

可行的一种解决思路: PlatformFactory_gdi 析构中管理这个对象的析构,保证在GdiplusShutdown(gdiplusToken)之前析构Gdiplus::FontFamily()

blackStar1314 avatar Nov 12 '24 03:11 blackStar1314