Solved ReadFileToMemory() in R20 crashes

Hi,

I know, R20 is a while old, but maybe someone has an idea...

The following code crashes reproducibly on R20 (definitely on macOS, not yet sure about Windows):

maxon::Url theServer("https://www.myserver.org/somefolder/somefile.json"_s);
maxon::BaseArray<Char> memReq;
iferr (maxon::FileUtilities::ReadFileToMemory(theServer, memReq))
{
	DiagnosticOutput("@", err);
}

Bildschirmfoto 2021-04-11 um 16.39.48.png

The same (well, almost the same) code works flawlessly in R21 - R23:

maxon::Url theServer("https://www.myserver.org/somefolder/somefile.json"_s);

// Set post properties (apparently not yet possible in R20)
theServer.Set(maxon::URLFLAGS::HTTP_POSTMETHOD, method) iferr_return;
theServer.Set(maxon::URLFLAGS::HTTP_POSTDATA, maxon::CString(postData, maxon::StringEncodings::Utf8())) iferr_return;

maxon::BaseArray<maxon::Char> memReq;
iferr (maxon::FileUtilities::ReadFileToMemory(theServer, memReq))
{
	DiagnosticOutput("@", err);
}

Thanks in advance for advice!

Cheers,
Frank

www.frankwilleke.de
Only asking personal code questions here.

Hi,

I did tried with R20 and it worked as expected. I'm reading a .txt file from a https link. (i did only tried on windows)
Could you send us an email with the link you are using ? (just to be sure I'm testing the same thing)

Cheers,
Manuel

MAXON SDK Specialist

MAXON Registered Developer

Hi Manuel,

thanks for your reply!
Sure, what was the eMail again?

Cheers,
Frank

www.frankwilleke.de
Only asking personal code questions here.

sorry,

sdk_support(at)maxon(dot)net

Cheers,
Manuel

MAXON SDK Specialist

MAXON Registered Developer

Hi Manuel,

oh, of course. Thanks for the offer!
Will send you a mail this week. Bit busy these days.

Cheers,
Frank

www.frankwilleke.de
Only asking personal code questions here.

Hi,
Any news on that one ?

Cheers,
Manuel

MAXON SDK Specialist

MAXON Registered Developer

Hi Manuel,

sorry, I totally forgot about this one. Priorities have changed, so this isn't an issue anymore at the moment.
Thanks!

Cheers,
Frank

www.frankwilleke.de
Only asking personal code questions here.