Skip to content

Commit 55e9585

Browse files
authored
v9.1.3: fixed instability on some iOS devices when deleting tiles (#166)
1 parent 2402631 commit 55e9585

File tree

13 files changed

+146
-147
lines changed

13 files changed

+146
-147
lines changed

.github/workflows/main.yml

+25-20
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout Repository
16-
uses: actions/checkout@master
16+
uses: actions/checkout@v4
1717
- name: Run Dart Package Analyser
1818
uses: axel-op/dart-package-analyzer@master
1919
id: analysis
@@ -35,11 +35,12 @@ jobs:
3535
runs-on: ubuntu-latest
3636
steps:
3737
- name: Checkout Repository
38-
uses: actions/checkout@master
38+
uses: actions/checkout@v4
3939
- name: Setup Flutter Environment
40-
uses: subosito/flutter-action@main
40+
uses: subosito/flutter-action@v2
4141
with:
4242
channel: "beta"
43+
cache: true
4344
- name: Get Package Dependencies
4445
run: flutter pub get
4546
- name: Get Example Dependencies
@@ -56,11 +57,12 @@ jobs:
5657
runs-on: ubuntu-latest
5758
steps:
5859
- name: Checkout Repository
59-
uses: actions/checkout@master
60+
uses: actions/checkout@v4
6061
- name: Setup Flutter Environment
61-
uses: subosito/flutter-action@main
62+
uses: subosito/flutter-action@v2
6263
with:
6364
channel: "beta"
65+
cache: true
6466
- name: Get Dependencies
6567
run: flutter pub get
6668
- name: Install ObjectBox Libs For Testing
@@ -77,20 +79,22 @@ jobs:
7779
working-directory: ./example
7880
steps:
7981
- name: Checkout Repository
80-
uses: actions/checkout@master
81-
- name: Setup Java 17 Environment
82-
uses: actions/setup-java@v3
82+
uses: actions/checkout@v4
83+
- name: Setup Java 21 Environment
84+
uses: actions/setup-java@v4
8385
with:
8486
distribution: "temurin"
85-
java-version: "17"
87+
java-version: "21"
88+
cache: 'gradle'
8689
- name: Setup Flutter Environment
87-
uses: subosito/flutter-action@main
90+
uses: subosito/flutter-action@v2
8891
with:
8992
channel: "beta"
93+
cache: true
9094
- name: Build
9195
run: flutter build apk --obfuscate --split-debug-info=./symbols
9296
- name: Upload Artifact
93-
uses: actions/upload-artifact@v3.1.2
97+
uses: actions/upload-artifact@v4
9498
with:
9599
name: android-demo
96100
path: example/build/app/outputs/apk/release
@@ -105,18 +109,19 @@ jobs:
105109
working-directory: ./example
106110
steps:
107111
- name: Checkout Repository
108-
uses: actions/checkout@master
112+
uses: actions/checkout@v4
109113
- name: Setup Flutter Environment
110-
uses: subosito/flutter-action@main
114+
uses: subosito/flutter-action@v2
111115
with:
112116
channel: "beta"
117+
cache: true
113118
- name: Build
114119
run: flutter build windows --obfuscate --split-debug-info=./symbols
115120
- name: Create Installer
116121
run: iscc "windowsApplicationInstallerSetup.iss"
117122
working-directory: .
118123
- name: Upload Artifact
119-
uses: actions/upload-artifact@v3.1.2
124+
uses: actions/upload-artifact@v4
120125
with:
121126
name: windows-demo
122127
path: windowsTemp/WindowsApplication.exe
@@ -131,9 +136,9 @@ jobs:
131136
working-directory: ./tile_server
132137
steps:
133138
- name: Checkout Repository
134-
uses: actions/checkout@master
139+
uses: actions/checkout@v4
135140
- name: Setup Dart Environment
136-
uses: dart-lang/setup-dart@v1.6.2
141+
uses: dart-lang/setup-dart@v1
137142
- name: Get Dependencies
138143
run: dart pub get
139144
- name: Get Dart Dependencies
@@ -143,7 +148,7 @@ jobs:
143148
- name: Compile
144149
run: dart compile exe bin/tile_server.dart
145150
- name: Upload Artifact
146-
uses: actions/upload-artifact@v4.3.1
151+
uses: actions/upload-artifact@v4
147152
with:
148153
name: windows-ts
149154
path: tile_server/bin/tile_server.exe
@@ -158,17 +163,17 @@ jobs:
158163
working-directory: ./tile_server
159164
steps:
160165
- name: Checkout Repository
161-
uses: actions/checkout@master
166+
uses: actions/checkout@v4
162167
- name: Setup Dart Environment
163-
uses: dart-lang/setup-dart@v1.6.2
168+
uses: dart-lang/setup-dart@v1
164169
- name: Get Dependencies
165170
run: dart pub get
166171
- name: Run Pre-Compile Generator
167172
run: dart run bin/generate_dart_images.dart
168173
- name: Compile
169174
run: dart compile exe bin/tile_server.dart
170175
- name: Upload Artifact
171-
uses: actions/upload-artifact@v3.1.2
176+
uses: actions/upload-artifact@v4
172177
with:
173178
name: linux-ts
174179
path: tile_server/bin/tile_server.exe

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ Many thanks to my sponsors, no matter how much or how little they donated. Spons
1818

1919
# Changelog
2020

21+
## [9.1.3] - 2024/08/19
22+
23+
* Fixed bug where any operation that attempted to delete tiles fatally crashed on some iOS devices
24+
This appears to be an [ObjectBox issue](https://github.com/objectbox/objectbox-dart/issues/654) where streaming the results of a database query caused the crash. Instead, FMTC now uses a custom chunking system to avoid streaming and also avoid loading potentially many tiles into memory.
25+
2126
## [9.1.2] - 2024/08/07
2227

2328
* Fixed compilation on web platforms: FMTC now internally overrides the `FMTCObjectBoxBackend` and becomes a no-op

example/android/.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ gradle-wrapper.jar
77
GeneratedPluginRegistrant.java
88

99
# Remember to never publicly share your keystore.
10-
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
10+
# See https://flutter.dev/to/reference-keystore
1111
key.properties
1212
**/*.keystore
1313
**/*.jks

example/android/app/build.gradle

+8-21
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,27 @@ plugins {
55
id "dev.flutter.flutter-gradle-plugin"
66
}
77

8-
def localProperties = new Properties()
9-
def localPropertiesFile = rootProject.file("local.properties")
10-
if (localPropertiesFile.exists()) {
11-
localPropertiesFile.withReader("UTF-8") { reader ->
12-
localProperties.load(reader)
13-
}
14-
}
15-
16-
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
17-
if (flutterVersionCode == null) {
18-
flutterVersionCode = "9"
19-
}
20-
21-
def flutterVersionName = localProperties.getProperty("flutter.versionName")
22-
if (flutterVersionName == null) {
23-
flutterVersionName = "9.0"
24-
}
25-
268
android {
279
namespace = "dev.jaffaketchup.fmtc.demo"
2810
compileSdk = flutter.compileSdkVersion
29-
ndkVersion = flutter.ndkVersion
11+
// ndkVersion = flutter.ndkVersion
12+
ndkVersion = "26.1.10909125"
3013

3114
compileOptions {
3215
sourceCompatibility = JavaVersion.VERSION_1_8
3316
targetCompatibility = JavaVersion.VERSION_1_8
3417
}
3518

19+
kotlinOptions {
20+
jvmTarget = JavaVersion.VERSION_1_8
21+
}
22+
3623
defaultConfig {
3724
applicationId = "dev.jaffaketchup.fmtc.demo"
3825
minSdk = flutter.minSdkVersion
3926
targetSdk = flutter.targetSdkVersion
40-
versionCode = flutterVersionCode.toInteger()
41-
versionName = flutterVersionName
27+
versionCode = flutter.versionCode
28+
versionName = flutter.versionName
4229
}
4330

4431
buildTypes {

example/android/build.gradle

+2-14
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,11 @@ allprojects {
88
rootProject.buildDir = "../build"
99

1010
subprojects {
11-
afterEvaluate { project ->
12-
if (project.hasProperty('android')) {
13-
project.android {
14-
if (namespace == null) {
15-
namespace project.group
16-
}
17-
}
18-
}
19-
}
20-
2111
project.buildDir = "${rootProject.buildDir}/${project.name}"
22-
}
23-
24-
subprojects {
2512
project.evaluationDependsOn(":app")
2613
}
2714

2815
tasks.register("clean", Delete) {
2916
delete rootProject.buildDir
30-
}
17+
}
18+

example/android/gradle.properties

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
1+
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true
4-
android.defaults.buildfeatures.buildconfig=true
5-
android.nonTransitiveRClass=false
6-
android.nonFinalResIds=false

example/android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip

example/android/settings.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pluginManagement {
1818

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version '8.0.1' apply false
22-
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
21+
id "com.android.application" version '8.5.2' apply false
22+
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
2323
}
2424

2525
include ":app"

example/pubspec.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: The example application for 'flutter_map_tile_caching', showcasing
33
it's functionality and use-cases.
44
publish_to: "none"
55

6-
version: 9.1.2
6+
version: 9.1.3
77

88
environment:
99
sdk: ">=3.3.0 <4.0.0"
@@ -12,7 +12,6 @@ environment:
1212
dependencies:
1313
auto_size_text: ^3.0.0
1414
badges: ^3.1.2
15-
better_open_file: ^3.6.5
1615
collection: ^1.18.0
1716
dart_earcut: ^1.1.0
1817
file_picker: ^8.0.3
@@ -32,7 +31,6 @@ dependencies:
3231
provider: ^6.1.2
3332
stream_transform: ^2.1.0
3433
validators: ^3.0.0
35-
version: ^3.0.2
3634

3735
dependency_overrides:
3836
flutter_map_tile_caching:

lib/src/backend/impls/objectbox/backend/backend.dart

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import 'dart:async';
55
import 'dart:convert';
66
import 'dart:io';
77
import 'dart:isolate';
8+
import 'dart:math';
89

910
import 'package:collection/collection.dart';
1011
import 'package:flutter/material.dart';

0 commit comments

Comments
 (0)