Sep 23, 2015 at 5:56 PM

I'm using the http client on a large project. When I create a uri and instantiate my client everything goes well, but when through the debugger I leave the method in which I create the web::uri, my program crashes (Even if the only thing I do is to create the uri). If I don't create the uri, the method exits successfully.

I have several preprocessor directives in my project, so I wonder if any of those might be interfering with the string types the library uses maybe?

If I use the code below, I get an access violation
web::uri uri(U("https://myserver.net"));
If instead of a hardcoded path I pass a wchar_t*, I get an error like the following:
Debug Assertion Failed!
Expression" _BLOCK_TYPE_IS_VALID(pHead-> nBlockUse)
And these are the preprocessor directives in my project
Any clues of what is going on here and how I can workaround this?

Sep 24, 2015 at 7:45 PM
This looks similar to your previous failure: you're using _ITERATOR_DEBUG_LEVEL=0 here in debug mode (we use the default values for our NuGet package). You'll need to remove that for debug mode to work. Alternatively, you can compile the SDK yourself using the same preprocessor defines as your main project.

If the iterator debug level isn't the issue, I can't think of anything besides binary search :/. But it does sound like an ABI issue, so it's most likely amongst these or some other compiler settings you have.
Sep 29, 2015 at 7:29 PM
Thanks! The error was happening even without the _ITERATOR+DEBUG_LEVEL definition. However, it was a problem in memory management on my side. Thanks roschuma!