Curl Exception

Jack via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun May 11 19:36:44 PDT 2014


On Sunday, 11 May 2014 at 16:17:20 UTC, Nick Sabalausky wrote:
>
> Sorry, I haven't really used the curl stuff yet, so I can't be 
> a bigger help, but a couple notes below:
>

It's alright. I'm actually up for any information right now.


> Access Violation, despite its wording, isn't usually about user 
> permissions. It's the Windows version of a segfault. Usually 
> means a null pointer was dereferenced, or a freed pointer was 
> used, or an otherwise bad pointer or buffer overflow, etc. If 
> you're really unlucky those can be a result of memory 
> corruption, but that's usually not the case.

> If you recompile with "-g" ("enable debugging symbols"), then 
> those annoyingly meaningless addresses will change into a 
> proper stack trace. (Or try "-gc" if "-g" doesn't work.)


Weird. I am sure I wasn't dealing with any pointers, and the Curl 
Documentation did say that it was safe.

Though I also tried Updating my compiler and libraries and 
compiling with the "-g" flag lead me to a errno(STD Exception) 
giving me with the phrase "(no error)". This only happened in 
C::B(I'm gonna try Programmer's Notebook if this is actually the 
fault of C::B)

Though outside the IDE it's just spewing out the same error over 
and over again. The error in the actual program outside the IDE 
was *bypassed* when inside the IDE, only giving an Access 
Violation error(pre-update) or STD Exception(post-update)

> Is that the same error you get if you try to give it a pem file 
> you *know* doesn't exist? If so, then maybe it's not looking in 
> the directory you expect. Try giving it a full absolute path to 
> the pem file. If that works, then it's probably looking in the 
> directory you're running from instead of the directory where it 
> actually exists. If so, you can use std.file.thisExePath() and 
> build your path relative to that (or just stick with an 
> absolute path).

The program is pretty much finding the certificate as it's not 
the same error as not finding the file. It's just nagging at the 
fact that there maybe a path mistake(which can't be true since 
it's detecting it) and access rights(now how do I configure them 
access rights?)

> You can also try opening your pem file directly:
>
> auto pemFile = File("cacert.pem");

Unfortunately, HTTP.caInfo(); takes in a "const char[]" so I 
can't try that option.

> See what happens if you do that. It won't fix the problem, but 
> seeing what it does it should help give you a better idea of 
> what's going on.
>
>> Though in the Code:: Blocks IDE there was the object.Error 
>> Access
>> Violation error
>> And in the actual program(.exe) this : 
>> http://pastebin.com/8MmPLg2Q
>>
>> Though I'm also up for not verifying the link but I still 
>> can't figure
>> out how.
>>
>> Anyway, can anyone give me an idea what went wrong?

Thanks for the information however. :)


More information about the Digitalmars-d-learn mailing list