Fresco: häufiges OOM bei der Verwendung von Fresco lib

Erstellt am 15. März 2017  ·  15Kommentare  ·  Quelle: facebook/fresco

Beschreibung

Ich verwende fresco lib durch gradle( 1.1.0 ) für die gesamte Bitmap-Handhabung in unserer Anwendung, nachdem ich die App eine Weile verwendet habe, wirft sie häufig OOM aus. 10 Bilder (nicht alle von gleicher Größe, einige bedecken die Hälfte des Bildschirms, während andere nur eine Größe von 50-70 dp aufnehmen) werden auf einem einzigen Bildschirm angezeigt und alle werden mit Fresko über das Netzwerk geladen.

Die meisten der verwendeten Bilder sind mit scrollbaren Komponenten wie ListView, GridView, RecyclerView, während einige Bilder durch unsere eigene Logik recycelt werden, unten ist die Implementierung derselben.

Notiz:

  1. Fresco wird mit setDownsampleEnabled initialisiert
  2. Alle geladenen Bilder sind resized , obwohl einige unserer Bilder vom Typ .png aber die meisten von ihnen haben das Format jpeg

Reproduktion

Crash-LOG

03-15 22:21:21.199 7035-7203/com.xyz E/AndroidRuntime: FATAL EXCEPTION: Thread-442
                                                          Process: com.xyz, PID: 7035
                                                          java.lang.OutOfMemoryError: Failed to allocate a 1638412 byte allocation with 589552 free bytes and 575KB until OOM
                                                              at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
                                                              at android.graphics.Bitmap.nativeCreate(Native Method)
                                                              at android.graphics.Bitmap.createBitmap(Bitmap.java:831)
                                                              at android.graphics.Bitmap.createBitmap(Bitmap.java:808)
                                                              at android.graphics.Bitmap.createBitmap(Bitmap.java:775)
                                                              at com.facebook.imagepipeline.memory.BitmapPool.alloc(BitmapPool.java:55)
                                                              at com.facebook.imagepipeline.memory.BitmapPool.alloc(BitmapPool.java:30)
                                                              at com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:259)
                                                              at com.facebook.imagepipeline.platform.ArtDecoder.decodeStaticImageFromStream(ArtDecoder.java:137)
                                                              at com.facebook.imagepipeline.platform.ArtDecoder.decodeJPEGFromEncodedImage(ArtDecoder.java:120)
                                                              at com.facebook.imagepipeline.decoder.DefaultImageDecoder.decodeJpeg(DefaultImageDecoder.java:183)
                                                              at com.facebook.imagepipeline.decoder.DefaultImageDecoder$1.decode(DefaultImageDecoder.java:63)
                                                              at com.facebook.imagepipeline.decoder.DefaultImageDecoder.decode(DefaultImageDecoder.java:123)
                                                              at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder.doDecode(DecodeProducer.java:239)
                                                              at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder.access$200(DecodeProducer.java:111)
                                                              at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder$1.run(DecodeProducer.java:144)
                                                              at com.facebook.imagepipeline.producers.JobScheduler.doJob(JobScheduler.java:207)
                                                              at com.facebook.imagepipeline.producers.JobScheduler.access$000(JobScheduler.java:27)
                                                              at com.facebook.imagepipeline.producers.JobScheduler$1.run(JobScheduler.java:78)
                                                              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                              at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:43)
                                                              at java.lang.Thread.run(Thread.java:818)
03-15 22:44:53.849 8055-8055/com.xyz E/AndroidRuntime: FATAL EXCEPTION: main
                                                          Process: com.xyz, PID: 8055
                                                          android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class <unknown>
                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
                                                              at com.xyz.view.newswipe.view.FbLikesGridView$FbLikesAdapter.onCreateViewHolder(FbLikesGridView.java:195)
                                                              at com.xyz.view.newswipe.view.FbLikesGridView$FbLikesAdapter.onCreateViewHolder(FbLikesGridView.java:160)
                                                              at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:6319)
                                                              at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5507)
                                                              at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5392)
                                                              at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5388)
                                                              at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2149)
                                                              at android.support.v7.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:556)
                                                              at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1496)
                                                              at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:593)
                                                              at android.support.v7.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:170)
                                                              at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3535)
                                                              at android.support.v7.widget.RecyclerView.onMeasure(RecyclerView.java:2979)
                                                              at android.view.View.measure(View.java:18788)
                                                              at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
                                                              at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
                                                              at android.widget.LinearLayout.measureVertical(LinearLayout.java:748)
                                                              at android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
                                                              at android.view.View.measure(View.java:18788)
                                                              at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
                                                              at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
                                                              at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1112)
                                                              at android.widget.LinearLayout.onMeasure(LinearLayout.java:632)
                                                              at android.view.View.measure(View.java:18788)
                                                              at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
                                                              at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
                                                              at android.widget.LinearLayout.measureVertical(LinearLayout.java:748)
                                                              at android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
                                                              at android.view.View.measure(View.java:18788)
                                                              at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
                                                              at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
                                                              at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1112)
                                                              at android.widget.LinearLayout.onMeasure(LinearLayout.java:632)
                                                              at android.view.View.measure(View.java:18788)
                                                              at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
                                                              at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
                                                              at android.widget.LinearLayout.measureVertical(LinearLayout.java:748)
                                                              at android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
                                                              at android.view.View.measure(View.java:18788)
                                                              at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
                                                              at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
                                                              at android.widget.LinearLayout.measureVertical(LinearLayout.java:748)
                                                              at android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
                                                              at android.view.View.measure(View.java:18788)
                                                              at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715)
                                                              at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461)
                                                              at android.view.View.measure(View.java:18788)
                                                              at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715)
                                                              at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461)
                                                              at android.view.View.measure(View.java:18788)
                                                            at android.view.ViewGroup.measureChildWithMargins(ViewG


[FÜLLEN SIE DIES AUS: Wie können wir den Fehler reproduzieren? Geben Sie nach Möglichkeit URLs zu relevanten Bildern oder einem Beispielprojekt an.]

Lösung

[OPTIONAL: Wissen Sie, was getan werden muss, um dieses Problem zu beheben? Stellen Sie idealerweise eine Pull-Anfrage bereit, die dieses Problem behebt.]

Weitere Informationen

  • Fresko-Version: [1.1.0]
  • Plattformversion: [Android Version 5 und höher]

So initialisieren wir Fresko.

        ActivityManager activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
        ImagePipelineConfig imagePipelineConfig = ImagePipelineConfig
                .newBuilder(getApplicationContext())
                .setDownsampleEnabled(true)
                .setBitmapMemoryCacheParamsSupplier(new FrescoCacheParams(activityManager))
                .build();

        Fresco.initialize(getApplicationContext(), imagePipelineConfig);

so ist die Klasse FrescoCacheParams definiert.

public class FrescoCacheParams implements Supplier<MemoryCacheParams> {


    private ActivityManager activityManager;

    public FrescoCacheParams(ActivityManager activityManager) {
        this.activityManager = activityManager;
    }

    <strong i="17">@Override</strong>
    public MemoryCacheParams get() {

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {

            int cacheSize = getMaxCacheSize();
            Log.d("####","fresco cache size = " + cacheSize);

            return new MemoryCacheParams(cacheSize, 1, 1, 1, 1);
        } else {
            return new MemoryCacheParams(
                    getMaxCacheSize(),
                    256,
                    Integer.MAX_VALUE,
                    Integer.MAX_VALUE,
                    Integer.MAX_VALUE);
        }
    }

    private int getMaxCacheSize() {
        final int maxMemory = Math.min(activityManager.getMemoryClass()
                * ByteConstants.MB, Integer.MAX_VALUE);

        if (maxMemory < 32 * ByteConstants.MB) {
            return 4 * ByteConstants.MB;
        } else if (maxMemory < 64 * ByteConstants.MB) {
            return 6 * ByteConstants.MB;
        } else {

            if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.GINGERBREAD) {
                return 8 * ByteConstants.MB;
            } else {
                return maxMemory / 6;
            }
        }
    }
}

So werden alle Bilder geladen, wobei width und height die tatsächliche Größe der Ansicht sind, in der geladene Bilder angezeigt werden.

            ImageRequest request = ImageRequestBuilder.newBuilderWithSource(uri)
                    .setResizeOptions(new ResizeOptions(width, height))
                    .build();
            DraweeController controller = Fresco.newDraweeControllerBuilder()
                    .setOldController(getController())
                    .setImageRequest(request)
                    .build();
            setController(controller);

Unten ist ein Ausschnitt unserer Recycling-Logik, da wir eine benutzerdefinierte Implementierung von AdapterView haben, kümmern wir uns um die Freigabe von Ressourcen.

       // calling on each Drawee, once it moves out of visible area
        if (getController() != null) {
            getController().onDetach();
        }

````

   // once a image moves out of display area, we are evicting it out of pipeline as well.
    ImagePipeline imagePipeline = Fresco.getImagePipeline();
    Uri uri = Uri.parse(url);
    imagePipeline.evictFromMemoryCache(uri);

```

Wir rufen den obigen Code für alle Drawee's die zum Anzeigen von Bildern in unseren Karten verwendet werden, sobald sie sich aus dem sichtbaren Bereich auf unserem AdapterView herausbewegen

Hilfreichster Kommentar

@nucleartip lustige Tatsache ist, dass ich von der Portierung von Glide zu Fresco komme, angesichts der großen Menge an Glide von OOM ...

Alle 15 Kommentare

Hallo @nucleartip , danke für die Übermittlung des Fehlerberichts!

Haben Sie versucht, ein Speicherabbild zu erstellen, bevor das OOM auftritt, um zu sehen, was den gesamten Speicher verbraucht?

Übrigens, für Lollipop und höher verwenden Sie maxCacheEntrySize = 1, ist dies ein Versuch, den Speichercache vollständig zu deaktivieren oder nur auf ein einzelnes Element zu beschränken?

Die große Warteschlangengröße von @erikandre warf OOM noch häufiger aus, also ging ich mit niedrigem Cache-Eintrag, nur um den Speicher-Cache praktisch zu deaktivieren.

Lassen Sie mich einen Dump für Sie erstellen, aber können Sie auf jeden Fall eine Problemumgehung vorschlagen, da diese OOMs in Geräten neuerer Generationen wie Samsung S7, den neuesten Telefonen der Nexus-Serie usw.

@erikandre hier ist ein Schnappschuss des Speicherabbilds, der kurz vor dem Absturz der App aufgrund von OOM aufgenommen wurde.

screen shot 2017-03-16 at 12 02 24 pm

@nucleartip , wäre es möglich, dass Sie diesen Speicherabbild mit mir teilen?

@erikandre Heap Dump ist etwa 250 MB groß, würden Sie Laufwerk oder Dropbox bevorzugen?

@nucleartip Entweder würde man gut funktionieren :)

Ist das schon gelöst? Ich habe das gleiche Problem.

Ich habe den Speicherauszug von Eclipse Memory Analyzer überprüft.
Ich habe auch zu viele byte[] gesehen.
Aber wenn ich den Pfad zu GC verwende, werden keine Verweise gefunden.
Es scheint, dass diese von nativen referenziert werden, z. B. NativePooledByteBuffer oder NativeMemoryChunk.
Ich dachte, dass diese in com.facebook.common.references.SharedReference.sLiveObjects sind, aber ich habe keine Beweise.
Und ich weiß nicht, warum die nicht veröffentlicht werden...
Ich konnte dieses Problem nicht lösen.

Ich bin auch auf das gleiche Problem gestoßen, das Folgende sind die Ausnahmeinformationen:

E/AndroidRuntime: FATAL EXCEPTION: Thread-5458 Process:
    package-name, PID: 4877
    java.lang.OutOfMemoryError: Failed to allocate a 2560012 byte allocation with 1782384 free bytes and 1740KB until OOM
    at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
    at android.graphics.Bitmap.nativeCreate(Native Method)
    at android.graphics.Bitmap.createBitmap(Bitmap.java:843)
    at android.graphics.Bitmap.createBitmap(Bitmap.java:820)
    at android.graphics.Bitmap.createBitmap(Bitmap.java:787)
    at com.facebook.imagepipeline.memory.BitmapPool.alloc(BitmapPool.java:55)
    at com.facebook.imagepipeline.memory.BitmapPool.alloc(BitmapPool.java:30)
    at com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:260)
    at com.facebook.imagepipeline.platform.ArtDecoder.decodeStaticImageFromStream(ArtDecoder.java:137)
    at com.facebook.imagepipeline.platform.ArtDecoder.decodeJPEGFromEncodedImage(ArtDecoder.java:120)
    at com.facebook.imagepipeline.decoder.DefaultImageDecoder.decodeJpeg(DefaultImageDecoder.java:186)
    at com.facebook.imagepipeline.decoder.DefaultImageDecoder$1.decode(DefaultImageDecoder.java:63)
    at com.facebook.imagepipeline.decoder.DefaultImageDecoder.decode(DefaultImageDecoder.java:126)
    at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder.doDecode(DecodeProducer.java:240)
    at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder.access$200(DecodeProducer.java:112)
    at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder$1.run(DecodeProducer.java:145)
    at com.facebook.imagepipeline.producers.JobScheduler.doJob(JobScheduler.java:207)
    at com.facebook.imagepipeline.producers.JobScheduler.access$000(JobScheduler.java:27)
    at com.facebook.imagepipeline.producers.JobScheduler$1.run(JobScheduler.java:78)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
    at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:43)
    at java.lang.Thread.run(Thread.java:818)

Dies sind alle GC-Informationen vor dem OOM:

I/art: Starting a blocking GC Alloc
I/art: Starting a blocking GC Alloc
I/art: Alloc sticky concurrent mark sweep GC freed 92215(9MB) AllocSpace objects, 36(660KB) LOS objects, 8% free, 117MB/128MB, paused 1.228ms total 37.123ms
I/art: Starting a blocking GC Alloc
I/art: Starting a blocking GC Alloc
I/art: Waiting for a blocking GC Alloc
I/art: Clamp target GC heap from 188MB to 128MB
I/art: Alloc partial concurrent mark sweep GC freed 45395(2MB) AllocSpace objects, 43(860KB) LOS objects, 3% free, 124MB/128MB, paused 727us total 59.648ms
I/art: WaitForGcToComplete blocked for 25.090ms for cause Alloc
I/art: Starting a blocking GC Alloc
I/art: Starting a blocking GC Alloc
I/art: Starting a blocking GC Alloc
W/art: Suspending all threads took: 5.155ms
I/art: Waiting for a blocking GC Alloc
I/art: Alloc sticky concurrent mark sweep GC freed 2803(277KB) AllocSpace objects, 2(40KB) LOS objects, 0% free, 126MB/128MB, paused 579us total 19.249ms
I/art: Starting a blocking GC Alloc
I/art: Waiting for a blocking GC Alloc
I/art: Alloc sticky concurrent mark sweep GC freed 822(87KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 126MB/128MB, paused 547us total 12.316ms
I/art: WaitForGcToComplete blocked for 11.410ms for cause Alloc
I/art: Starting a blocking GC Alloc
I/art: Waiting for a blocking GC Alloc
I/art: Clamp target GC heap from 190MB to 128MB
I/art: Alloc partial concurrent mark sweep GC freed 4725(241KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 126MB/128MB, paused 658us total 46.759ms
I/art: WaitForGcToComplete blocked for 46.699ms for cause Alloc
I/art: Starting a blocking GC Alloc
I/art: Waiting for a blocking GC Alloc
I/art: Clamp target GC heap from 190MB to 128MB
I/art: Alloc concurrent mark sweep GC freed 801(78KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 126MB/128MB, paused 796us total 40.098ms
I/art: WaitForGcToComplete blocked for 35.773ms for cause Alloc
I/art: Starting a blocking GC Alloc
I/art: Forcing collection of SoftReferences for 2MB allocation
I/art: Waiting for a blocking GC Alloc
I/art: Waiting for a blocking GC Alloc
I/art: Clamp target GC heap from 191MB to 128MB
I/art: Alloc concurrent mark sweep GC freed 3661(366KB) AllocSpace objects, 1(20KB) LOS objects, 0% free, 127MB/128MB, paused 634us total 61.758ms
I/art: WaitForGcToComplete blocked for 60.363ms for cause Alloc
I/art: Starting a blocking GC Alloc
I/art: Waiting for a blocking GC Alloc
W/art: Suspending all threads took: 38.816ms
/I/art: Forcing collection of SoftReferences for 2MB allocation
/I/art: Waiting for a blocking GC Alloc
/I/art: Clamp target GC heap from 190MB to 128MB
/I/art: Alloc concurrent mark sweep GC freed 214(8KB) AllocSpace objects, 1(416KB) LOS objects, 0% free, 126MB/128MB, paused 876us total 42.655ms
/I/art: WaitForGcToComplete blocked for 82.057ms for cause Alloc
/I/art: Starting a blocking GC Alloc
/I/art: Starting a blocking GC Alloc
/W/art: Throwing OutOfMemoryError "Failed to allocate a 2560012 byte allocation with 1643888 free bytes and 1605KB until OOM"
/I/art: Waiting for a blocking GC Alloc
/I/art: Clamp target GC heap from 190MB to 128MB
/I/art: Alloc concurrent mark sweep GC freed 12633(1496KB) AllocSpace objects, 0(0B) LOS objects, 1% free, 126MB/128MB, paused 684us total 43.271ms
/I/art: WaitForGcToComplete blocked for 136.549ms for cause Alloc
/I/art: Starting a blocking GC Alloc
/I/art: Waiting for a blocking GC Alloc
/I/art: Waiting for a blocking GC Alloc
/I/art: Forcing collection of SoftReferences for 2MB allocation
/I/art: Waiting for a blocking GC Alloc
/I/art: Clamp target GC heap from 190MB to 128MB
/I/art: Alloc concurrent mark sweep GC freed 2239(265KB) AllocSpace objects, 0(0B) LOS objects, 1% free, 126MB/128MB, paused 1.282ms total 40.182ms
/I/art: WaitForGcToComplete blocked for 120.837ms for cause Alloc
/I/art: Starting a blocking GC Alloc
/I/art: Waiting for a blocking GC Alloc
/I/art: Waiting for a blocking GC Alloc
/I/art: Forcing collection of SoftReferences for 2MB allocation
/I/art: Waiting for a blocking GC Alloc
/W/art: Suspending all threads took: 30.572ms
/I/art: Clamp target GC heap from 190MB to 128MB
/I/art: Alloc concurrent mark sweep GC freed 7(1264B) AllocSpace objects, 0(0B) LOS objects, 1% free, 126MB/128MB, paused 2.697ms total 43.668ms
/I/art: WaitForGcToComplete blocked for 129.040ms for cause Alloc
/I/art: Starting a blocking GC Alloc
/I/art: WaitForGcToComplete blocked for 83.495ms for cause Alloc
/I/art: Starting a blocking GC Alloc
/I/art: Waiting for a blocking GC Alloc
/W/art: Throwing OutOfMemoryError "Failed to allocate a 2560012 byte allocation with 1782384 free bytes and 1740KB until OOM"
/I/art: Waiting for a blocking GC Alloc
/I/art: Waiting for a blocking GC Alloc

1 Öffnen Sie vor dem Absturz eine Viewpager + RecyclerView-Seite in der ersten:
1

Es gibt ungefähr 20 Bilder.

2 Öffnen Sie vor dem Absturz eine Viewpager + RecyclerView-Seite in den ersten beiden:
2

Es gibt ca. 40 Bilder, Viewpager auf beiden Seiten des Pagers haben jeweils 30 Bilder.

3 Nach dem Absturz:
3

Ich sehe dies immer häufiger, insbesondere bei neueren Geräten mit mehr verfügbarem RAM. Es ist, als ob je mehr RAM Fresco spielen muss, desto häufiger sind die OOMs.

Meine Konfiguration ist die Standardkonfiguration (habe noch nicht versucht, meine eigenen Lieferanten zu implementieren), aber ich bezweifle ernsthaft, dass dies viel helfen würde (es sei denn, ich setze die maximalen Cache-Einträge auf 0 und deaktiviere damit den Cache vollständig).

Haben Sie eine Idee, wie wir das angehen können?

@mradzinski Ich habe schließlich komplett auf Glide portiert und damit unsere App für frei von OOMs erklärt.

@nucleartip lustige Tatsache ist, dass ich von der Portierung von Glide zu Fresco komme, angesichts der großen Menge an Glide von OOM ...

Wir schließen dies, da wir nicht genügend Informationen haben, um die Untersuchung fortzusetzen.
Bei anderen Problemen mit nicht genügend Arbeitsspeicher erstellen Sie bitte eine neue Aufgabe und fügen Sie vorzugsweise einen HPROF-Speicherabzug hinzu.

@erikandre

Ich weiß, dass Sie nicht genügend Informationen haben, um OOM-Probleme zu lösen. Ich schlage nur vor, ein Fehlerereignis mit Rückruf zu posten, anstatt nur einen OOM-Fehler zu werfen. Damit wir das OOM-Ereignis selbst bearbeiten können.

@AlexCJW Ich glaube nicht, dass es eine Möglichkeit gibt, eine vom System ausgelöste Ausnahme wie ein OOM zu behandeln, und kann mir außerdem kein Szenario vorstellen, in dem Ihre App auf einen Rückruf reagieren kann, nachdem er seit diesem Rückruf ein OOM erhalten hat selbst müsste schließlich auch nicht verfügbaren Speicher verbrauchen.

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen

Verwandte Themen

sungerk picture sungerk  ·  3Kommentare

hanhmh1203 picture hanhmh1203  ·  4Kommentare

amodkanthe picture amodkanthe  ·  3Kommentare

ykostova picture ykostova  ·  3Kommentare

rhettor picture rhettor  ·  3Kommentare