Open cjhines opened 1 year ago
Can you provide the native callstack for that AV in RNFS.dll?
Can you provide the native callstack for that AV in RNFS.dll?
Thanks for the response.
What's "AV" in this context? Apologies, still fairly new to navigating VS for RNW
What's interesting is the first file of my array downloads successfully:
Destination: C:\Users\admin\AppData\Local\Packages\7dc6f71d-85ee\LocalState/7f7c30c2.jpg
Source: [redacted-base-url]/api/modules/file/objects/7f7c30c2/media/medium
and the second file crashes:
Destination C:\Users\admin\AppData\Local\Packages\7dc6f71d-85ee\LocalState/fff3c435.png
Source [redacted-base-url]/api/modules/file/objects/fff3c435/media/medium
What's "AV" in this context? Apologies, still fairly new to navigating VS for RNW
AV = Access Violation. The crash stack that is referenced in your screenshot above from the thrown exception. Can you attach the debugger in a way that gets that crash information?
@vmoroz FYI
@chrisglein
Value of below is 0x0000005316ffbd64 {Empty (0)}
:
@chrisglein
Seems that whenever something is compared to PropertyType::UInt64
the crash occurs.
Removing this code block:
RN::JSValueObject values = RN::JSValueObject{
{ "jobId", jobId },
{ "statusCode", (int)response.StatusCode() },
{ "contentLength", contentLength.Type() == PropertyType::UInt64 ? RN::JSValue(contentLength.Value()) : RN::JSValue{nullptr} },
{ "headers", std::move(headersMap) },
};
results in the crash occurring later, here:
auto contentLengthForProgress = contentLength.Type() == PropertyType::UInt64 ? contentLength.Value() : -1;
If I declare and breakpoint the value of contentLength.Type()
the value is -858993460
Removing this second comparison stops the crash, but breaks the progress
prop. You can see this case in this commit.
@vmoroz Can you see if there is a problem here with our JSValueObject types?
Problem Description
I'm getting the following error while calling
downloadFile
withavmoroz/react-native-fs
. Anyone encountered it or can offer some advice? I also triedwwimmo/react-native-fs
with no luck.Steps To Reproduce
Expected Results
No response
CLI version
8.0.6
Environment
Target Platform Version
No response
Target Device(s)
No response
Visual Studio Version
Visual Studio 2019
Build Configuration
No response
Snack, code example, screenshot, or link to a repository
No response