Skip to content

net8.0-ios app crashes if minimised when a file is opened #19858

@etigin

Description

@etigin

Steps to Reproduce

  1. Create new maui app
  2. Include a file as Content or BundleResource
  3. In MainPage class add the code that opens the file for reading
  4. Deploy the app to an iPhone
  5. Launch the app, minimise it and activate it again

Expected Behavior

App is resumed

Actual Behavior

App relaunches because it has crashed on minimising

image

[app<com.companyname.lockedfiletest(982B7E11-5EA0-4B25-9E4E-E809C83BFB63)>:1447] Terminating with context: <RBSTerminateContext| domain:15 code:0xDEAD10CC explanation:[app<com.companyname.lockedfiletest(982B7E11-5EA0-4B25-9E4E-E809C83BFB63)>:1447] was suspended with locked system files:
/var/containers/Bundle/Application/A3A31E01-7520-418A-8951-58AD7E2C90C8/LockedFileTest.app/data.bin
not in allowed directories:
/var/mobile/Containers/Data/Application/B0297286-77E2-4311-86F4-E6F82449A6D8
/var/mobile/Containers/Data/Application/B0297286-77E2-4311-86F4-E6F82449A6D8/tmp reportType:CrashLog maxTerminationResistance:Absolute>

The same code works correctly in Xamarin Forms. I've attached both examples.

Environment

Version information
JetBrains Rider 2023.3.2
Build #RD-233.13135.100, built on December 19, 2023

Runtime version: 17.0.9+7-b1087.9 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.2.1
.NET Core v7.0.10 ARM64 (Server GC)
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 10
Metal Rendering is ON
Registry:
  editor.config.csharp.support=true
  ide.experimental.ui=true
Non-Bundled Plugins:
  com.jetbrains.rider.android (233.13135.100)
  com.intellij.ml.llm (233.13135.116)


$ dotnet --version                                                       
8.0.101

iPhone 12, iOS 17.2.1

LockedFileTest.zip
XamarinFormsExample.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions