pointfreeco / swift-composable-architecture

A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.
https://www.pointfree.co/collections/composable-architecture
MIT License
12.35k stars 1.44k forks source link

App freeze when send action in iOS simulator 15.0 if debugger is not attached #2453

Closed dwirandyh closed 1 year ago

dwirandyh commented 1 year ago

Description

Hello guys,

i'm new adopter in the composable architecture, the architecture seems good to me, but i face problem when i build and run my application to iOS simulator 15.0 it work fine my app can run perfectly, but if i stop running xcode and start my app directly by tapping app icon in simulator the app start freezing when i start to send action.

I don't know why, i also try provided example Search Project from this repostitory, it also freeze when i directly open the app from simulator by tapping app icon (without running xcode build & run)

I want to know why and how to solve this, does it will freeze as well in real device, since my application deployment target is 15.0 and i can did not have the device with iOS 15.0 to test it

Here is log file that i got when running the app

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Incident Identifier: 36DB9CF2-9295-447C-B846-3CE86ADBDCA2
CrashReporter Key:   AB298619-58B2-EAD9-670E-A937D1544BA9
Hardware Model:      MacBookPro18,1
Process:             Search [12075]
Path:                /Users/USER/Library/Developer/CoreSimulator/Devices/AC2344A6-3420-4BDF-87A5-9FA088C8849F/data/Containers/Bundle/Application/C615A1E2-3EF3-41F1-AD3C-931BE7B99F4A/Search.app/Search
Identifier:          co.pointfree.Search
Version:             1.0 (1)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd_sim [11538]
Coalition:           com.apple.CoreSimulator.SimDevice.AC2344A6-3420-4BDF-87A5-9FA088C8849F [1149]
Responsible Process: SimulatorTrampoline [1684]

Date/Time:           2023-09-13 09:35:17.5615 +0700
Launch Time:         2023-09-13 09:35:04.9137 +0700
OS Version:          macOS 13.4 (22F66)
Release Type:        User
Report Version:      104

Exception Type:  EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: FRONTBOARD 2343432205 
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:[application<co.pointfree.Search>:12075] failed to terminate gracefully after 5.0s
ProcessVisibility: Unknown
ProcessState: Running
WatchdogEvent: process-exit
WatchdogVisibility: Background
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 17.090 (user 10.320, system 6.770), 31% CPU",
"Elapsed application CPU time (seconds): 4.713, 9% CPU"
) reportType:CrashLog maxTerminationResistance:Interactive>

Triggered by Thread:  0

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib                 0x1c7f861fc syscall_thread_switch + 8
1   libdispatch.dylib                      0x180122b38 __DISPATCH_WAIT_FOR_ENQUEUER__ + 44
2   libdispatch.dylib                      0x180117f44 _dispatch_main_queue_callback_4CF + 592
3   CoreFoundation                         0x18034fc34 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
4   CoreFoundation                         0x18034a1a4 __CFRunLoopRun + 2448
5   CoreFoundation                         0x180349308 CFRunLoopRunSpecific + 572
6   GraphicsServices                       0x18bf025ec GSEventRunModal + 160
7   UIKitCore                              0x184d3b4e0 -[UIApplication _run] + 992
8   UIKitCore                              0x184d3ffc0 UIApplicationMain + 112
9   SwiftUI                                0x1b93bed98 closure #1 in KitRendererCommon(_:) + 160
10  SwiftUI                                0x1b93becf4 runApp<A>(_:) + 164
11  SwiftUI                                0x1b8e12fb0 static App.main() + 80
12  Search                                 0x100763154 static SearchApp.$main() + 160 (SearchApp.swift:4)
13  Search                                 0x10076320c main + 12
14  dyld_sim                               0x101059c04 start_sim + 20
15  dyld                                   0x101161f28 start + 2236

Thread 1:
0   libsystem_pthread.dylib                0x1c7fde634 start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib                0x1c7fde634 start_wqthread + 0

Thread 3:: com.apple.uikit.eventfetch-thread
0   libsystem_kernel.dylib                 0x1c7f86190 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x1c7f97258 mach_msg2_internal + 76
2   libsystem_kernel.dylib                 0x1c7f8e398 mach_msg_overwrite + 540
3   libsystem_kernel.dylib                 0x1c7f86500 mach_msg + 20
4   CoreFoundation                         0x18034f770 __CFRunLoopServiceMachPort + 368
5   CoreFoundation                         0x180349c84 __CFRunLoopRun + 1136
6   CoreFoundation                         0x180349308 CFRunLoopRunSpecific + 572
7   Foundation                             0x180810a68 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232
8   Foundation                             0x180810d20 -[NSRunLoop(NSRunLoop) runUntilDate:] + 88
9   UIKitCore                              0x184def638 -[UIEventFetcher threadMain] + 472
10  Foundation                             0x18083a4f4 __NSThread__start__ + 772
11  libsystem_pthread.dylib                0x1c7fe3428 _pthread_start + 116
12  libsystem_pthread.dylib                0x1c7fde648 thread_start + 8

Thread 4:
0   libsystem_pthread.dylib                0x1c7fde634 start_wqthread + 0

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000004   x2: 0x00000000037c3fa4   x3: 0x0000000000000001
    x4: 0x0000000000000000   x5: 0x0000000000000819   x6: 0x0000000000000000   x7: 0x0000000000000000
    x8: 0x0000000000000000   x9: 0x0000000000000000  x10: 0xfffffffe7fe6d42b  x11: 0x0000000500000000
   x12: 0x0080000000000000  x13: 0x0000004000000001  x14: 0x0060001500001f01  x15: 0x0060001500001f01
   x16: 0xffffffffffffffc3  x17: 0x0060001500001f01  x18: 0x0000000000000000  x19: 0x000000014651d740
   x20: 0x00000000037c3fa4  x21: 0x00000001da81b370  x22: 0x0000000000000000  x23: 0x00000001d6408d40
   x24: 0x000000000000000f  x25: 0x000000014651d730  x26: 0x0000000000000000  x27: 0x0000000000000000
   x28: 0x0000000000000000   fp: 0x000000016f6ad340   lr: 0x0000000180122b38
    sp: 0x000000016f6ad330   pc: 0x00000001c7f861fc cpsr: 0x60001000
   far: 0x000000016be0f7d8  esr: 0x56000080  Address size fault

Binary Images:
       0x10115c000 -        0x1011ebfff dyld (*) <bd993f39-c902-37d6-8bd8-6d827c7f121e> /usr/lib/dyld
       0x101058000 -        0x101093fff dyld_sim (*) <cc38080d-7c09-357a-b552-db1b456781ce> /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim
       0x100750000 -        0x100a1ffff co.pointfree.Search (1.0) <2b456848-c867-3380-a86e-078be974106f> /Users/USER/Library/Developer/CoreSimulator/Devices/AC2344A6-3420-4BDF-87A5-9FA088C8849F/data/Containers/Bundle/Application/C615A1E2-3EF3-41F1-AD3C-931BE7B99F4A/Search.app/Search
       0x1010f0000 -        0x1010fbfff libobjc-trampolines.dylib (*) <a93817cc-8f74-3435-a719-034429e1417c> /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc-trampolines.dylib
       0x1c7f85000 -        0x1c7fbcfff libsystem_kernel.dylib (*) <f91811dc-efe8-3dfa-9553-71defa7ed45f> /usr/lib/system/libsystem_kernel.dylib
       0x180107000 -        0x180149fff libdispatch.dylib (*) <0d3a8420-f29e-3699-aa94-3597b8eca236> /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdispatch.dylib
       0x1802cb000 -        0x180677fff com.apple.CoreFoundation (6.9) <6cbe5db0-f3ed-3227-a6b6-df5dbe7642aa> /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
       0x18beff000 -        0x18bf07fff com.apple.GraphicsServices (1.0) <5de73649-0b11-3099-9a52-7ce3c01a8d93> /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
       0x184137000 -        0x1855b7fff com.apple.UIKitCore (1.0) <5cb38825-44d8-33eb-b2f4-90e8d179c29e> /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
       0x1b8a25000 -        0x1b97e4fff com.apple.SwiftUI (3.0.67.0.102) <9ea09c48-18ac-31b7-bb1a-12fa6e66f3f3> /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/SwiftUI.framework/SwiftUI
       0x1c7fdc000 -        0x1c7fe8fff libsystem_pthread.dylib (*) <ba7c01fe-353b-3146-a7c6-f2bb8a0fa842> /usr/lib/system/libsystem_pthread.dylib
       0x1806ea000 -        0x1809a9fff com.apple.Foundation (6.9) <e14c8373-8298-3e74-afc5-61dddc413228> /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation

EOF

-----------
Full Report
-----------

{"app_name":"Search","timestamp":"2023-09-13 09:35:17.00 +0700","app_version":"1.0","slice_uuid":"2b456848-c867-3380-a86e-078be974106f","build_version":"1","platform":7,"bundleID":"co.pointfree.Search","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 13.4 (22F66)","roots_installed":0,"name":"Search","incident_id":"36DB9CF2-9295-447C-B846-3CE86ADBDCA2"}
{
  "uptime" : 1000,
  "procRole" : "Foreground",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "MacBookPro18,1",
  "coalitionID" : 1149,
  "osVersion" : {
    "train" : "macOS 13.4",
    "build" : "22F66",
    "releaseType" : "User"
  },
  "captureTime" : "2023-09-13 09:35:17.5615 +0700",
  "incident" : "36DB9CF2-9295-447C-B846-3CE86ADBDCA2",
  "pid" : 12075,
  "translated" : false,
  "cpuType" : "ARM-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2023-09-13 09:35:04.9137 +0700",
  "procStartAbsTime" : 25275311545,
  "procExitAbsTime" : 25578769983,
  "procName" : "Search",
  "procPath" : "\/Users\/USER\/Library\/Developer\/CoreSimulator\/Devices\/AC2344A6-3420-4BDF-87A5-9FA088C8849F\/data\/Containers\/Bundle\/Application\/C615A1E2-3EF3-41F1-AD3C-931BE7B99F4A\/Search.app\/Search",
  "bundleInfo" : {"CFBundleShortVersionString":"1.0","CFBundleVersion":"1","CFBundleIdentifier":"co.pointfree.Search"},
  "storeInfo" : {"deviceIdentifierForVendor":"760ED7CF-A1DF-55E6-BF8C-C889D01B30BB","thirdParty":true},
  "parentProc" : "launchd_sim",
  "parentPid" : 11538,
  "coalitionName" : "com.apple.CoreSimulator.SimDevice.AC2344A6-3420-4BDF-87A5-9FA088C8849F",
  "crashReporterKey" : "AB298619-58B2-EAD9-670E-A937D1544BA9",
  "responsiblePid" : 1684,
  "responsibleProc" : "SimulatorTrampoline",
  "codeSigningID" : "co.pointfree.Search",
  "codeSigningTeamID" : "",
  "codeSigningFlags" : 570425861,
  "codeSigningValidationCategory" : 10,
  "codeSigningTrustLevel" : 0,
  "sip" : "enabled",
  "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGKILL"},
  "termination" : {"code":2343432205,"flags":6,"namespace":"FRONTBOARD","reasons":["<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:[application<co.pointfree.Search>:12075] failed to terminate gracefully after 5.0s","ProcessVisibility: Unknown","ProcessState: Running","WatchdogEvent: process-exit","WatchdogVisibility: Background","WatchdogCPUStatistics: (","\"Elapsed total CPU time (seconds): 17.090 (user 10.320, system 6.770), 31% CPU\",","\"Elapsed application CPU time (seconds): 4.713, 9% CPU\"",") reportType:CrashLog maxTerminationResistance:Interactive>"]},
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":68,"task_for_pid":7},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":61155,"threadState":{"x":[{"value":0},{"value":4},{"value":58474404},{"value":1},{"value":0},{"value":2073},{"value":0},{"value":0},{"value":0},{"value":0},{"value":18446744067265451051},{"value":21474836480},{"value":36028797018963968},{"value":274877906945},{"value":27021687958544129},{"value":27021687958544129},{"value":18446744073709551555},{"value":27021687958544129},{"value":0},{"value":5474735936},{"value":58474404},{"value":7960900464,"symbolLocation":16,"symbol":"taskHeapMetadata"},{"value":0},{"value":7889521984,"symbolLocation":0,"symbol":"_dispatch_main_q"},{"value":15},{"value":5474735920},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6443641656},"cpsr":{"value":1610616832},"fp":{"value":6164239168},"sp":{"value":6164239152},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":7649911292,"matchesCrashFrame":1},"far":{"value":6104872920}},"queue":"com.apple.main-thread","frames":[{"imageOffset":4604,"symbol":"syscall_thread_switch","symbolLocation":8,"imageIndex":4},{"imageOffset":113464,"symbol":"__DISPATCH_WAIT_FOR_ENQUEUER__","symbolLocation":44,"imageIndex":5},{"imageOffset":69444,"symbol":"_dispatch_main_queue_callback_4CF","symbolLocation":592,"imageIndex":5},{"imageOffset":543796,"symbol":"__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__","symbolLocation":12,"imageIndex":6},{"imageOffset":520612,"symbol":"__CFRunLoopRun","symbolLocation":2448,"imageIndex":6},{"imageOffset":516872,"symbol":"CFRunLoopRunSpecific","symbolLocation":572,"imageIndex":6},{"imageOffset":13804,"symbol":"GSEventRunModal","symbolLocation":160,"imageIndex":7},{"imageOffset":12600544,"symbol":"-[UIApplication _run]","symbolLocation":992,"imageIndex":8},{"imageOffset":12619712,"symbol":"UIApplicationMain","symbolLocation":112,"imageIndex":8},{"imageOffset":10067352,"symbol":"closure #1 in KitRendererCommon(_:)","symbolLocation":160,"imageIndex":9},{"imageOffset":10067188,"symbol":"runApp<A>(_:)","symbolLocation":164,"imageIndex":9},{"imageOffset":4120496,"symbol":"static App.main()","symbolLocation":80,"imageIndex":9},{"imageOffset":78164,"sourceLine":4,"sourceFile":"SearchApp.swift","symbol":"static SearchApp.$main()","imageIndex":2,"symbolLocation":160},{"imageOffset":78348,"sourceFile":"SearchApp.swift","symbol":"main","symbolLocation":12,"imageIndex":2},{"imageOffset":7172,"symbol":"start_sim","symbolLocation":20,"imageIndex":1},{"imageOffset":24360,"symbol":"start","symbolLocation":2236,"imageIndex":0}]},{"id":61174,"frames":[{"imageOffset":9780,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}]},{"id":61176,"frames":[{"imageOffset":9780,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}]},{"id":61178,"name":"com.apple.uikit.eventfetch-thread","frames":[{"imageOffset":4496,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":4},{"imageOffset":74328,"symbol":"mach_msg2_internal","symbolLocation":76,"imageIndex":4},{"imageOffset":37784,"symbol":"mach_msg_overwrite","symbolLocation":540,"imageIndex":4},{"imageOffset":5376,"symbol":"mach_msg","symbolLocation":20,"imageIndex":4},{"imageOffset":542576,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":368,"imageIndex":6},{"imageOffset":519300,"symbol":"__CFRunLoopRun","symbolLocation":1136,"imageIndex":6},{"imageOffset":516872,"symbol":"CFRunLoopRunSpecific","symbolLocation":572,"imageIndex":6},{"imageOffset":1206888,"symbol":"-[NSRunLoop(NSRunLoop) runMode:beforeDate:]","symbolLocation":232,"imageIndex":11},{"imageOffset":1207584,"symbol":"-[NSRunLoop(NSRunLoop) runUntilDate:]","symbolLocation":88,"imageIndex":11},{"imageOffset":13338168,"symbol":"-[UIEventFetcher threadMain]","symbolLocation":472,"imageIndex":8},{"imageOffset":1377524,"symbol":"__NSThread__start__","symbolLocation":772,"imageIndex":11},{"imageOffset":29736,"symbol":"_pthread_start","symbolLocation":116,"imageIndex":10},{"imageOffset":9800,"symbol":"thread_start","symbolLocation":8,"imageIndex":10}]},{"id":61181,"frames":[{"imageOffset":9780,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4313169920,
    "size" : 589824,
    "uuid" : "bd993f39-c902-37d6-8bd8-6d827c7f121e",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4312104960,
    "size" : 245760,
    "uuid" : "cc38080d-7c09-357a-b552-db1b456781ce",
    "path" : "\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS 15.0.simruntime\/Contents\/Resources\/RuntimeRoot\/usr\/lib\/dyld_sim",
    "name" : "dyld_sim"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4302635008,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "co.pointfree.Search",
    "size" : 2949120,
    "uuid" : "2b456848-c867-3380-a86e-078be974106f",
    "path" : "\/Users\/USER\/Library\/Developer\/CoreSimulator\/Devices\/AC2344A6-3420-4BDF-87A5-9FA088C8849F\/data\/Containers\/Bundle\/Application\/C615A1E2-3EF3-41F1-AD3C-931BE7B99F4A\/Search.app\/Search",
    "name" : "Search",
    "CFBundleVersion" : "1"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4312727552,
    "size" : 49152,
    "uuid" : "a93817cc-8f74-3435-a719-034429e1417c",
    "path" : "\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS 15.0.simruntime\/Contents\/Resources\/RuntimeRoot\/usr\/lib\/libobjc-trampolines.dylib",
    "name" : "libobjc-trampolines.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 7649906688,
    "size" : 229376,
    "uuid" : "f91811dc-efe8-3dfa-9553-71defa7ed45f",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 6443528192,
    "size" : 274432,
    "uuid" : "0d3a8420-f29e-3699-aa94-3597b8eca236",
    "path" : "\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS 15.0.simruntime\/Contents\/Resources\/RuntimeRoot\/usr\/lib\/system\/libdispatch.dylib",
    "name" : "libdispatch.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 6445379584,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.CoreFoundation",
    "size" : 3854336,
    "uuid" : "6cbe5db0-f3ed-3227-a6b6-df5dbe7642aa",
    "path" : "\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS 15.0.simruntime\/Contents\/Resources\/RuntimeRoot\/System\/Library\/Frameworks\/CoreFoundation.framework\/CoreFoundation",
    "name" : "CoreFoundation",
    "CFBundleVersion" : "1854"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 6642724864,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "com.apple.GraphicsServices",
    "size" : 36864,
    "uuid" : "5de73649-0b11-3099-9a52-7ce3c01a8d93",
    "path" : "\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS 15.0.simruntime\/Contents\/Resources\/RuntimeRoot\/System\/Library\/PrivateFrameworks\/GraphicsServices.framework\/GraphicsServices",
    "name" : "GraphicsServices",
    "CFBundleVersion" : "1.0"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 6510833664,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "com.apple.UIKitCore",
    "size" : 21499904,
    "uuid" : "5cb38825-44d8-33eb-b2f4-90e8d179c29e",
    "path" : "\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS 15.0.simruntime\/Contents\/Resources\/RuntimeRoot\/System\/Library\/PrivateFrameworks\/UIKitCore.framework\/UIKitCore",
    "name" : "UIKitCore",
    "CFBundleVersion" : "5067.3.107"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 7392612352,
    "CFBundleShortVersionString" : "3.0.67.0.102",
    "CFBundleIdentifier" : "com.apple.SwiftUI",
    "size" : 14417920,
    "uuid" : "9ea09c48-18ac-31b7-bb1a-12fa6e66f3f3",
    "path" : "\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS 15.0.simruntime\/Contents\/Resources\/RuntimeRoot\/System\/Library\/Frameworks\/SwiftUI.framework\/SwiftUI",
    "name" : "SwiftUI",
    "CFBundleVersion" : "3.0.67.0.102"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 7650263040,
    "size" : 53248,
    "uuid" : "ba7c01fe-353b-3146-a7c6-f2bb8a0fa842",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 6449700864,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.Foundation",
    "size" : 2883584,
    "uuid" : "e14c8373-8298-3e74-afc5-61dddc413228",
    "path" : "\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS 15.0.simruntime\/Contents\/Resources\/RuntimeRoot\/System\/Library\/Frameworks\/Foundation.framework\/Foundation",
    "name" : "Foundation",
    "CFBundleVersion" : "1854"
  }
],
  "sharedCache" : {
  "base" : 6442450944,
  "size" : 2146435072,
  "uuid" : "eb51e136-9e77-3be9-9d45-c0d3bfe7aace"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=895.1M resident=0K(0%) swapped_out_or_unallocated=895.1M(100%)\nWritable regions: Total=610.0M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=610.0M(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nActivity Tracing                   256K        1 \nColorSync                          128K        5 \nCoreAnimation                      304K        4 \nFoundation                          16K        1 \nKernel Alloc Once                   32K        1 \nMALLOC                           213.7M       38 \nMALLOC guard page                  128K        8 \nMALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)\nSTACK GUARD                       56.1M        5 \nStack                             10.1M        5 \nVM_ALLOCATE                       1056K        2 \n__DATA                            15.9M      406 \n__DATA_CONST                      34.7M      407 \n__DATA_DIRTY                        50K        9 \n__FONT_DATA                          4K        1 \n__LINKEDIT                       510.5M        5 \n__OBJC_RO                         61.8M        1 \n__OBJC_RW                         3040K        1 \n__TEXT                           384.6M      415 \n__UNICODE                          588K        1 \ndyld private memory               1568K        5 \nmapped file                      156.7M        8 \nshared memory                       16K        1 \n===========                     =======  ======= \nTOTAL                              1.8G     1331 \nTOTAL, minus reserved VM space     1.4G     1331 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "logWritingSignature" : "40368b710c14f7c82fa849df6f1be471c76a601b",
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "60da5e84ab0ca017dace9abf",
      "factorPackIds" : {

      },
      "deploymentId" : 240000008
    },
    {
      "rolloutId" : "62c74108bcb0435c2153f963",
      "factorPackIds" : {
        "SIRI_TEXT_TO_SPEECH" : "64dab7fd2cc76d455338aa84"
      },
      "deploymentId" : 240000325
    }
  ],
  "experiments" : [
    {
      "treatmentId" : "3a3cf641-8471-4e4e-9ad4-81d0ede970fd",
      "experimentId" : "64a84dae90d82611a0bd7d3d",
      "deploymentId" : 400000004
    },
    {
      "treatmentId" : "d28d100b-301c-49ae-b6c9-57930102d4d4",
      "experimentId" : "64466b09a3b9440a82a18c34",
      "deploymentId" : 400000002
    }
  ]
}
}

Model: MacBookPro18,1, BootROM 8422.121.1, proc 10:8:2 processors, 16 GB, SMC 
Graphics: Apple M1 Pro, Apple M1 Pro, Built-In
Display: Color LCD, 3456 x 2234 Retina, Main, MirrorOff, Online
Memory Module: LPDDR5, Samsung
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4387), wl0: Apr  7 2023 15:18:26 version 20.96.28.1.8.7.146 FWID 01-aff1b48a
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB31Bus
USB Device: USB31Bus
USB Device: USB31Bus
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.

Checklist

Expected behavior

my application will not freeze when i open directly by tapping app icon in simulator

Actual behavior

My application freezes when start to send action to reducer, but it works well when i run my application via xcode Build & Run

Steps to reproduce

  1. Download example project https://github.com/pointfreeco/swift-composable-architecture/tree/main/Examples/Search
  2. Change Minimum Deployment to iOS 15.0
  3. Build and run in Simulator 15.0
  4. Close xcode and open the app again directly by tapping app icon in simulator
  5. Start typing and it will freeze

The Composable Architecture version information

1.2.0

Destination operating system

iOS 15 Simulator

Xcode version information

Xcode 14.3.0

Swift Compiler version information

swift-driver version: 1.75.2 Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100)
Target: arm64-apple-macosx13.0
stephencelis commented 1 year ago

@dwirandyh I can't reproduce this, which makes me think it's an Apple bug or local/temporary build issue, and not a bug with the library. I'm going to convert to a discussion for now, but if there's a reliable reproduction that points to an issue in TCA and not a more general bug in Apple's tools, please open another issue!