Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Navigation Memory leak

Offen
#135 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
15/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
ios, javascript

Rechercherichtung

Beginne damit, das Problem in einer mit dem ns create template erstellten App zu reproduzieren, und verwende dabei das Frame.topmost().navigate-Beispiel sowie die aufgeführten Versionen von iOS, ns-cli, ns-core und ios-runtime. Profiliere die Navigation zwischen den beschriebenen Seiten auf einem iPhone und vergleiche das Speicherverhalten mit und ohne die versuchte GC()-Änderung. Als erledigt gilt die Aufgabe, wenn der Navigations-Leak behoben ist und sich der Speicher nicht mehr anhäuft, bis die App abstürzt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

ns-v8ios since version 7 I think have this issue. Where garbage collector is not operating as intended. I think there's a duplicate about this topic in the issue list, but it's easier to create one for myself with all necessary details.

So the leak is happening even on the app that you can install with ns create. If you create one using the template where this code exists

Frame.topmost().navigate({
    moduleName: componentRoute,
    transition: {
      name: 'fade',
    },
})

I've tried to modify it in a way to use util GC(). It helped, by a tiny bit, but it's still not enough. I've made a video where I profile hello world app on iPhone and show on screen what is happening on my device. I'm basically jumping between template heavy pages that have bunch of

<GridLayout class="page__content">
        <Label class="page__content-icon far" text="&#xf1ea;"></Label>
        <Label class="page__content-placeholder" text="<!-- Page content goes here -->"></Label>
</GridLayout>

duplicated. On one page 300 lines, on the second one 6000 lines. And it's clearly visible that memory is being released by accumulates much much more.
Why so much lines is just to display that GC is clearly broken, but even in live app that I have, I have "complex" layouts because we're using NS-Vue and components approach create a lot of templates, even if they are flat. So our app crashing our clients devices quite easily, especially the ones that have only 2-3GB of RAM and the solution to make design more flat might not be a solution for us at all, unfortunately.

Version of xcode: 13.1
Version of ns-cli: 8.1.4
Version of ns-core: 8.1.1
Version of ios-runetime: 8.1.0

We would like to "invest" into this problem, to fix it ASAP, as our product suffers from this.

Here's there link to a video where I show the error https://drive.google.com/file/d/1Qz8jYFE6N4TVvS0G_8rrvmVzUe-KtKFC/view?usp=sharing

Vorherrschende Sprache
JavaScript
Sterne
150
Forks
43
Ø Merge
1 T. 1 Std.
Gemergte PRs (30 T.)
10

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus NativeScript/ios

Alle Issues in NativeScript/ios

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.