question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App crash when loading a lot of images

See original GitHub issue

Describe the bug I’m calling github api and printing out the results, and for each result there is an avatar of the repo owner. After several calls and renders app crashes without any error. When I do not use <Image> everything works fine.

To Reproduce It requires some setup, at least for my case, but maybe it is reproducible in some other way. Here are the basic steps:

  1. Fetch results from github (i’m using axios and calling https://api.github.com/search/repositories?q={term}&sort=stars&order=desc), where {term} is value from input.

  2. Print some repo details. Here’s jsx i’m using:

  const list = items.map((item: any, index: number) => (
    <View key={`github_${item.name}_${index}`} id="github-item">
      <View id="github-image">
        <Image src={item.avatar} id="#github-image-item" maxSize={{ width: 50, height: 50 }} />
      </View>
      <View id="github-content">
        <Text>{item.owner}</Text>
        <Text>{item.name}</Text>
        <Text>{item.description}</Text>
      </View>
    </View>
  ))

  return (
    <View styleSheet={styleSheet}>{list}</View>
  )

  1. Change input value several times, wait each time data to print
  2. Should crash after several times

If this is not enough for figuring it out, I can spend some time setting up a demo project, but i’m not sure how that will help since there is no any errors when it crashes.

Expected behavior Not to crash

Additional context My assumption is that it has a memory leak somewhere, which should be either handled by QT, nodegui or a developer. I didn’t find anything that I should do to make it free up memory. As noted above, when I remove <Image>, text part properly works and do not crash.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
a7ulcommented, Jun 16, 2020

Thanks for reporting back @kristijanhusak closing this issue for now.

0reactions
kristijanhusakcommented, Jun 16, 2020

I made it work with useReducer without any issues. I guess my code was causing some issues. Feel free to close this if you think there isn’t anything to fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

An Ultimate Guide to Fix Photos App Crashing Issue on ...
Solution 1: Update the Photos app · Solution 2: Run the Windows Troubleshooter · Solution 3: Switch the Default Option to Windows Photo...
Read more >
Fix Photos App Crashing Issue on Windows 10 | Stellar
Methods to Fix Photos App Crashing on Windows 10 · Method 1: Update the Photos app · Method 2: Run the Windows Troubleshooter...
Read more >
App Crashes when loading a list of images. #65834 - GitHub
My app crashes after reaching 800mb+ or even 1200mb while loading a simple list of images No stacktrace available.
Read more >
Flutter app crashing when trying to display more than 10 images
The app allows the user to take multiple images (from 1 to 50+), and displays each image on the screen all at once...
Read more >
windows 11 pro - photos app crashing - Microsoft Community
The Photo App crashing has been a problem even with the original 22621.1 release with multiple users. It's affecting more people now… Microsoft ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found