I tried to download an email with one "larger" attachment (12MB) using the example in pop3.pbi. The download only works up to approx. 2MB and then hangs. After closing the application the debugger reports on Win7:
file: libcurl.pbi
procedure: ProcedureC.l LibCurl_WriteFunction()
error: invalid memory access
On Mac function Pop3_GetMessageByNumber() hangs as well without error message.
No problems with small files on windows and Mac.
Has anyone already had the problem?
libcurl: Problems with large attachments
- RichAlgeni
- Addict

- Posts: 935
- Joined: Wed Sep 22, 2010 1:50 am
- Location: Bradenton, FL
Re: libcurl: Problems with large attachments
Yes! I have had problems that were not possible to fix, unless I used two different versions of the libcurl dll libraries.
https://www.purebasic.fr/english/viewto ... rl#p596339
In order to get the IMAP, SMTP and POP3 functions to work, I had to use the 7.64.1.1 version to read data, and the 7.56.1.0 version to write data. I reported this to the curl crew, but they wouldn't take my information seriously. Instead they chastised me for setting up a test email address on my own email server for them to test with, and giving them access to the data I used to test. I could not find a version that would read and write correctly. I was lucky to stumble into the solution by remembering that a prior version (7.56.1.0) did work when writing date that tried when just writing a process to test curl. This was months before I had to create a project for a client.
Both versions were downloaded from THEIR site. I made tow libcurl.pbi include files, one to read, and one to write. It worked, but I did not like the solution.
https://www.purebasic.fr/english/viewto ... rl#p596339
In order to get the IMAP, SMTP and POP3 functions to work, I had to use the 7.64.1.1 version to read data, and the 7.56.1.0 version to write data. I reported this to the curl crew, but they wouldn't take my information seriously. Instead they chastised me for setting up a test email address on my own email server for them to test with, and giving them access to the data I used to test. I could not find a version that would read and write correctly. I was lucky to stumble into the solution by remembering that a prior version (7.56.1.0) did work when writing date that tried when just writing a process to test curl. This was months before I had to create a project for a client.
Both versions were downloaded from THEIR site. I made tow libcurl.pbi include files, one to read, and one to write. It worked, but I did not like the solution.
Re: libcurl: Problems with large attachments
Hello, yes, libcurl causes problems in some places. I have now found a workaround. This is probably due to the use of strings in PB.
My approach can be found at the following link:
https://www.purebasic.fr/english/viewto ... 85#p623985
"infratec" has included the solution into the libcurl code ... at the moment everything seems to work.
My approach can be found at the following link:
https://www.purebasic.fr/english/viewto ... 85#p623985
"infratec" has included the solution into the libcurl code ... at the moment everything seems to work.
