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

Crashed:: Dispatch queue: com.yannickloriot.asyncqueue randomly #7169

Closed
owenzhao opened this issue Mar 7, 2021 · 3 comments
Closed

Crashed:: Dispatch queue: com.yannickloriot.asyncqueue randomly #7169

owenzhao opened this issue Mar 7, 2021 · 3 comments
Assignees

Comments

@owenzhao
Copy link

owenzhao commented Mar 7, 2021

!!! MANDATORY TO FILL OUT !!!

Goals

Read a property in a Realm Object.

Expected Results

A property read.

Actual Results

App crashed.

Steps for others to Reproduce

Parts of the Crash Log

Process: Poster 2 [555]
Path: /Applications/Poster 2.app/Contents/MacOS/Poster 2
Identifier: com.parussoft.Poster
Version: 2.8.11 (20210228)
App Item ID: 1290194604
App External ID: 840670098
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Poster 2 [555]
User ID: 501

Date/Time: 2021-03-07 15:58:51.281 +0800
OS Version: macOS 11.2.2 (20D80)
Report Version: 12
Anonymous UUID: AD850017-567A-FF99-4F9D-76EE552DECAA

Sleep/Wake UUID: EC887A3F-0A49-4947-9112-5FCA46E68DBC

Time Awake Since Boot: 45000 seconds
Time Since Wake: 1200 seconds

System Integrity Protection: enabled

Crashed Thread: 3 Dispatch queue: com.yannickloriot.asyncqueue

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information:
abort() called

Thread 3 Crashed:: Dispatch queue: com.yannickloriot.asyncqueue
0 libsystem_kernel.dylib 0x00007fff20372462 pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff203a0610 pthread_kill + 263
2 libsystem_c.dylib 0x00007fff202f3720 abort + 120
3 org.cocoapods.Realm.macosx 0x000000010b038ef9 please_report_this_issue_in_github_realm_realm_core + 9
4 org.cocoapods.Realm.macosx 0x000000010b03925d realm::util::terminate_internal(std::*1::basic_stringstream<char, std::*1::char_traits, std::1::allocator >&) + 317
5 org.cocoapods.Realm.macosx 0x000000010b03943b realm::util::terminate(char const
, char const
, long, std::initializer_listrealm::util::Printable&&) + 395
6 org.cocoapods.Realm.macosx 0x000000010aeb9f67 void realm::util::terminate<unsigned long long, long>(char const
, char const
, long, unsigned long long, long) + 55
7 org.cocoapods.Realm.macosx 0x000000010af771d1 realm::StringData realm::Obj::_getrealm::StringData(realm::ColKey::Idx) const + 737
8 org.cocoapods.Realm.macosx 0x000000010ad40480 objc_object* (anonymous namespace)::getBoxedrealm::StringData(RLMObjectBase*, unsigned long) + 114 (RLMAccessor.mm:93) [inlined]
9 org.cocoapods.Realm.macosx 0x000000010ad40480 ZN12_GLOBAL__N_115makeBoxedGetterIN5realm10StringDataEEEP11objc_objectm_block_invoke + 139 (RLMAccessor.mm:262)
10 com.parussoft.Poster 0x000000010abb9608 specialized closure #1 in PostQueue.prepareStatus(for:) + 328 (PostQueue.swift:208)
11 com.parussoft.Poster 0x000000010abb8db2 specialized PostQueue.prepareStatus(for:) + 15 (PostQueue.swift:206) [inlined]
12 com.parussoft.Poster 0x000000010abb8db2 specialized PostQueue.getStatus(for:) + 43 (PostQueue.swift:138) [inlined]
13 com.parussoft.Poster 0x000000010abb8db2 specialized PostQueue.postStatus(to:) + 43 (PostQueue.swift:130) [inlined]
14 com.parussoft.Poster 0x000000010abb8db2 specialized closure #2 in PostQueue.run() + 43 (PostQueue.swift:83) [inlined]
15 com.parussoft.Poster 0x000000010abb8db2 thunk for @callee_guaranteed (@guaranteed Account) -> (@error @owned Error) + 43 [inlined]
16 com.parussoft.Poster 0x000000010abb8db2 specialized Sequence.forEach(
:) + 43 [inlined]
17 com.parussoft.Poster 0x000000010abb8db2 specialized PostQueue.run() + 2418 (PostQueue.swift:82)
18 com.parussoft.Poster 0x000000010abb378b closure #2 in PostViewController2.postButtonClicked(
:) + 507 (PostViewController2.swift:213)
19 org.cocoapods.AwaitKit.macosx 0x000000010ac4cdac thunk for @escaping @callee_guaranteed () -> (@error @owned Error) + 12
20 org.cocoapods.AwaitKit.macosx 0x000000010ac4c7c1 partial apply for thunk for @escaping @callee_guaranteed () -> (@error @owned Error) + 17
21 org.cocoapods.PromiseKit.macosx 0x000000010ac946a2 closure #1 in OS_dispatch_queue.async(
:group:qos🎏execute:) + 130 (Promise.swift:167)
22 org.cocoapods.PromiseKit.macosx 0x000000010ac7524e thunk for @escaping @callee_guaranteed () -> () + 14
23 libdispatch.dylib 0x00007fff202021d5 _dispatch_block_async_invoke2 + 83
24 libdispatch.dylib 0x00007fff201f57c7 _dispatch_client_callout + 8
25 libdispatch.dylib 0x00007fff201f8195 _dispatch_continuation_pop + 423
26 libdispatch.dylib 0x00007fff201f7868 _dispatch_async_redirect_invoke + 713
27 libdispatch.dylib 0x00007fff20204857 _dispatch_root_queue_drain + 326
28 libdispatch.dylib 0x00007fff20204fb8 _dispatch_worker_thread2 + 92
29 libsystem_pthread.dylib 0x00007fff2039d453 _pthread_wqthread + 244
30 libsystem_pthread.dylib 0x00007fff2039c467 start_wqthread + 15

Thread 3 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x000070000a81d000 rcx: 0x000070000a81bc38 rdx: 0x0000000000000000
rdi: 0x000000000001fe67 rsi: 0x0000000000000006 rbp: 0x000070000a81bc60 rsp: 0x000070000a81bc38
r8: 0x0000000000008009 r9: 0x0000000000000000 r10: 0x000070000a81d000 r11: 0x0000000000000246
r12: 0x000000000001fe67 r13: 0x000000010b328678 r14: 0x0000000000000006 r15: 0x0000000000000016
rip: 0x00007fff20372462 rfl: 0x0000000000000246 cr2: 0x000000010e982000

Logical CPU: 0
Error Code: 0x02000148
Trap Number: 133

Thread 3 instruction stream not available.

Thread 3 last branch register state not available.

Code Sample

A simple sample.

    let type = AccountType(rawValue: account.type)! // the line sometimes crashed

    public enum AccountType:String {
        case weibo
        case twitter
        case facebook
        case identity
    }

    class Account:Object, AccountCore {
        @objc dynamic var pKey:String = ""
        @objc dynamic var type:String = AccountType.weibo.rawValue {
            didSet {
                updatePKey()
            }
        }
        @objc dynamic var id:Int64 = 0 {
            didSet {
                updatePKey()
            }
        }
        
        override static func primaryKey() -> String? {
            return "pKey"
        }
        
        func updatePKey() {
            pKey = "\(type):\(id)"
        }
        
        override func isEqual(_ object: Any?) -> Bool {
            guard let account = object as? Account else {
                return false
            }
            
            return self == account
        }
        
        static func == (lhs:Account, rhs:Account) -> Bool {
            return lhs.pKey == rhs.pKey
        }
    }
    e account.type
    (String) $R0 = "twitter"

    e account.type 
    (String) $R2 = "weibo"

If it crash, it will crash on the weibo part. There are two accounts, twitter account is sent first and then weibo account is sent next.

Version of Realm and Tooling

Realm framework version: ?
Realm 10.7.0

Xcode version: ?
Xcode 12.4 (12D4e)

iOS/OSX version: ?
macOS Big Sur 11.2.2 (20D80)

Dependency manager + version: ?
CocoaPods 1.10.1

@dianaafanador3
Copy link
Contributor

Hi @owenzhao can you update to latest ream version 10.7.2 there are some issues regarding background writing fixed on our latest releases.

@owenzhao
Copy link
Author

@dianaafanador3 Sure. However, since the issue is random, I can not for sure immediately whether the issue is fixed or not. It may take days even weeks to find out.

@dianaafanador3
Copy link
Contributor

Hi @owenzhao I'm gonna close this for now, if you do get a crash later on, you can open it again and we'll take a look.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants