Closed LouisClt closed 4 months ago
Hi, thanks for taking the time to write these out. I'll try to go in order:
CPPTRACE_STATIC_DEFINE
is mentioned in the README, however perhaps not prominently enough. It's hard to figure out where to place it where people will actually see it.SymInitialize
must be called only once so if other components are calling it that's a problem. Unfortunately I don't know of a way to detect that it has already been called, other than maybe adding a method to cpptrace to let the user indicate it's already been done. Cpptrace's invocation of SymInitialize
does use a lock in case of multithreading, however it's not possible to protect against non-cpptrace codepaths as far as I know.Oh, and SymRefreshModuleList
I'm not familiar with. What benefit does it bring?
What issue with format<> did you find? I'm not able to reproduce anything right off hand.
Hi, thanks for your answers.
1- Here is the error I got (but, again, it seems to be fixed on the main branch) :
cl : Command line warning D9025 : overriding '/W3' with '/W4'
\cpptrace\src\v0.5.2-dcbc54c7ef.clean\src\utils\microfmt.hpp(316): error C2664: 'std::string microfmt::detail::format<0>(const char *,const char *,std::array<microfmt::detail::format_value,0>)': cannot convert argument 3 from 'initializer list' to 'std::array<microfmt::detail::format_value,0>'
\vcpkg-master\buildtrees\cpptrace\src\v0.5.2-dcbc54c7ef.clean\src\utils\microfmt.hpp(316): note: Invalid aggregate initialization
\vcpkg-master\buildtrees\cpptrace\src\v0.5.2-dcbc54c7ef.clean\src\utils\microfmt.hpp(215): note: see declaration of 'microfmt::detail::format'
\vcpkg-master\buildtrees\cpptrace\src\v0.5.2-dcbc54c7ef.clean\src\utils\error.hpp(25): note: see reference to function template instantiation 'std::string microfmt::format<>(const char *)' being compiled
\vcpkg-master\buildtrees\cpptrace\src\v0.5.2-dcbc54c7ef.clean\src\unwind\../utils/utils.hpp(455): note: see reference to function template instantiation 'cpptrace::detail::internal_error::internal_error<>(const char *)' being compiled
2- Indeed, now that you say it, I am able to find CPPTRACE_STATIC_DEFINE in the ReadMe. But it is true I did not see this before.
3- I understand the problem with SymInitialize, I do not know a method to know if it has already been called either. As for SymRefreshModuleList , it allows to refresh the list of modules. If you call SymInitialize and then load a dll dynamically (with AfxLoadLibrary for instance) it will not be symbolized before you call SymRefreshModuleList . But it is maybe a bit out of the scope of your tool.
4- Glad to know it is already fixed.
Thanks for confirming! I've added additional notes about CPPTRACE_STATIC_DEFINE
to the readme to help prevent them from being missed and v0.5.3 fixing the other issues is now released and available through package managers. I'll go ahead and close this for now, please let me know if there's anything else you run into!
Thanks !
Hello, first of all thanks for your library, which is really useful.
I tried using it on windows and I found different problems (I gather them here because, it is mainly minor bypassable problems, sorry for this) :
I managed to bypass this issue by setting CPPTRACE_STATIC_DEFINE before including CPPTrace. Maybe it will be good to document this