Skip to content

[BUG] Fatal memory issues when downloading large number of tiles #86

@sikandernoori

Description

@sikandernoori

What is the bug?

When I calculate tiles to check how many tiles for a specific region with zoom range from 1 to 21 then I get below error on IOS.

* thread #34, name = 'DartWorker', stop reason = EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=3072 MB, unused=0x0) frame #0: 0x0000000103dde4c0 Flutter`dart::BlockStack<64>::PopEmptyBlock() + 116 Flutter`dart::BlockStack<64>::PopEmptyBlock: -> 0x103dde4c0 <+116>: stp q0, q0, [x0, #0x10] 0x103dde4c4 <+120>: stp q0, q0, [x0, #0x30] 0x103dde4c8 <+124>: stp q0, q0, [x0, #0x50] 0x103dde4cc <+128>: stp q0, q0, [x0, #0x70] Target 0: (Runner) stopped. Lost connection to device. 

What is the expected behaviour?

It should give tiles count.

How can we reproduce this issue?

Use countties function from example. and select a large region and zoom level from 1 to 21.i.e Future<void> _countTiles() async { final DownloadProvider provider = Provider.of<DownloadProvider>(context, listen: false); if(provider.region != null) provider ..regionTiles = null ..regionTiles = await FMTC.instance('').download.check( provider.region.toDownloadable( provider.minZoom, provider.maxZoom, TileLayer(), ) ); }

Do you have a potential solution?

Not yet

Can you provide any other information?

No response

Platforms Affected

iOS

Severity

Fatal: Causes the application to crash

Frequency

Consistently: Always occurs at the same time and location

Requirements

  • I agree to follow this project's Code of Conduct
  • My Flutter/Dart installation is unaltered, and flutter doctor finds no relevant issues
  • I am using the latest stable version of this package
  • I have checked the FAQs section on the documentation website
  • I have checked for similar issues which may be duplicates

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue reports broken functionality or another error

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions