![]() ![]() What sort of code smells might cause such a retain overflow? Adding a particular Swift object or struct to too many Arrays? My code has a lot of recursive calls.How many retains is "too many"? 64,000? 2 billion? I searched around apple/swift for swift_abortRetainOverflow but wasn't able to discover the answer to this question.I think if I'm going to resolve this issue it's most likely going to be by methodically changing every portion of the code that could potentially cause such a retain overflow. To date all development has been on Linux command line. The server's requests require access keys and IP whitelisting that my MacBook does not have.Currently the code doesn't compile on macOS due to differences in the standard library across platforms.Would this prevent the error from occurring? ![]() I might potentially dramatically reduce the number of connections the server is set to handle. My MacBook doesn't have the CPU capability to run the server.Will I have to run it for 3.5 days to encounter the same error?.This is extremely difficult for a handful of reasons: The intuition is to run my server in Xcode's memory analyzer. It appears to be this call in apple/swift. A google search for "Object was retained too many times" gives exactly 5 results, only 3 of them in English. Unfortunately from the stack trace I can't tell what was being retained. After 3.5 days of successful operation, one of the longest uptimes yet, I got this fatal error and stack trace: Fatal error: Object was retained too many timesCurrent stack trace:Ġ libswiftCore.so 0x00007f9043a73140 swift_reportError + 50ġ libswiftCore.so 0x00007f9043a7321d + 4608541Ģ libswiftCore.so 0x00007f9043a73354 + 4608852ģ libswiftCore.so 0x00007f9043a976b9 + 4757177Ĥ libswiftCore.so 0x00007f9043a73fe0 swift_retain + 86 I have a long-running server written in Swift, using SwiftNIO. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |