Hi,
I use c++ coreApi sdk. I implement add Stamp annotation to pdf and after start closing my application problem with memory begin (crash and create hs-* error file) .
I use like code for create new stamp annotation (it is not full but this part is enough for reproduce problem):
PXC::ULONG_T nAtom;
hr = g_COS->StrToAtom(L"Stamp", &nAtom);
PXC::PXC_Rect rcAnnotRect;
setRecAnnot(rcAnnotRect, x, y, w, h, W, H, rot);
CComPtr<PXC::IPXC_Annotation> annot;
hr = pPage->InsertNewAnnot(nAtom, &rcAnnotRect, -1, &annot);
If this part is used my application generate file hs_err_pid*.log. I investigated problem and found that this code is used FinalizeSDK() (from your examples) throw exeption. If name of annotation is changed to "FreeText" for example (hr = g_COS->StrToAtom(L"FreeText", &nAtom); ) FinalizeSDK() do not throw exeption.
p.s. hs_err_pid*.log has not any good info about problem.
Thanks,
Evgeny.
memory problem with Stamp annotation
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
Re: memory problem with Stamp annotation
Hello aleksand,
Can you please prepare a small console project to illustrate this behavior?
You can use this project for quick start:
https://github.com/tracker-software/PDF ... eAPISample
Cheers,
Alex
Can you please prepare a small console project to illustrate this behavior?
You can use this project for quick start:
https://github.com/tracker-software/PDF ... eAPISample
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 11
- Joined: Tue Apr 24, 2018 6:55 am
Re: memory problem with Stamp annotation
Hi Alex,
Sorry for long answer. I tried to reproduce on your examples (console and mfs), but can not. I investigate more and I hope that I found the problem. I use CoreApi from java like dynamic dlls. The problem is exist only if I do not call finalizaSDK before DllProcessDetach (or call finalizaSDK from DllProcessDetach). It was just a surprise for me that this problem only exists if an attempt is made to add a stamp annotation (other annotations no crash even in case call finalizaSDK in DllProcessDetach).
p.s. I am not sure that it is the bug, because description from Microsoft wrote that use free library in DllProcessDetach is dangerous.
Cheers,
Evgeny.
Sorry for long answer. I tried to reproduce on your examples (console and mfs), but can not. I investigate more and I hope that I found the problem. I use CoreApi from java like dynamic dlls. The problem is exist only if I do not call finalizaSDK before DllProcessDetach (or call finalizaSDK from DllProcessDetach). It was just a surprise for me that this problem only exists if an attempt is made to add a stamp annotation (other annotations no crash even in case call finalizaSDK in DllProcessDetach).
p.s. I am not sure that it is the bug, because description from Microsoft wrote that use free library in DllProcessDetach is dangerous.
Cheers,
Evgeny.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
memory problem with Stamp annotation
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ