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

Volume crash #302

Closed
Lg42tv opened this issue Aug 17, 2024 · 22 comments
Closed

Volume crash #302

Lg42tv opened this issue Aug 17, 2024 · 22 comments

Comments

@Lg42tv
Copy link

Lg42tv commented Aug 17, 2024

No description provided.

@Lg42tv Lg42tv closed this as completed Aug 18, 2024
@hardcore-sushi
Copy link
Owner

Could you share how you fixed your issue? Thanks

@Lg42tv
Copy link
Author

Lg42tv commented Aug 18, 2024

Could you share how you fixed your issue? Thanks

I created a new volume it moved my files to it.
So it wasn't your app's fault, sorry. And thanks for this great app.

@hardcore-sushi
Copy link
Owner

This is still strange. The app shouldn't crash, even if some files are corrupted. Could you share the problematic volume so I can investigate on my side?
Also, how were corrupted files created (or modified) when the issue started to happen?

@Lg42tv
Copy link
Author

Lg42tv commented Aug 19, 2024

This is still strange. The app shouldn't crash, even if some files are corrupted. Could you share the problematic volume so I can investigate on my side? Also, how were corrupted files created (or modified) when the issue started to happen?

I don't if it is a corrupted files thing, because i moved the same files without any modifications to a new volume and it works perfectly.

Unfortunately i can't share the volume as it contains personal data. But here are the logs from the app
DroidFS.log

@hardcore-sushi
Copy link
Owner

Did you create the volume with DroidFS, or with gocryptfs and then added it to the app? What about the new working volume?

How did you moved the files to the new volume? Using or DroidFS cross-volume import, or otherwise?

If you remove all the personal data from the buggy volume, does the crash still happen? If so, could you share the volume with the data removed?

@Lg42tv
Copy link
Author

Lg42tv commented Aug 20, 2024

I honestly can't remember how i made the old volume, but the new volume was made in Droidfs.

Yeah i used Droidfs to move the files between the volumes.

Tried that, I removed all the files and the crash disappeared.

Maybe it's an upstream issue? Because the volume was pretty old, maybe it doesn't work with new vesion of gocrypfs in Droidfs?

I can share it with you if you want, just tell me how you want me to send it.

@hardcore-sushi
Copy link
Owner

Tried that, I removed all the files and the crash disappeared.

Would you be able to determine the exact file that, once deleted, caused the crash to disappear?

I don't think it's an upstream issue as you said you were able to mount it on Linux successfully.

I can share it with you if you want, just tell me how you want me to send it.

Thanks, you can create an archive of your encrypted volume and send it to me using a private upload service like https://upload.disroot.org. You can send me the password by email encrypted with my PGP key or on Matrix.

@Lg42tv
Copy link
Author

Lg42tv commented Aug 20, 2024

Never mind, i found the cause of the crash while searching for the "file" that was causing it.

The reason was having too much folders inside of each other.

screen-20240820-203753.mp4

That i think is a bug in droidfs? I tried different setting, disabled "map folders" option disabled "thumbnails" etc, same crash.

@hardcore-sushi
Copy link
Owner

Thanks for your investigation. Yes it's definitely a bug in DroidFS. Unfortunately the crash doesn't happen on my side. Did you created this volume with the latest DroidFS v2.2.0? Is it using AES or XChaCha cipher? What's inside folder6?

If it doesn't contain personal data, could you send me the whole volume?

@Lg42tv
Copy link
Author

Lg42tv commented Aug 20, 2024

Yes i used the latest f-droid release v2.2.0, i tried AES and Xchacha, same crash and the folders were empty.

On the bright side it doesn't crash on cryfs, so maybe i'll migrate?

Here's the volume:
test-volume.zip
, it has no password.
try to enter the folders and go back repeatedly that may cause it to crash also.

@hardcore-sushi
Copy link
Owner

I cannot reproduce the issue on my side, but after examining your crash log, I found a stupid error in the gocryptfs JNI code which causes invalid memory access, which is most likely the cause of the crash. I fixed it with 4aa211b.

Can you build the app to test if the bug is really gone? Otherwise, I can provide you with a pre-compiled debug APK.

@Lg42tv
Copy link
Author

Lg42tv commented Aug 23, 2024

Thanks for looking into the issue.

I couldn't build the app because i got an error when i tried to compile ffmpeg.

If you want me to test the fix, i would appreciate an apk. otherwise i can wait for the next release.

@hardcore-sushi
Copy link
Owner

i got an error when i tried to compile ffmpeg.

Another bug... Could you please give me more details? What did you do and what error did you get?

Here is a debug APK: https://upload.disroot.org/r/ehSyceLk#uaoS6PzHIK2uIYWqXc+bF5lA5dQRCxz38f9+53RqJ+I=
It's signed with a debug certificate so you might need to adb install it. If the crash still occurs, please share your logcat.

@Lg42tv
Copy link
Author

Lg42tv commented Aug 23, 2024

Haha don't worry i'm probably missing a dependency or something. I followed the build.md successfully until i tried to compile ffmpeg, it gave me this error:

Compiling for arm64-v8a...
Makefile:194: /tests/Makefile: No such file or directory
make: *** No rule to make target '/tests/Makefile'. Stop.
aarch64-linux-android21-clang is unable to create an executable file.
C compiler test failed.

But your fix worked perfectly, 0 crashes.

@hardcore-sushi
Copy link
Owner

your fix worked perfectly, 0 crashes.

Great. Then the next official release should permanently fix the issue. Thanks for you bug report.

Regarding the ffmpeg build, the error message seems to indicate that the file app/ffmpeg/ffmpeg/tests/Makefile does not exist. That's weird because it's part of the ffmpeg repo containing the Makefile printing the error. You can go in the app/ffmpeg/ffmpeg directory and run git status. This should print:

HEAD detached at n7.0.1
nothing to commit, working tree clean

If the output is different, you can try to run git reset HEAD --hard && git clean. If it doesn't fix the issue, please share the following files in your app/ffmpeg/ffmpeg/ffbuild directory:

  • config.sh
  • config.fate
  • config.mak
  • config.log

@Lg42tv
Copy link
Author

Lg42tv commented Aug 24, 2024

The issue wasn't fixed. and i only found config.log in the directory, here's the whole folder: https://upload.disroot.org/r/LHn3mvs5#7/VXZFvUAajm+9vQLvoD1z//Fs+FoPvKGKFkk7UU+4g=

@hardcore-sushi
Copy link
Owner

Thank you. Here is the relevant line:

./configure: 1006: aarch64-linux-android21-clang: not found

There is an issue with your NDK installation. Could you check that /home/a/Downloads/android-ndk-r25c-linux/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang actually exists, and show the output of:

  • file /home/a/Downloads/android-ndk-r25c-linux/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-14
  • ldd /home/a/Downloads/android-ndk-r25c-linux/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-14
  • ldd --version and uname -a

@Lg42tv
Copy link
Author

Lg42tv commented Aug 24, 2024

That file exists.

/home/a/Downloads/android-ndk-r25c-linux/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-14: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, stripped`

	linux-vdso.so.1 (0x00007ffefb57a000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007aeaec42b000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007aeaec426000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007aeaec421000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007aeaec338000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007aeaec31c000)
	libc++.so.1 => /home/a/Downloads/android-ndk-r25c-linux/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib64/libc++.so.1 (0x00007aeaec1ff000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007aeaec1d2000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007aeaebe00000)
	/lib64/ld-linux-x86-64.so.2 (0x00007aeaec440000)
ldd (Ubuntu GLIBC 2.39-0ubuntu8.3) 2.39
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
Linux a-lap 6.8.0-41-generic #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug  2 20:41:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

@Lg42tv
Copy link
Author

Lg42tv commented Aug 24, 2024

I just tried to compile it again an got this long ahhh error:

Compiling for arm64-v8a...
install prefix            /usr/local
source path               .
C compiler                aarch64-linux-android21-clang
C library                 bionic
host C compiler           gcc
host C library            glibc
ARCH                      aarch64 (generic)
big-endian                no
runtime cpu detection     yes
NEON enabled              yes
DOTPROD enabled           yes
I8MM enabled              yes
debug symbols             no
strip symbols             yes
optimize for size         no
optimizations             yes
static                    no
shared                    yes
postprocessing support    no
network support           no
threading support         pthreads
safe bitstream reader     yes
texi2html enabled         no
perl enabled              yes
pod2man enabled           yes
makeinfo enabled          no
makeinfo supports HTML    no
xmllint enabled           no

External libraries:

External libraries providing hardware acceleration:
v4l2_m2m

Libraries:
avcodec                 avformat                avutil

Programs:

Enabled decoders:

Enabled encoders:
aac

Enabled hwaccels:

Enabled parsers:
ac3

Enabled demuxers:

Enabled muxers:
mov                     mp4

Enabled protocols:
async                   concatf                 fd                      md5                     subfile
cache                   crypto                  file                    pipe                    tee
concat                  data                    hls                     prompeg

Enabled filters:

Enabled bsfs:
aac_adtstoasc           vp9_superframe

Enabled indevs:

Enabled outdevs:

License: LGPL version 3 or later
config.h is unchanged
config_components.h is unchanged
libavutil/avconfig.h is unchanged
libavfilter/filter_list.c is unchanged
libavcodec/codec_list.c is unchanged
libavcodec/parser_list.c is unchanged
libavcodec/bsf_list.c is unchanged
libavformat/demuxer_list.c is unchanged
libavformat/muxer_list.c is unchanged
libavdevice/indev_list.c is unchanged
libavdevice/outdev_list.c is unchanged
libavformat/protocol_list.c is unchanged
ffbuild/config.sh is unchanged
libavformat/avio.c:62:137: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
    {"rw_timeout", "Timeout for IO operations (in microseconds)", offsetof(URLContext, rw_timeout), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_DECODING_PARAM },
    ~                                                                                                                                   ^~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:188:27: note: expanded from macro 'INT64_MAX'
#define INT64_MAX        (INT64_C(9223372036854775807))
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:141:27: note: expanded from macro 'INT64_C'
#  define INT64_C(c)      c ## L
                          ^~~~~~
<scratch space>:24:1: note: expanded from here
9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
1 warning generated.
libavformat/demux.c:1731:40: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
        if (bitrate >= 0 && bitrate <= INT64_MAX)
                                    ~~ ^~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:188:27: note: expanded from macro 'INT64_MAX'
#define INT64_MAX        (INT64_C(9223372036854775807))
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:141:27: note: expanded from macro 'INT64_C'
#  define INT64_C(c)      c ## L
                          ^~~~~~
<scratch space>:148:1: note: expanded from here
9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
libavformat/dump.c:230:53: warning: implicit conversion from 'unsigned int' to 'float' changes value from 4294967295 to 4294967296 [-Wimplicit-const-int-float-conversion]
        av_log(ctx, log_level, "%f", (float) peak / UINT32_MAX);
                                                  ~ ^~~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:183:27: note: expanded from macro 'UINT32_MAX'
#define UINT32_MAX       (4294967295U)
                          ^~~~~~~~~~~
1 warning generated.
1 warning generated.
In file included from libavformat/options.c:40:
libavformat/options_table.h:89:146: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
{"max_interleave_delta", "maximum buffering duration for interleaving", OFFSET(max_interleave_delta), AV_OPT_TYPE_INT64, { .i64 = 10000000 }, 0, INT64_MAX, E },
~                                                                                                                                                ^~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:188:27: note: expanded from macro 'INT64_MAX'
#define INT64_MAX        (INT64_C(9223372036854775807))
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:141:27: note: expanded from macro 'INT64_C'
#  define INT64_C(c)      c ## L
                          ^~~~~~
<scratch space>:39:1: note: expanded from here
9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
In file included from libavformat/options.c:40:
libavformat/options_table.h:88:125: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
{"output_ts_offset", "set output timestamp offset", OFFSET(output_ts_offset), AV_OPT_TYPE_DURATION, {.i64 = 0}, -INT64_MAX, INT64_MAX, E},
~                                                                                                                           ^~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:188:27: note: expanded from macro 'INT64_MAX'
#define INT64_MAX        (INT64_C(9223372036854775807))
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:141:27: note: expanded from macro 'INT64_C'
#  define INT64_C(c)      c ## L
                          ^~~~~~
<scratch space>:38:1: note: expanded from here
9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
In file included from libavformat/options.c:40:
libavformat/options_table.h:88:113: warning: implicit conversion from 'long' to 'double' changes value from -9223372036854775807 to -9223372036854775808 [-Wimplicit-const-int-float-conversion]
{"output_ts_offset", "set output timestamp offset", OFFSET(output_ts_offset), AV_OPT_TYPE_DURATION, {.i64 = 0}, -INT64_MAX, INT64_MAX, E},
~                                                                                                               ^~~~~~~~~~
libavformat/options_table.h:84:159: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775806 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
{"skip_initial_bytes", "set number of bytes to skip before reading header and frames", OFFSET(skip_initial_bytes), AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX-1, D},
~                                                                                                                                                    ~~~~~~~~~^~
libavformat/options_table.h:66:156: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
{"start_time_realtime", "wall-clock time when stream begins (PTS==0)", OFFSET(start_time_realtime), AV_OPT_TYPE_INT64, {.i64 = AV_NOPTS_VALUE}, INT64_MIN, INT64_MAX, E},
~                                                                                                                                                          ^~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:188:27: note: expanded from macro 'INT64_MAX'
#define INT64_MAX        (INT64_C(9223372036854775807))
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:141:27: note: expanded from macro 'INT64_C'
#  define INT64_C(c)      c ## L
                          ^~~~~~
<scratch space>:35:1: note: expanded from here
9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
In file included from libavformat/options.c:40:
libavformat/options_table.h:59:151: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
{"analyzeduration", "specify how many microseconds are analyzed to probe the input", OFFSET(max_analyze_duration), AV_OPT_TYPE_INT64, {.i64 = 0 }, 0, INT64_MAX, D},
~                                                                                                                                                     ^~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:188:27: note: expanded from macro 'INT64_MAX'
#define INT64_MAX        (INT64_C(9223372036854775807))
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:141:27: note: expanded from macro 'INT64_C'
#  define INT64_C(c)      c ## L
                          ^~~~~~
<scratch space>:32:1: note: expanded from here
9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
In file included from libavformat/options.c:40:
libavformat/options_table.h:39:96: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
{"probesize", "set probing size", OFFSET(probesize), AV_OPT_TYPE_INT64, {.i64 = 5000000 }, 32, INT64_MAX, D},
~                                                                                              ^~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:188:27: note: expanded from macro 'INT64_MAX'
#define INT64_MAX        (INT64_C(9223372036854775807))
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:141:27: note: expanded from macro 'INT64_C'
#  define INT64_C(c)      c ## L
                          ^~~~~~
<scratch space>:31:1: note: expanded from here
9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
libavformat/options.c:403:91: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
    {"id", "Set group id", offsetof(AVStreamGroup, id), AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX, AV_OPT_FLAG_ENCODING_PARAM },
    ~                                                                                     ^~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:188:27: note: expanded from macro 'INT64_MAX'
#define INT64_MAX        (INT64_C(9223372036854775807))
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:141:27: note: expanded from macro 'INT64_C'
#  define INT64_C(c)      c ## L
                          ^~~~~~
<scratch space>:58:1: note: expanded from here
9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
8 warnings generated.
libavformat/subfile.c:38:81: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
    { "end",   "end offset",   OFFSET(end),   AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX, D },
    ~                                                                           ^~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:188:27: note: expanded from macro 'INT64_MAX'
#define INT64_MAX        (INT64_C(9223372036854775807))
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:141:27: note: expanded from macro 'INT64_C'
#  define INT64_C(c)      c ## L
                          ^~~~~~
<scratch space>:24:1: note: expanded from here
9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
libavformat/subfile.c:37:81: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
    { "start", "start offset", OFFSET(start), AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX, D },
    ~                                                                           ^~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:188:27: note: expanded from macro 'INT64_MAX'
#define INT64_MAX        (INT64_C(9223372036854775807))
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:141:27: note: expanded from macro 'INT64_C'
#  define INT64_C(c)      c ## L
                          ^~~~~~
<scratch space>:23:1: note: expanded from here
9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
2 warnings generated.
libavcodec/aac_ac3_parser.c:97:13: warning: variable 'bit_rate' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
        if (avctx->codec_id != AV_CODEC_ID_AAC) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/aac_ac3_parser.c:161:18: note: uninitialized use occurs here
                (bit_rate - avctx->bit_rate) / s->frame_number;
                 ^~~~~~~~
libavcodec/aac_ac3_parser.c:97:9: note: remove the 'if' if its condition is always true
        if (avctx->codec_id != AV_CODEC_ID_AAC) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/aac_ac3_parser.c:90:21: note: initialize the variable 'bit_rate' to silence this warning
        int bit_rate;
                    ^
                     = 0
1 warning generated.
libavcodec/aaccoder.c:534:20: warning: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Wimplicit-const-int-float-conversion]
            qmin = INT_MAX;
                 ~ ^~~~~~~
/home/a/Downloads/android-ndk-r25c-linux/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/14.0.7/include/limits.h:46:19: note: expanded from macro 'INT_MAX'
#define INT_MAX   __INT_MAX__
                  ^~~~~~~~~~~
<built-in>:45:21: note: expanded from here
#define __INT_MAX__ 2147483647
                    ^~~~~~~~~~
1 warning generated.
In file included from libavcodec/options.c:39:
libavcodec/options_table.h:50:110: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
{"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT64, {.i64 = AV_CODEC_DEFAULT_BITRATE }, 0, INT64_MAX, A|V|E},
~                                                                                                            ^~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:188:27: note: expanded from macro 'INT64_MAX'
#define INT64_MAX        (INT64_C(9223372036854775807))
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:141:27: note: expanded from macro 'INT64_C'
#  define INT64_C(c)      c ## L
                          ^~~~~~
<scratch space>:27:1: note: expanded from here
9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
1 warning generated.
libavutil/cpu.c:116:76: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
        { "flags"   , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, INT64_MAX, .unit = "flags" },
        ~                                                                  ^~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:188:27: note: expanded from macro 'INT64_MAX'
#define INT64_MAX        (INT64_C(9223372036854775807))
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:141:27: note: expanded from macro 'INT64_C'
#  define INT64_C(c)      c ## L
                          ^~~~~~
<scratch space>:26:1: note: expanded from here
9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
1 warning generated.
libavutil/eval.c:250:29: warning: implicit conversion from 'unsigned long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-const-int-float-conversion]
            return r * (1.0/UINT64_MAX);
                           ~^~~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:193:27: note: expanded from macro 'UINT64_MAX'
#define UINT64_MAX       (UINT64_C(18446744073709551615))
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:142:27: note: expanded from macro 'UINT64_C'
#  define UINT64_C(c)     c ## UL
                          ^~~~~~~
<scratch space>:23:1: note: expanded from here
18446744073709551615UL
^~~~~~~~~~~~~~~~~~~~~~
libavutil/eval.c:256:44: warning: implicit conversion from 'unsigned long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-const-int-float-conversion]
            return min + (max - min) * r / UINT64_MAX;
                                         ~ ^~~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:193:27: note: expanded from macro 'UINT64_MAX'
#define UINT64_MAX       (UINT64_C(18446744073709551615))
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/a/Downloads/android-ndk-r25c-linux//toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/stdint.h:142:27: note: expanded from macro 'UINT64_C'
#  define UINT64_C(c)     c ## UL
                          ^~~~~~~
<scratch space>:24:1: note: expanded from here
18446744073709551615UL
^~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.

Man, if it's something wrong on my end and not your build.md, then please forget about it i don't want to bother you anymore.

@hardcore-sushi
Copy link
Owner

You don't bother me, don't worry. Everything looks fine. The long output is not an error. It's just a lot of compilation warnings. The build must have succeed. Check the /app/ffmpeg/build/arm64-v8a/ directory. It should contains 3 subfolders after the build:

  • libavcodec
  • libavformat
  • libavutil

Did you change something to make the first error disappear?

@Lg42tv
Copy link
Author

Lg42tv commented Aug 24, 2024

Thanks to you, i just built my first ever apk :)

Did you change something to make the first error disappear?

I previously only had the command line told only because i thought they were sufficient. What i changed is that i installed the full android studio GUI.

final note, for me even with export ANDROID_NDK_HOME=/home/a/Downloads/android-ndk-r25c-linux/ set, it gave me an error when i tried to build the app

SDK location not found. Define a valid SDK location with an ANDROID_HOME environment variable or by setting the sdk.dir path in your project's local properties file at '/home/a/Downloads/DroidFS/local.properties'.

So i had to make that file and put sdk.dir = /home/a/Downloads/android-ndk-r25c-linux in it. maybe put a note in the build.md? idk it's up to you.
thanks again.

@hardcore-sushi
Copy link
Owner

Thanks to you, i just built my first ever apk :)

Congratulations!

Indeed, command line tools should be sufficient. I'll investigate this. And you are right about the sdk.dir variable. I'll add a note in the build guide. Thank you for all your feedback. It was very helpful.

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

2 participants