Skip to content

Clean .NET MAUI iOS app crashes on launch when _ExportSymbolsExplicitly=false #25491

Closed

Description

@sztechmiler

Apple platform

iOS

Framework version

net10.0-*

Affected platform version

Known failing: - .NET SDK: 10.0.101 - Workload set: 10.0.203.1 - iOS workload: 26.4.10259 - Xcode: 26.4.1 - Device build: physical iPhone Also failing: - Workload set: 10.0.303.3 - Xcode: 26.5 - Device build: physical iPhone Known working: - Workload set: 10.0.300 - iOS workload: 26.2.10233 - Xcode: 26.3 - _ExportSymbolsExplicitly=false

Description

A clean .NET MAUI iOS application created from dotnet new maui crashes immediately on launch on a physical iPhone when this property is set:

<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
  <_ExportSymbolsExplicitly>false</_ExportSymbolsExplicitly>
</PropertyGroup>

The same clean app launches successfully when the property is removed or set to true.

This appears to be a regression in the .NET for iOS/macios toolchain. It is not caused by app code or third-party packages: the repro project only references the default MAUI packages.

Steps to Reproduce

Create a new MAUI app:

dotnet new maui -n ExportFalseMauiIos -o ExportFalseMauiIos

Use an iOS-only project with this property:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>net10.0-ios</TargetFrameworks>
    <OutputType>Exe</OutputType>
    <RootNamespace>ExportFalseMauiIos</RootNamespace>
    <UseMaui>true</UseMaui>
    <SingleProject>true</SingleProject>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <ApplicationTitle>Export False MAUI iOS</ApplicationTitle>
    <ApplicationId>pl.benefitsystems.multisport.dev.local</ApplicationId>
    <ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
    <ApplicationVersion>1</ApplicationVersion>
    <RuntimeIdentifier Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">ios-arm64</RuntimeIdentifier>
    <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">17.0</SupportedOSPlatformVersion>
  </PropertyGroup>

  <PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
    <_ExportSymbolsExplicitly>false</_ExportSymbolsExplicitly>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.Maui.Controls" />
    <PackageReference Include="Microsoft.Extensions.Logging.Debug" />
  </ItemGroup>
</Project>

Publish and install to a physical iPhone:

dotnet publish ExportFalseMauiIos/ExportFalseMauiIos.csproj \
  --configuration Release \
  --self-contained \
  --framework net10.0-ios \
  -r ios-arm64 \
  -p:ArchiveOnBuild=true \
  -p:CodesignKey="Apple Development: ..." \
  -p:CodesignProvision="..."

Install the generated IPA and launch the app.

Expected Behavior

The app should launch and show the initial MAUI page.

Actual Behavior

The app crashes immediately on launch before the first page is usable.

Changing only this:

<_ExportSymbolsExplicitly>false</_ExportSymbolsExplicitly>

to either removing the property or:

<_ExportSymbolsExplicitly>true</_ExportSymbolsExplicitly>

makes the same clean app launch successfully.

Test Matrix

Xcode Workload set iOS workload _ExportSymbolsExplicitly Result
26.3 10.0.300 26.2.10233 false works
26.4.1 10.0.203.1 26.4.10259 false crashes on launch
26.4.1 10.0.203.1 26.4.10259 true/default works
26.5 10.0.303.3 26.5.10284 false crashes on launch

Did you find any workaround?

Remove the property or set it to true:

<_ExportSymbolsExplicitly>true</_ExportSymbolsExplicitly>

However, this property was previously used as a workaround for Firebase Crashlytics symbol/crash reporting behavior, so removing it may affect crash reporting. Crashlitics bug workaround

Another workaround is to pin to the older working stack:

  • Xcode 26.3
  • Workload set 10.0.300
  • iOS workload 26.2.10233

Possibly Related Issues / PRs

I did not find an exact existing open issue for this launch crash.

Related symbol export / strip PR:

This issue may be related to the change in #24800, but the symptom is different:

Relevant logs

No response

Activity

  1. rolfbjarne commented on May 21, 2026

    @rolfbjarne
    Member

    @sztechmiler do you need this for Craslytics/Firebase? If so, can you see if adding this to your csproj works as a different workaround?

    <ItemGroup>
        <ReferenceNativeSymbol Include="_mh_execute_header" SymbolType="Function" />
    </ItemGroup>

    From: #25427 (comment)

  2. added
    bug
    on May 21, 2026
  3. added this to the Future milestone on May 21, 2026
  4. sztechmiler commented on May 22, 2026

    @sztechmiler
    Author

    @rolfbjarne -> adding _mh_execute_header seems to fix the crashlitics issue so I no longer need _ExportSymbolsExplicitly == false.
    Thanks for quick response and workaround!

  5. maonaoda commented on Jun 11, 2026

    @maonaoda

    Wow, thank you — I also had _ExportSymbolsExplicitly in my project, but it never occurred to me that it could be the cause.

    The app launches fine with workload 10.0.201, but starting from 10.0.301 it crashes immediately on startup. The Mono logs showed recursive calls, which sent me down a completely different debugging path.

    Setting _ExportSymbolsExplicitly to true fixed the issue for me as well.

    I even tried removing imported packages one by one, but none of them turned out to be the culprit. This saved me time!

    Incident Identifier: 7C011E6C-26A4-4D02-8514-67C4C8DFD5D4
    CrashReporter Key:   f87b7d6e4e1c21834e981f139cb9dc953a2e7ff7
    Hardware Model:      iPhone17,5
    Process:             XXX.YYY.ZZZ [2161]
    Path:                /private/var/containers/Bundle/Application/A7AFD73A-2347-47E3-87E3-79FA80B02BB7/XXX.YYY.ZZZ.app/XXX.YYY.ZZZ
    Identifier:          XXX
    Version:             5.0.0+debug (1)
    Code Type:           ARM-64 (Native)
    Role:                Foreground
    Parent Process:      launchd [1]
    Coalition:           XXX [729]
    
    Date/Time:           2026-06-11 14:30:53.1450 +0800
    Launch Time:         2026-06-11 14:30:53.0763 +0800
    OS Version:          iPhone OS 26.5 (23F77)
    Release Type:        User
    Baseband Version:    2.05.04
    Report Version:      104
    
    Exception Type:  EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Termination Reason: SIGNAL 6 Abort trap: 6
    Terminating Process: XXX.YYY.ZZZ [2161]
    
    Triggered by Thread:  0
    
    Application Specific Information:
    abort() called
    
    
    Thread 0 name:  tid_103 Dispatch queue: com.apple.main-thread
    Thread 0 Crashed:
    0   libsystem_kernel.dylib                 0x2449e11d0 __pthread_kill + 8
    1   libsystem_pthread.dylib               0x1f4bd77dc pthread_kill + 267
    2   libsystem_c.dylib                     0x1a1591c98 abort + 147
    3   XXX.YYY.ZZZ                    0x100f8a104 decode_type.cold.2 (in XXX.YYY.ZZZ) (aot-runtime.c:791)
    4   XXX.YYY.ZZZ                    0x100ed8e38 mono_runtime_setup_stat_profiler (in XXX.YYY.ZZZ) (mini-posix.c:695)
    5   libsystem_platform.dylib              0x2b61dd1b8 _sigtramp + 55
    6   libsystem_pthread.dylib               0x1f4bd77dc pthread_kill + 267
    7   libsystem_c.dylib                     0x1a1591c98 abort + 147
    8   XXX.YYY.ZZZ                    0x100e29df0 ves_icall_System_Diagnostics_Debugger_IsAttached_internal (in XXX.YYY.ZZZ) (icall.c:6268)
    9   XXX.YYY.ZZZ                    0x100e2bbe8 ves_icall_System_Environment_GetCommandLineArgs_raw (in XXX.YYY.ZZZ) (icall-def.h:203)
    10  XXX.YYY.ZZZ                    0x100ee5c54 do_icall (in XXX.YYY.ZZZ) (interp.c:2506)
    11  XXX.YYY.ZZZ                    0x100ee4228 do_icall_wrapper (in XXX.YYY.ZZZ) (interp.c:2537)
    12  XXX.YYY.ZZZ                    0x100eddd44 mono_interp_exec_method (in XXX.YYY.ZZZ) (interp.c:4402)
    13  XXX.YYY.ZZZ                    0x100edaaf8 interp_runtime_invoke (in XXX.YYY.ZZZ) (interp.c:2272)
    14  XXX.YYY.ZZZ                    0x100eace7c mono_jit_runtime_invoke (in XXX.YYY.ZZZ) (mini-runtime.c:0)
    15  XXX.YYY.ZZZ                    0x100e5d8dc mono_runtime_invoke_checked (in XXX.YYY.ZZZ) (object.c:2792)
    16  XXX.YYY.ZZZ                    0x100e5d7c0 mono_runtime_object_init_handle (in XXX.YYY.ZZZ) (object.c:154)
    17  XXX.YYY.ZZZ                    0x100e1d6fc mono_exception_new_by_name (in XXX.YYY.ZZZ) (exception.c:64)
    18  XXX.YYY.ZZZ                    0x100e1dbe8 mono_exception_new_by_name_msg (in XXX.YYY.ZZZ) (exception.c:256)
    19  XXX.YYY.ZZZ                    0x100db8c68 mono_error_prepare_exception (in XXX.YYY.ZZZ) (mono-error.c:0)
    20  XXX.YYY.ZZZ                    0x100db8fb8 mono_error_convert_to_exception (in XXX.YYY.ZZZ) (mono-error.c:805)
    21  XXX.YYY.ZZZ                    0x100e1edf0 mono_error_set_pending_exception_slow (in XXX.YYY.ZZZ) (exception.c:1200)
    22  XXX.YYY.ZZZ                    0x100e3f0fc mono_marshal_lookup_pinvoke (in XXX.YYY.ZZZ) (marshal.c:6715)
    23  XXX.YYY.ZZZ                    0x100ee5be4 do_icall (in XXX.YYY.ZZZ) (interp.c:2439)
    24  XXX.YYY.ZZZ                    0x100ee4228 do_icall_wrapper (in XXX.YYY.ZZZ) (interp.c:2537)
    25  XXX.YYY.ZZZ                    0x100ee02d4 mono_interp_exec_method (in XXX.YYY.ZZZ) (interp.c:7338)
    26  XXX.YYY.ZZZ                    0x100edaaf8 interp_runtime_invoke (in XXX.YYY.ZZZ) (interp.c:2272)
    27  XXX.YYY.ZZZ                    0x100eace7c mono_jit_runtime_invoke (in XXX.YYY.ZZZ) (mini-runtime.c:0)
    28  XXX.YYY.ZZZ                    0x100e5ef2c mono_runtime_try_invoke (in XXX.YYY.ZZZ) (object.c:2733)
    29  XXX.YYY.ZZZ                    0x100e5ddcc mono_runtime_class_init_full (in XXX.YYY.ZZZ) (object.c:548)
    30  XXX.YYY.ZZZ                    0x100ef13e0 mono_interp_transform_method (in XXX.YYY.ZZZ) (transform.c:10025)
    31  XXX.YYY.ZZZ                    0x100ee3eb8 do_transform_method (in XXX.YYY.ZZZ) (interp.c:3014)
    32  XXX.YYY.ZZZ                    0x100ee224c mono_interp_exec_method (in XXX.YYY.ZZZ) (interp.c:4538)
    33  XXX.YYY.ZZZ                    0x100edaaf8 interp_runtime_invoke (in XXX.YYY.ZZZ) (interp.c:2272)
    34  XXX.YYY.ZZZ                    0x100eace7c mono_jit_runtime_invoke (in XXX.YYY.ZZZ) (mini-runtime.c:0)
    35  XXX.YYY.ZZZ                    0x100e5d8dc mono_runtime_invoke_checked (in XXX.YYY.ZZZ) (object.c:2792)
    36  XXX.YYY.ZZZ                    0x100e5d7c0 mono_runtime_object_init_handle (in XXX.YYY.ZZZ) (object.c:154)
    37  XXX.YYY.ZZZ                    0x100e1d6fc mono_exception_new_by_name (in XXX.YYY.ZZZ) (exception.c:64)
    38  XXX.YYY.ZZZ                    0x100e1dbe8 mono_exception_new_by_name_msg (in XXX.YYY.ZZZ) (exception.c:256)
    39  XXX.YYY.ZZZ                    0x100db8c68 mono_error_prepare_exception (in XXX.YYY.ZZZ) (mono-error.c:0)
    40  XXX.YYY.ZZZ                    0x100db8fb8 mono_error_convert_to_exception (in XXX.YYY.ZZZ) (mono-error.c:805)
    41  XXX.YYY.ZZZ                    0x100e1edf0 mono_error_set_pending_exception_slow (in XXX.YYY.ZZZ) (exception.c:1200)
    42  XXX.YYY.ZZZ                    0x100e3f0fc mono_marshal_lookup_pinvoke (in XXX.YYY.ZZZ) (marshal.c:6715)
    43  XXX.YYY.ZZZ                    0x100ee5be4 do_icall (in XXX.YYY.ZZZ) (interp.c:2439)
    44  XXX.YYY.ZZZ                    0x100ee4228 do_icall_wrapper (in XXX.YYY.ZZZ) (interp.c:2537)
    45  XXX.YYY.ZZZ                    0x100ee02d4 mono_interp_exec_method (in XXX.YYY.ZZZ) (interp.c:7338)
    46  XXX.YYY.ZZZ                    0x100edaaf8 interp_runtime_invoke (in XXX.YYY.ZZZ) (interp.c:2272)
    47  XXX.YYY.ZZZ                    0x100eace7c mono_jit_runtime_invoke (in XXX.YYY.ZZZ) (mini-runtime.c:0)
    48  XXX.YYY.ZZZ                    0x100e5ef2c mono_runtime_try_invoke (in XXX.YYY.ZZZ) (object.c:2733)
    49  XXX.YYY.ZZZ                    0x100e5ddcc mono_runtime_class_init_full (in XXX.YYY.ZZZ) (object.c:548)
    50  XXX.YYY.ZZZ                    0x100ef13e0 mono_interp_transform_method (in XXX.YYY.ZZZ) (transform.c:10025)
    51  XXX.YYY.ZZZ                    0x100ee3eb8 do_transform_method (in XXX.YYY.ZZZ) (interp.c:3014)
    52  XXX.YYY.ZZZ                    0x100ee224c mono_interp_exec_method (in XXX.YYY.ZZZ) (interp.c:4538)
    53  XXX.YYY.ZZZ                    0x100edaaf8 interp_runtime_invoke (in XXX.YYY.ZZZ) (interp.c:2272)
    54  XXX.YYY.ZZZ                    0x100eace7c mono_jit_runtime_invoke (in XXX.YYY.ZZZ) (mini-runtime.c:0)
    55  XXX.YYY.ZZZ                    0x100e5ef2c mono_runtime_try_invoke (in XXX.YYY.ZZZ) (object.c:2733)
    56  XXX.YYY.ZZZ                    0x100e5ddcc mono_runtime_class_init_full (in XXX.YYY.ZZZ) (object.c:548)
    57  XXX.YYY.ZZZ                    0x100ef13e0 mono_interp_transform_method (in XXX.YYY.ZZZ) (transform.c:10025)
    58  XXX.YYY.ZZZ                    0x100ee3eb8 do_transform_method (in XXX.YYY.ZZZ) (interp.c:3014)
    59  XXX.YYY.ZZZ                    0x100ee224c mono_interp_exec_method (in XXX.YYY.ZZZ) (interp.c:4538)
    60  XXX.YYY.ZZZ                    0x100edaaf8 interp_runtime_invoke (in XXX.YYY.ZZZ) (interp.c:2272)
    61  XXX.YYY.ZZZ                    0x100eace7c mono_jit_runtime_invoke (in XXX.YYY.ZZZ) (mini-runtime.c:0)
    62  XXX.YYY.ZZZ                    0x100e5ef2c mono_runtime_try_invoke (in XXX.YYY.ZZZ) (object.c:2733)
    63  XXX.YYY.ZZZ                    0x100e60bb0 mono_runtime_invoke (in XXX.YYY.ZZZ) (object.c:2659)
    64  XXX.YYY.ZZZ                    0x100d975a4 xamarin_bridge_call_runtime_initialize (in XXX.YYY.ZZZ) (monovm-bridge.m:137)
    65  XXX.YYY.ZZZ                    0x100d8fb54 xamarin_initialize (in XXX.YYY.ZZZ) (runtime.m:1148)
    66  XXX.YYY.ZZZ                    0x100d98310 xamarin_main (in XXX.YYY.ZZZ) (monotouch-main.m:413)
    67  XXX.YYY.ZZZ                    0x100f122fc main (in XXX.YYY.ZZZ) (main.arm64.mm:81)
    68  dyld                                  0x192619c1c start + 6927
    
    Thread 1 name:  SGen worker
    Thread 1:
    0   libsystem_kernel.dylib                0x2449dc5e8 __psynch_cvwait + 8
    1   libsystem_pthread.dylib               0x1f4bd2b48 _pthread_cond_wait + 979
    2   XXX.YYY.ZZZ                    0x100dfbc3c 0x100d5c000 + 654396
    3   libsystem_pthread.dylib               0x1f4bd4438 _pthread_start + 135
    4   libsystem_pthread.dylib               0x1f4bd08cc thread_start + 7
    
    Thread 2:
    
    Thread 0 crashed with ARM Thread State (64-bit):
        x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
        x4: 0xffffffff91f3902e   x5: 0x0000000000000018   x6: 0x000000016f09c830   x7: 0x000000016f09bf10
        x8: 0x2da91c8730a030c1   x9: 0x2da91c86ce3a5101  x10: 0x0000000000000002  x11: 0x00000000fffffffd
       x12: 0x0000000000000000  x13: 0x0000000000000000  x14: 0x0000000000000000  x15: 0x0000000000000000
       x16: 0x0000000000000148  x17: 0x00000001fe9a61c0  x18: 0x0000000000000000
       x19: 0x0000000000000006  x20: 0x0000000000000103  x21: 0x00000001fe9a62a0
       x22: 0x0000000100e2bba4  x23: 0x0000000101280860  x24: 0x0000000000000006
       x25: 0x000000016f09d780  x26: 0x0000000100ff9de8  x27: 0x0000000146120e80
       x28: 0x0000000101280830   fp: 0x000000016f09c840   lr: 0x00000001f4bd77dc
        sp: 0x000000016f09c820   pc: 0x00000002449e11d0 cpsr: 0x40000000
       far: 0x0000000000000000  esr: 0x56000080 (Syscall)
    
    Binary Images:
           0x100d5c000 -        0x100ff3fff XXX.YYY.ZZZ arm64  <78a1eb7c2566399089a48ea7593a8d42> /private/var/containers/Bundle/Application/A7AFD73A-2347-47E3-87E3-79FA80B02BB7/XXX.YYY.ZZZ.app/XXX.YYY.ZZZ
           0x2449d6000 -        0x244a11ae7 libsystem_kernel.dylib arm64e  <eb06421e7aa8303faaabb7501b063f9d> /usr/lib/system/libsystem_kernel.dylib
           0x1f4bd0000 -        0x1f4bdc4ef libsystem_pthread.dylib arm64e  <9e89e20fcf2d31a9a23f158eb5a0affe> /usr/lib/system/libsystem_pthread.dylib
           0x1a151b000 -        0x1a159a1b7 libsystem_c.dylib arm64e  <2d1e74c15d0335aeb31babe7286be166> /usr/lib/system/libsystem_c.dylib
           0x2b61d9000 -        0x2b61e1433 libsystem_platform.dylib arm64e  <bdcdc3c3cfac3030958f49047f12c464> /usr/lib/system/libsystem_platform.dylib
           0x192615000 -        0x1926ba17f dyld arm64e  <41de795b928337fd917ed674bb73f541> /usr/lib/dyld
                   0x0 - 0xffffffffffffffff ??? unknown-arch  <00000000000000000000000000000000> ???
    
    EOF
    
  6. added a commit that references this issue on Jul 1, 2026
    96a8688
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions