Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: failed to fill whole buffer #4

Closed
MAVProxyUser opened this issue Mar 18, 2024 · 7 comments
Closed

Error: failed to fill whole buffer #4

MAVProxyUser opened this issue Mar 18, 2024 · 7 comments

Comments

@MAVProxyUser
Copy link

Same dataset as before... a few files trigger this error. Any idea what may cause it?

thread 'main' panicked at src/main.rs:46:45:
Unable to parse file: InfoParseError("\n ╺━━━━━━━━━━━━━━━━━━━━┅ Backtrace ┅━━━━━━━━━━━━━━━━━━━━╸\n\n 0: \u{1b}[1m\u{1b}[1mError: failed to fill whole buffer\u{1b}[22m\n \u{1b}[1mWhile parsing field 'app_version' in Info\u{1b}[22m\u{1b}[22m\n at src/layout/info.rs:79\n\n ╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸\n\n")
stack backtrace:
0: rust_begin_unwind
at /build/rustc-60UC9b/rustc-1.75.0+dfsg0ubuntu1bpo0/library/std/src/panicking.rs:645:5
1: core::panicking::panic_fmt
at /build/rustc-60UC9b/rustc-1.75.0+dfsg0ubuntu1
bpo0/library/core/src/panicking.rs:72:14
2: core::result::unwrap_failed
at /build/rustc-60UC9b/rustc-1.75.0+dfsg0ubuntu1bpo0/library/core/src/result.rs:1653:5
3: core::result::Result<T,E>::expect
at /build/rustc-60UC9b/rustc-1.75.0+dfsg0ubuntu1
bpo0/library/core/src/result.rs:1034:23
4: dji_log_parser::main
at /media/kfinisterre/bdb99222-a06f-476b-ae0c-a4110a7ef82e/dji-log-parser/src/main.rs:46:18
5: core::ops::function::FnOnce::call_once
at /build/rustc-60UC9b/rustc-1.75.0+dfsg0ubuntu1~bpo0/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

@lvauvillier
Copy link
Owner

@MAVProxyUser, I've obtained the dataset but, could you indicate which log files are causing the crash?

@MAVProxyUser
Copy link
Author

@MAVProxyUser, I've obtained the dataset but, could you indicate which log files are causing the crash?

I’ve been bulk processing them with the find command. I’ll see if I can augment it to print the file name:

find /path/to/dump/FlightLogs/ -type f -name '*.txt' -exec bash -c '
filepath="$1"
basepath="/path/to/dump/FlightLogs/"
relpath="${filepath#$basepath}"
dir="./ParsedLogs/$(dirname "$relpath")"
mkdir -p "$dir"
base="$dir/$(basename "${filepath%.txt}")"
mkdir -p "$base"
pushd "$base"
/path/to/dump/dji-log-parser/target/debug/dji-log-parser "$filepath" --images "image%d.jpeg" --output "records.json"
popd
' bash {} ;

@lvauvillier
Copy link
Owner

Ok, this is an old log version 2 format that produces this error. The info section size is 350 bytes instead of 400.
I'll try to fix it tomorrow.

@lvauvillier
Copy link
Owner

Fixed. Thanks!

@ZaneM26
Copy link

ZaneM26 commented Mar 20, 2024

@MAVProxyUser can you share the rb files you mentioned (record_data_v1.rb, etc.)?

@MAVProxyUser
Copy link
Author

@ZaneM26 https://github.com/MAVProxyUser/UserPortrait/blob/master/Fly%20Record.zip

@ZaneM26
Copy link

ZaneM26 commented Mar 20, 2024

@MAVProxyUser thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants