Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Camera resource preemption in multi-window mode causing app crash

Aperta
#242 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

@ardier16 ci sta già lavorando.

Dal 14/8/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug status: awaiting-reporter
Description

The application crashes in multi-window mode when the camera resource is preempted or accessed by another application, causing freezing, crashing, or abnormal behavior.

Steps to reproduce
  1. Run the target application in full-screen mode and activate the camera functionality.
  2. Launch another application that also requires access to the camera resource in floating window mode and enable its camera functionality.
  3. Refocus on the target application by clicking on its interface area to return the operational focus to the application.
  4. Observe the operational state and behavioral performance of the target application.
Expected behaviour

The application should be able to regain access to the camera resource after refocusing, without freezing, crashing, or exiting unexpectedly.

Actual behaviour

After regaining focus, the application interface freezes, the application crashes, and it needs to be restarted to recover.

Additional info

It might be beneficial to consider implementing logic within the onWindowFocusChanged callback method to handle scenarios where the application regains focus. This could include reinitializing or reallocating the camera stream, which may help mitigate resource conflicts and enhance the application's stability. Below is an example of how such logic could be structured in pseudocode:

@Override
public void onWindowFocusChanged(boolean hasFocus) {
    super.onWindowFocusChanged(hasFocus);

    if (hasFocus) {
        try {
            camera = Camera.open();
            camera.startPreview();
        } catch (Exception e) {
            Log.e("CameraHandler", "Error handling camera: " + e.getMessage());
        }
    } 

Lingua principale
Kotlin
Stelle
272
Fork
110
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Blockstream/green_android

Tutte le issue di Blockstream/green_android

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.