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

often crash when save file #458

Closed
y500 opened this issue Sep 6, 2023 · 10 comments
Closed

often crash when save file #458

y500 opened this issue Sep 6, 2023 · 10 comments

Comments

@y500
Copy link

y500 commented Sep 6, 2023

with xcode14.1 and latest version of InjectionIII
console log:

/Library/Caches/com.apple.xbs/Sources/swiftlang/swift/lib/Demangling/Demangler.cpp:344: assertion failed for Node 0x7ff7b1df5738: Child
/Library/Caches/com.apple.xbs/Sources/swiftlang/swift/lib/Demangling/Demangler.cpp:344: Node 0x7ff7b1df5738 is:
kind=TypeMangling
CoreSimulator 905.2 - Device: iPhone 14 Pro (608365A4-77BC-4ABD-9282-B35DE5A7FE76) - Runtime: iOS 16.1 (20B72) - DeviceType: iPhone 14 Pro

@johnno1962
Copy link
Owner

johnno1962 commented Sep 6, 2023

Hi which version of Xcode is this? Are you able to upload the stack trace/crash file? Can you try the new release candidate 4.7.3? https://github.com/johnno1962/InjectionIII/releases/tag/4.7.3

@y500
Copy link
Author

y500 commented Sep 7, 2023

yes, version of 4.7.3.

@y500
Copy link
Author

y500 commented Sep 7, 2023

Here is the crash stack trace:

> warning: sample was compiled with optimization - stepping may behave oddly; variables may not be available.
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00007ff834be61f2 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007ff834c3eee6 libsystem_pthread.dylib`pthread_kill + 263
    frame #2: 0x00007ff800132fe0 libsystem_c.dylib`abort + 130
    frame #3: 0x00007ff80da868ab libswiftCore.dylib`demangleFatal(unsigned int, char const*, __va_list_tag*) + 123
    frame #4: 0x00007ff80da8682e libswiftCore.dylib`swift::Demangle::__runtime::fatal(unsigned int, char const*, ...) + 126
    frame #5: 0x00007ff80da4815a libswiftCore.dylib`swift::Demangle::__runtime::failAssert(char const*, unsigned int, swift::Demangle::__runtime::Node*, char const*) + 90
    frame #6: 0x00007ff80da4902b libswiftCore.dylib`swift::Demangle::__runtime::Node::addChild(swift::Demangle::__runtime::Node*, swift::Demangle::__runtime::NodeFactory&) + 603
    frame #7: 0x00007ff80da18183 libswiftCore.dylib`copyGenericClassObjCName(swift::TargetClassMetadata<swift::InProcess, swift::TargetAnyClassMetadataObjCInterop<swift::InProcess> >*) + 195
    frame #8: 0x00007ff8000392c5 libobjc.A.dylib`objc_class::installMangledNameForLazilyNamedClass() + 111
    frame #9: 0x00007ff80003e7dc libobjc.A.dylib`objc_class::demangledName(bool) + 80
    frame #10: 0x000000012ed121f8 iOSInjection`function signature specialization <Arg[1] = Dead> of static iOSInjection.SwiftInjection.versions(of: Swift.AnyObject.Type) -> Swift.Array<Swift.AnyObject.Type> + 200
    frame #11: 0x000000012ed0bef4 iOSInjection`static iOSInjection.SwiftInjection.inject(tmpfile: Swift.String, newClasses: Swift.Array<Swift.AnyObject.Type>) throws -> () + 852
    frame #12: 0x000000012ed1b148 iOSInjection`closure #9 (__C.NSArray, Swift.String) -> () in iOSInjection.StandaloneInjection.runInBackground() -> () + 1640
    frame #13: 0x000000012ed1b6ae iOSInjection`partial apply forwarder for closure #9 (__C.NSArray, Swift.String) -> () in iOSInjection.StandaloneInjection.runInBackground() -> () + 46
    frame #14: 0x000000012ecd73c6 iOSInjection`iOSInjection.FileWatcher.filesChanged(changes: __C.NSArray) -> () + 1510
    frame #15: 0x000000012ecd7c37 iOSInjection`partial apply forwarder for closure #1 @Swift.MainActor () -> () in closure #1 (Swift.OpaquePointer, Swift.Optional<Swift.UnsafeMutableRawPointer>, Swift.Int, Swift.UnsafeMutableRawPointer, Swift.UnsafePointer<Swift.UInt32>, Swift.UnsafePointer<Swift.UInt64>) -> () in closure #1 (Swift.UInt64) -> () in iOSInjection.FileWatcher.init(roots: Swift.Array<Swift.String>, callback: (__C.NSArray, Swift.String) -> ()) -> iOSInjection.FileWatcher + 23
    frame #16: 0x000000012ed0a9f9 iOSInjection`reabstraction thunk helper from @escaping @callee_guaranteed () -> () to @escaping @callee_unowned @convention(block) () -> () + 25
    frame #17: 0x0000000114598d18 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #18: 0x0000000114599f5b libdispatch.dylib`_dispatch_client_callout + 8
    frame #19: 0x00000001145aad55 libdispatch.dylib`_dispatch_main_queue_drain + 1463
    frame #20: 0x00000001145aa790 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 31
    frame #21: 0x00007ff800386b6f CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    frame #22: 0x00007ff800381486 CoreFoundation`__CFRunLoopRun + 2482
    frame #23: 0x00007ff8003806f7 CoreFoundation`CFRunLoopRunSpecific + 560
    frame #24: 0x00007ff809c5c28a GraphicsServices`GSEventRunModal + 139
    frame #25: 0x000000011be8a62b UIKitCore`-[UIApplication _run] + 994
    frame #26: 0x000000011be8f547 UIKitCore`UIApplicationMain + 123
  * frame #27: 0x000000010c9470d8 sample`main(argc=1, argv=0x00007ff7b72ab348) at main.m:43:16 [opt]
    frame #28: 0x00000001108912bf dyld_sim`start_sim + 10
    frame #29: 0x000000011f86e41f dyld`start + 1903

@johnno1962
Copy link
Owner

johnno1962 commented Sep 7, 2023

Thanks, the stack track is very useful, this is something to do with injecting a generic class in your app. Let me think about how to track this down. This is something that usually works but intermittently fails? Does this always happen injecting one particular file?

@y500
Copy link
Author

y500 commented Sep 8, 2023

Yes, it usually works but intermittently fails before.
But from a couple of days ago, it has become crashing so often that I almost can't use it.
And I can't figure out if that was because of injecting one particular file or not.

@johnno1962
Copy link
Owner

It would most likely be related to the file you're injecting. Let me see if there is something I can do or you could try a recent Xcode (15)?

@y500
Copy link
Author

y500 commented Sep 11, 2023

ok, thank u very much.

@johnno1962
Copy link
Owner

johnno1962 commented Sep 11, 2023

The only thing I could do at this point is a "TeamView" session to review the code being injected and see if there is anything I can do to avoid the crash. If this is possible, email your details through to github at johnholdsworth.com.

@y500
Copy link
Author

y500 commented Sep 22, 2023

I would like to but I can't do that, cause it is not a personal project, and thank you all the same.

@y500 y500 closed this as completed Sep 22, 2023
@johnno1962
Copy link
Owner

I've uploaded a new release candidate https://github.com/johnno1962/InjectionIII/releases/tag/4.7.4RC2 if you'd like to try it out to see if it is more reliable. If you could get back to me a little more quickly that would help me resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants