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

Publish on F-Droid #237

Open
linsui opened this issue Jul 24, 2023 · 11 comments
Open

Publish on F-Droid #237

linsui opened this issue Jul 24, 2023 · 11 comments

Comments

@linsui
Copy link

linsui commented Jul 24, 2023

Can I package this app for F-Droid?

@csukuangfj
Copy link
Collaborator

Yes, as long as you describe that it is from
https://github.com/k2-fsa/sherpa-ncnn

@linsui
Copy link
Author

linsui commented Jul 24, 2023

Yes, of course.

@linsui
Copy link
Author

linsui commented Jul 24, 2023

I have a try https://gitlab.com/linsui/fdroiddata/-/commit/abafba0871a354334e18d28cc649920f09b326dc. But the apk doesn't work for me. I can only see a black screen and it quits after a while. The apk can be downloaded from https://gitlab.com/linsui/fdroiddata/-/jobs/4728967690/artifacts/file/tmp/com.k2fsa.sherpa.ncnn_1.apk.

@csukuangfj
Copy link
Collaborator

Can you get the logcat log?

@linsui
Copy link
Author

linsui commented Jul 25, 2023

The logcat of my build:

--------- beginning of main
07-25 13:41:53.214 23855 23855 E fsa.sherpa.ncnn: Not starting debugger since process cannot load the jdwp agent.
07-25 13:41:53.227 23855 23855 D CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10256; state: ENABLED
07-25 13:41:53.237 23855 23855 V GraphicsEnvironment: ANGLE Developer option for 'com.k2fsa.sherpa.ncnn' set to: 'default'
07-25 13:41:53.237 23855 23855 V GraphicsEnvironment: ANGLE GameManagerService for com.k2fsa.sherpa.ncnn: false
07-25 13:41:53.237 23855 23855 V GraphicsEnvironment: Updatable production driver is not supported on the device.
07-25 13:41:53.238 23855 23855 D NetworkSecurityConfig: No Network Security Config specified, using platform default
07-25 13:41:53.238 23855 23855 D NetworkSecurityConfig: No Network Security Config specified, using platform default
07-25 13:41:53.266 23855 23855 D CompatibilityChangeReporter: Compat change id reported: 210923482; UID 10256; state: DISABLED
07-25 13:41:53.267 23855 23855 D CompatibilityChangeReporter: Compat change id reported: 37756858; UID 10256; state: ENABLED
07-25 13:41:53.280 23855 23855 I sherpa-ncnn: Start to initialize model
07-25 13:41:53.283 23855 23855 W ncnn    : ------config------
07-25 13:41:53.283 23855 23855 W ncnn    : RecognizerConfig(feat_config=FeatureExtractorConfig(sampling_rate=16000, feature_dim=80), model_config=ModelConfig(encoder_param="sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13/encoder_jit_trace-pnnx.ncnn.param", encoder_bin="sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13/encoder_jit_trace-pnnx.ncnn.bin", decoder_param="sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13/decoder_jit_trace-pnnx.ncnn.param", decoder_bin="sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13/decoder_jit_trace-pnnx.ncnn.bin", joiner_param="sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13/joiner_jit_trace-pnnx.ncnn.param", joiner_bin="sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13/joiner_jit_trace-pnnx.ncnn.bin", tokens="sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13/tokens.txt", encoder num_threads=1, decoder num_threads=1, joiner num_threads=1), decoder_config=DecoderConfig(method="greedy_search", num_active_paths=4), endpoint_config=Endpoi
--------- beginning of crash
07-25 13:41:53.284 23855 23855 F libc    : Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xb4000070178c1000 in tid 23855 (fsa.sherpa.ncnn), pid 23855 (fsa.sherpa.ncnn)

Logcat of your build from github release:

--------- beginning of main
07-25 13:43:29.441 29769 29769 I fsa.sherpa.ncnn: Late-enabling -Xcheck:jni
07-25 13:43:29.484 29769 29769 D CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10257; state: ENABLED
07-25 13:43:29.489 29769 29769 W ziparchive: Unable to open '/data/app/~~n4GLhF78b-zvgGK_O7c2_g==/com.k2fsa.sherpa.ncnn-7vxCM39spei-hfgNq5ljpQ==/base.dm': No such file or directory
07-25 13:43:29.489 29769 29769 W ziparchive: Unable to open '/data/app/~~n4GLhF78b-zvgGK_O7c2_g==/com.k2fsa.sherpa.ncnn-7vxCM39spei-hfgNq5ljpQ==/base.dm': No such file or directory
07-25 13:43:29.582 29769 29769 V GraphicsEnvironment: ANGLE Developer option for 'com.k2fsa.sherpa.ncnn' set to: 'default'
07-25 13:43:29.582 29769 29769 V GraphicsEnvironment: ANGLE GameManagerService for com.k2fsa.sherpa.ncnn: false
07-25 13:43:29.582 29769 29769 V GraphicsEnvironment: Updatable production driver is not supported on the device.
07-25 13:43:29.584 29769 29769 D NetworkSecurityConfig: No Network Security Config specified, using platform default
07-25 13:43:29.584 29769 29769 D NetworkSecurityConfig: No Network Security Config specified, using platform default
07-25 13:43:29.653 29769 29769 W fsa.sherpa.ncnn: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
07-25 13:43:29.653 29769 29769 W fsa.sherpa.ncnn: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
07-25 13:43:29.655 29769 29769 D CompatibilityChangeReporter: Compat change id reported: 210923482; UID 10257; state: DISABLED
07-25 13:43:29.655 29769 29769 D CompatibilityChangeReporter: Compat change id reported: 37756858; UID 10257; state: ENABLED
07-25 13:43:29.691 29769 29769 I sherpa-ncnn: Start to initialize model
07-25 13:43:29.696 29769 29769 W ncnn    : ------config------
07-25 13:43:29.696 29769 29769 W ncnn    : RecognizerConfig(feat_config=FeatureExtractorConfig(sampling_rate=16000, feature_dim=80), model_config=ModelConfig(encoder_param="sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13/encoder_jit_trace-pnnx.ncnn.param", encoder_bin="sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13/encoder_jit_trace-pnnx.ncnn.bin", decoder_param="sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13/decoder_jit_trace-pnnx.ncnn.param", decoder_bin="sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13/decoder_jit_trace-pnnx.ncnn.bin", joiner_param="sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13/joiner_jit_trace-pnnx.ncnn.param", joiner_bin="sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13/joiner_jit_trace-pnnx.ncnn.bin", tokens="sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13/tokens.txt", encoder num_threads=1, decoder num_threads=1, joiner num_threads=1), decoder_config=DecoderConfig(method="greedy_search", num_active_paths=4), endpoint_config=Endpoi
--------- beginning of crash
07-25 13:43:29.697 29769 29769 F libc    : Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xb4000070178c1000 in tid 29769 (fsa.sherpa.ncnn), pid 29769 (fsa.sherpa.ncnn)

Both of them only show a black screen on my phone. Maybe it just take a very long time to load the model?

@csukuangfj
Copy link
Collaborator

Are there more error logs?

@danpovey
Copy link
Collaborator

danpovey commented Jul 25, 2023

It seems that SEGV_ACCERR could be a permissions related issue. E.g. a different user might own that file versus the user which is running the process? Or wrong permissions? [Edit: seems it can also be stack overflow, but IDK why the stack might overflow.]
https://stackoverflow.com/questions/19119943/what-does-segv-accerr-mean

@csukuangfj
Copy link
Collaborator

Maybe it just take a very long time to load the model?

It should not take a long time to load the model.

It looks to me that you don't specify the model path correctly or there are some issues with your model, e.g., not updated.
The error is likely from the following nullptr:

return nullptr;

Could you first test your model with ./build/bin/sherpa-ncnn and see if it works well?

@linsui
Copy link
Author

linsui commented Jul 25, 2023

You apk doesn't work for me either. My build works on another device. So looks like the problem is that this app doesn't work on my phone. I opened #239 for this problem.

@linsui
Copy link
Author

linsui commented Jul 25, 2023

Can I add some fastlane metadata for descriptions for F-Droid? I can open an PR. The version name and version code is not updated. Should I patch it, e.g., 2.0.2(20002) or you can set it to a meaningful value? If the version code is always 1 F-Droid can't update the app.

@linsui
Copy link
Author

linsui commented Jul 25, 2023

Should I also package the GPU version? It's reported that the perfomance of GPU version on Android is terrible but maybe someone want to have a try anyway.

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