-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WM5 Crash when I cut shape feature times #139
Comments
Which version of MWGis are you using? |
MapWindow v5.6.3 with MapWinGIS v5.2.4 |
OK. So you are using MW5 to cut the shapefile. |
The shape file type I used is a polyline. and I tried a lot of times in different shapes, and different shape files. |
When I Add This line to ignore VT_BSTR. No crash happen. Perhaps this related with BSTR type. |
Hello @ningfc, and thank you for the detail you have provided. I don't think there is anything wrong with the code here. Instead, I think this may related to another issue that I just recently resolved. If you consider this issue in the MapWinGIS Discourse, you will see that the current release is not properly handling Shapefiles that use the UTF-8 encoding. This could account for intermittent errors when trying to clear a BSTR variant, since it may not know the correct length, and is therefore trying to release memory that it doesn't own. I have not yet submitted my code changes because, although I have now accounted for UTF-8 encoding, I have not yet accounted for Shapefiles that have other encodings. Even so, I could perhaps submit my changes so that, if you are willing, you could get my changes, rebuild the OCX, and see if the error still occurs. Would you be willing to do that? Thank you, and Regards, |
Yes I will,It's my pleasure for test your new changes. |
Hello again. Code has been checked in to the 'develop' branch to (hopefully) handle issues related to Shapefiles that use the UTF-8 encoding as specified in the Code Page file (.CPG). It will be interesting to know if this resolves your problem as well. Thank you, and Kind Regards, |
I tested your Code, It works fine, saving Shapefile that use the UTF-8 encoding is OK. Thank you for your patience and help! |
I try to cut shapes multiple times, and crash happend. I'm try to debugging and found the position in MapWinGIS component TableRow::~TableRow(), app crashed with call function VariantClear. But the crash not happened when run MapWinGIS deom application (MapWindowLite.exe) and do the same thing.
And crash no happened when I comments function VariantClear in TableRow::~TableRow().
And follow is last few lines of debug output window.
线程 0x1898 已退出,返回值为 0 (0x0)。
OCX: MAP PROJECTION SET: +proj=longlat +datum=WGS84 +no_defs
0x7546EA32 处(位于 MapWindow.exe 中)引发的异常: Microsoft C++ 异常: EEFileLoadException,位于内存位置 0x0059C0B4 处。
0x7546EA32 处(位于 MapWindow.exe 中)引发的异常: Microsoft C++ 异常: [rethrow],位于内存位置 0x00000000 处。
0x7546EA32 处(位于 MapWindow.exe 中)引发的异常: Microsoft C++ 异常: [rethrow],位于内存位置 0x00000000 处。
0x7546EA32 (KernelBase.dll)处(位于 MapWindow.exe 中)引发的异常: 0xE0434352 (参数: 0x80070002, 0x00000000, 0x00000000, 0x00000000, 0x73400000)。
Critical error detected c0000374
MapWindow.exe 已触发了一个断点。
The text was updated successfully, but these errors were encountered: