Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v9.1.3: fixed instability on some iOS devices when deleting tiles #166

Merged
merged 4 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 25 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@master
uses: actions/checkout@v4
- name: Run Dart Package Analyser
uses: axel-op/dart-package-analyzer@master
id: analysis
Expand All @@ -35,11 +35,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@master
uses: actions/checkout@v4
- name: Setup Flutter Environment
uses: subosito/flutter-action@main
uses: subosito/flutter-action@v2
with:
channel: "beta"
cache: true
- name: Get Package Dependencies
run: flutter pub get
- name: Get Example Dependencies
Expand All @@ -56,11 +57,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@master
uses: actions/checkout@v4
- name: Setup Flutter Environment
uses: subosito/flutter-action@main
uses: subosito/flutter-action@v2
with:
channel: "beta"
cache: true
- name: Get Dependencies
run: flutter pub get
- name: Install ObjectBox Libs For Testing
Expand All @@ -77,20 +79,22 @@ jobs:
working-directory: ./example
steps:
- name: Checkout Repository
uses: actions/checkout@master
- name: Setup Java 17 Environment
uses: actions/setup-java@v3
uses: actions/checkout@v4
- name: Setup Java 21 Environment
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
java-version: "21"
cache: 'gradle'
- name: Setup Flutter Environment
uses: subosito/flutter-action@main
uses: subosito/flutter-action@v2
with:
channel: "beta"
cache: true
- name: Build
run: flutter build apk --obfuscate --split-debug-info=./symbols
- name: Upload Artifact
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4
with:
name: android-demo
path: example/build/app/outputs/apk/release
Expand All @@ -105,18 +109,19 @@ jobs:
working-directory: ./example
steps:
- name: Checkout Repository
uses: actions/checkout@master
uses: actions/checkout@v4
- name: Setup Flutter Environment
uses: subosito/flutter-action@main
uses: subosito/flutter-action@v2
with:
channel: "beta"
cache: true
- name: Build
run: flutter build windows --obfuscate --split-debug-info=./symbols
- name: Create Installer
run: iscc "windowsApplicationInstallerSetup.iss"
working-directory: .
- name: Upload Artifact
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4
with:
name: windows-demo
path: windowsTemp/WindowsApplication.exe
Expand All @@ -131,9 +136,9 @@ jobs:
working-directory: ./tile_server
steps:
- name: Checkout Repository
uses: actions/checkout@master
uses: actions/checkout@v4
- name: Setup Dart Environment
uses: dart-lang/setup-dart@v1.6.2
uses: dart-lang/setup-dart@v1
- name: Get Dependencies
run: dart pub get
- name: Get Dart Dependencies
Expand All @@ -143,7 +148,7 @@ jobs:
- name: Compile
run: dart compile exe bin/tile_server.dart
- name: Upload Artifact
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v4
with:
name: windows-ts
path: tile_server/bin/tile_server.exe
Expand All @@ -158,17 +163,17 @@ jobs:
working-directory: ./tile_server
steps:
- name: Checkout Repository
uses: actions/checkout@master
uses: actions/checkout@v4
- name: Setup Dart Environment
uses: dart-lang/setup-dart@v1.6.2
uses: dart-lang/setup-dart@v1
- name: Get Dependencies
run: dart pub get
- name: Run Pre-Compile Generator
run: dart run bin/generate_dart_images.dart
- name: Compile
run: dart compile exe bin/tile_server.dart
- name: Upload Artifact
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4
with:
name: linux-ts
path: tile_server/bin/tile_server.exe
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ Many thanks to my sponsors, no matter how much or how little they donated. Spons

# Changelog

## [9.1.3] - 2024/08/19

* Fixed bug where any operation that attempted to delete tiles fatally crashed on some iOS devices
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.

## [9.1.2] - 2024/08/07

* Fixed compilation on web platforms: FMTC now internally overrides the `FMTCObjectBoxBackend` and becomes a no-op
Expand Down
2 changes: 1 addition & 1 deletion example/android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gradle-wrapper.jar
GeneratedPluginRegistrant.java

# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
# See https://flutter.dev/to/reference-keystore
key.properties
**/*.keystore
**/*.jks
29 changes: 8 additions & 21 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,27 @@ plugins {
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file("local.properties")
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader("UTF-8") { reader ->
localProperties.load(reader)
}
}

def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
if (flutterVersionCode == null) {
flutterVersionCode = "9"
}

def flutterVersionName = localProperties.getProperty("flutter.versionName")
if (flutterVersionName == null) {
flutterVersionName = "9.0"
}

android {
namespace = "dev.jaffaketchup.fmtc.demo"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
// ndkVersion = flutter.ndkVersion
ndkVersion = "26.1.10909125"

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}

defaultConfig {
applicationId = "dev.jaffaketchup.fmtc.demo"
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutterVersionCode.toInteger()
versionName = flutterVersionName
versionCode = flutter.versionCode
versionName = flutter.versionName
}

buildTypes {
Expand Down
16 changes: 2 additions & 14 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,11 @@ allprojects {
rootProject.buildDir = "../build"

subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
if (namespace == null) {
namespace project.group
}
}
}
}

project.buildDir = "${rootProject.buildDir}/${project.name}"
}

subprojects {
project.evaluationDependsOn(":app")
}

tasks.register("clean", Delete) {
delete rootProject.buildDir
}
}

5 changes: 1 addition & 4 deletions example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
4 changes: 2 additions & 2 deletions example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '8.0.1' apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
id "com.android.application" version '8.5.2' apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}

include ":app"
4 changes: 1 addition & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: The example application for 'flutter_map_tile_caching', showcasing
it's functionality and use-cases.
publish_to: "none"

version: 9.1.2
version: 9.1.3

environment:
sdk: ">=3.3.0 <4.0.0"
Expand All @@ -12,7 +12,6 @@ environment:
dependencies:
auto_size_text: ^3.0.0
badges: ^3.1.2
better_open_file: ^3.6.5
collection: ^1.18.0
dart_earcut: ^1.1.0
file_picker: ^8.0.3
Expand All @@ -32,7 +31,6 @@ dependencies:
provider: ^6.1.2
stream_transform: ^2.1.0
validators: ^3.0.0
version: ^3.0.2

dependency_overrides:
flutter_map_tile_caching:
Expand Down
1 change: 1 addition & 0 deletions lib/src/backend/impls/objectbox/backend/backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'dart:isolate';
import 'dart:math';

import 'package:collection/collection.dart';
import 'package:flutter/material.dart';
Expand Down
Loading
Loading