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

MediaPipe CodeLabs Samples Image Generation Android: App Crash on Initialization (GPU Memory?) #436

Open
sl33pyC01E opened this issue Aug 27, 2024 · 2 comments
Labels
stat:awaiting googler Waiting for Google Engineer's Response task:image generation

Comments

@sl33pyC01E
Copy link

logcat.txt

I have attempted the codelabs tutorial in full, as well as attempted to build the full plugin app available in the non codelab samples directory. I have converted the models and loaded them into data/tmp/image_generator/bins/.

I have downloaded the test apk from google apis, and it works at any resolution below 512.
I have attempted to lower the resolution of the generation in both the unbuilt projects I have access to,
running the android profiler, it appears to be a GPU memory overflow.

I would appreciate any assistance, or a link to the project file that was used to build the apk that is currently at:
[https://storage.googleapis.com/mediapipe-tasks/image_generator/imagegenerator.apk] so that I can compare the code.

The built apk is definitely handling the coroutines differently or offloading or downscaling the bitmap or something, i tell you hwat.

@sl33pyC01E
Copy link
Author

OnePlus12 Snapdragon8Gen2 16GB of RAM

this pipeline honestly looks like a mess, I've been reading the other issues, it seems like a different error basically every time.

If the demo apk is opensourced now can I have the project file that built that apk exactly? I can probably figure it out from there. Paul please, i know ur busy but my dude, plz

@schmidt-sebastian schmidt-sebastian added stat:awaiting googler Waiting for Google Engineer's Response task:image generation labels Nov 8, 2024
@zpz-github
Copy link

zpz-github commented Dec 9, 2024

How to fix it ? libimagegenerator_gpu.so null pointer exception on android 15
runtime error : DEBUG : Cmdline: com.google.android.apps.imagegenerator
DEBUG : pid: 9496, tid: 9755, name: drishti/9755 >>> com.google.android.apps.imagegenerator <<<
DEBUG : uid: 10231
DEBUG : tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000
DEBUG : Cause: null pointer dereference
DEBUG : x0 0000000000000000 x1 0000000000000000 x2 0000000000000000 x3 00000000090c1000
DEBUG : x4 00000074023052ff x5 0000000000000000 x6 000000000000000a x7 7f7f7f7f7f7f7f7f
DEBUG : x8 0000000000000000 x9 0000007025810ff0 x10 0000000000000000 x11 000000702e8d0ff0
DEBUG : x12 ffffff80ffffffd0 x13 0000000000000025 x14 0000000000000000 x15 0000000000000001
DEBUG : x16 00000070c0ee11c0 x17 00000070c0ab2ef8 x18 0000007160fec000 x19 0000007166107398
DEBUG : x20 0000007166106ce0 x21 0000007281e71cc0 x22 0000007166106c78 x23 0000007166107800
DEBUG : x24 0000000000000000 x25 0000000000000000 x26 0000000000000300 x27 000000000000c100
DEBUG : x28 0000000000104000 x29 000000716610a6d0
DEBUG : lr 00000070c0adf3f4 sp 0000007166106a50 pc 00000070c0ab683c pst 0000000080001000
DEBUG : 15 total frames
DEBUG : backtrace:
DEBUG : #00 pc 00000000004a183c /data/app/~~teA7IqBiV89j0qgzmNatmg==/com.google.android.apps.imagegenerator-cfSxNSm3d20Xs5QIMrNaYA==/lib/arm64/libimagegenerator_gpu.so (BuildId: 68cfbebbc07cebb509bd6573d83fa156)
DEBUG : #1 pc 00000000004ca3f0 /data/app/~~teA7IqBiV89j0qgzmNatmg==/com.google.android.apps.imagegenerator-cfSxNSm3d20Xs5QIMrNaYA==/lib/arm64/libimagegenerator_gpu.so (ml_drift::TextGuidanceBuilder::MakeTextEmbeddings(ml_drift::GpuModelBuilder::TensorHandle const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator> const&)+196) (BuildId: 68cfbebbc07cebb509bd6573d83fa156)
DEBUG : #2 pc 00000000004c9fc0 /data/app/~~teA7IqBiV89j0qgzmNatmg==/com.google.android.apps.imagegenerator-cfSxNSm3d20Xs5QIMrNaYA==/lib/arm64/libimagegenerator_gpu.so (ml_drift::TextGuidanceBuilder::MakeTextGuidance(ml_drift::GpuModelBuilder::TensorHandle const&)+76) (BuildId: 68cfbebbc07cebb509bd6573d83fa156)
DEBUG : #3 pc 00000000004c9e40 /data/app/~~teA7IqBiV89j0qgzmNatmg==/com.google.android.apps.imagegenerator-cfSxNSm3d20Xs5QIMrNaYA==/lib/arm64/libimagegenerator_gpu.so (ml_drift::TextGuidanceBuilder::Build(ml_drift::TextGuidanceBuilder::Config const&, ml_drift::GpuInfo const&, ml_drift::CreateGpuModelInfo const&, ml_drift::GpuModel*, ml_drift::GpuModelBuilder::TensorHandle*, ml_drift::GpuModelBuilder::TensorHandle*, ml_drift::GpuModelBuilder::TensorHandle*)+524) (BuildId: 68cfbebbc07cebb509bd6573d83fa156)
DEBUG : #4 pc 000000000049ea58 /data/app/~~teA7IqBiV89j0qgzmNatmg==/com.google.android.apps.imagegenerator-cfSxNSm3d20Xs5QIMrNaYA==/lib/arm64/libimagegenerator_gpu.so (ml_drift::cl::stable_diffusion::Diffuser::TextGuidance::Init(ml_drift::cl::stable_diffusion::Diffuser::Config const&, ml_drift::cl::Environment*)+384) (BuildId: 68cfbebbc07cebb509bd6573d83fa156)
DEBUG : #5 pc 000000000049e39c /data/app/~~teA7IqBiV89j0qgzmNatmg==/com.google.android.apps.imagegenerator-cfSxNSm3d20Xs5QIMrNaYA==/lib/arm64/libimagegenerator_gpu.so (ml_drift::cl::stable_diffusion::Diffuser::Create(ml_drift::cl::stable_diffusion::Diffuser::Config const&)+744) (BuildId: 68cfbebbc07cebb509bd6573d83fa156)
DEBUG : #6 pc 000000000049bc34 /data/app/~~teA7IqBiV89j0qgzmNatmg==/com.google.android.apps.imagegenerator-cfSxNSm3d20Xs5QIMrNaYA==/lib/arm64/libimagegenerator_gpu.so (DiffuserCreate+168) (BuildId: 68cfbebbc07cebb509bd6573d83fa156)
DEBUG : #7 pc 00000000008d3170 /data/app/~~teA7IqBiV89j0qgzmNatmg==/com.google.android.apps.imagegenerator-cfSxNSm3d20Xs5QIMrNaYA==/lib/arm64/libmediapipe_jni.so (mediapipe::api2::StableDiffusionIterateCalculator::Open(mediapipe::CalculatorContext*)+824) (BuildId: c7c745e935452c7e86f43455bd88484c)
DEBUG : #8 pc 00000000008f9070 /data/app/~~teA7IqBiV89j0qgzmNatmg==/com.google.android.apps.imagegenerator-cfSxNSm3d20Xs5QIMrNaYA==/lib/arm64/libmediapipe_jni.so (mediapipe::CalculatorNode::OpenNode()+312) (BuildId: c7c745e935452c7e86f43455bd88484c)
DEBUG : #9 pc 00000000008eeefc /data/app/~~teA7IqBiV89j0qgzmNatmg==/com.google.android.apps.imagegenerator-cfSxNSm3d20Xs5QIMrNaYA==/lib/arm64/libmediapipe_jni.so (mediapipe::internal::SchedulerQueue::OpenCalculatorNode(mediapipe::CalculatorNode*)+60) (BuildId: c7c745e935452c7e86f43455bd88484c)
DEBUG : #10 pc 00000000008eedb4 /data/app/~~teA7IqBiV89j0qgzmNatmg==/com.google.android.apps.imagegenerator-cfSxNSm3d20Xs5QIMrNaYA==/lib/arm64/libmediapipe_jni.so (mediapipe::internal::SchedulerQueue::RunNextTask()+76) (BuildId: c7c745e935452c7e86f43455bd88484c)
DEBUG : #11 pc 0000000000918c4c /data/app/~~teA7IqBiV89j0qgzmNatmg==/com.google.android.apps.imagegenerator-cfSxNSm3d20Xs5QIMrNaYA==/lib/arm64/libmediapipe_jni.so (mediapipe::ThreadPool::RunWorker()+124) (BuildId: c7c745e935452c7e86f43455bd88484c)
DEBUG : #12 pc 00000000009188a4 /data/app/~~teA7IqBiV89j0qgzmNatmg==/com.google.android.apps.imagegenerator-cfSxNSm3d20Xs5QIMrNaYA==/lib/arm64/libmediapipe_jni.so (mediapipe::ThreadPool::WorkerThread::ThreadBody(void*)+316) (BuildId: c7c745e935452c7e86f43455bd88484c)
DEBUG : #13 pc 0000000000070098 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+200) (BuildId: e4078f1fca32b8a35fbc313abda67be6)
DEBUG : #14 pc 0000000000061410 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: e4078f1fca32b8a35fbc313abda67be6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting googler Waiting for Google Engineer's Response task:image generation
Projects
None yet
Development

No branches or pull requests

3 participants