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

偶现ZLEditImageViewController.showEditImageVC崩溃 #966

Open
fenglinyunshi opened this issue Jan 13, 2025 · 0 comments
Open

偶现ZLEditImageViewController.showEditImageVC崩溃 #966

fenglinyunshi opened this issue Jan 13, 2025 · 0 comments

Comments

@fenglinyunshi
Copy link

fenglinyunshi commented Jan 13, 2025

Issue Description

友盟崩溃堆栈如下:
Exception Category: signal
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000 at 0x00000001ed58a974
Crashed Thread: 0
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001ed58a974 __pthread_kill + [ : 8]
1 libsystem_pthread.dylib 0x000000020100d0ec pthread_kill + [ : 268]
2 libsystem_c.dylib 0x00000001acfdbb80 abort + [ : 180]
3 libsystem_malloc.dylib 0x00000001b5206c68 malloc_vreport + [ : 896]
4 libsystem_malloc.dylib 0x00000001b5206f10 malloc_zone_error + [ : 104]
5 libsystem_malloc.dylib 0x00000001b51f4a38 free_list_checksum_botch + [ : 40]
6 libsystem_malloc.dylib 0x00000001b51df530 small_free_list_remove_ptr_no_clear + [ : 960]
7 libsystem_malloc.dylib 0x00000001b51e4b08 free_small + [ : 692]
8 CoreFoundation 0x00000001a5032b48 __CFStringDeallocate + [ : 196]
9 CoreFoundation 0x00000001a5032550 _CFRelease + [ : 292]
10 CoreFoundation 0x00000001a5042a48 _CFStringCreateWithFormatAndArgumentsReturningMetadata + [ : 256]
11 CoreFoundation 0x00000001a504293c _CFStringCreateWithFormatAndArgumentsAux2 + [ : 44]
12 Foundation 0x00000001a3ecfbfc +[NSString stringWithFormat:] + [ : 68]
13 UIKitCore 0x00000001a74c8588 -[UIPresentationController _initViewHierarchyForPresentationSuperview:inWindow:] + [ : 392]
14 UIKitCore 0x00000001a732b504 -[UIPresentationController _presentWithAnimationController:inWindow:interactionController:target:didFinish:] + [ : 560]
15 UIKitCore 0x00000001a7a3431c -[UIViewController _presentViewController:modalSourceViewController:presentationController:animationController:interactionController:completion:] + [ : 1156]
16 UIKitCore 0x00000001a7a36b0c -[UIViewController _presentViewController:withAnimationController:completion:] + [ : 3232]
17 UIKitCore 0x00000001a7a37684 __63-[UIViewController _presentViewController:animated:completion:]_block_invoke_2 + [ : 56]
1a72e4280 +[UIView(Animation) performWithoutAnimation:] + [ : 76]
2519 UIKitCore 0x00000001a7a37604 __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + [ : 204]
2620 UIKitCore 0x00000001a7a3788c -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + [ : 484]
2721 UIKitCore 0x00000001a7a374fc -[UIViewController _presentViewController:animated:completion:] + [ : 188]
2822 UIKitCore 0x00000001a7a37948 -[UIViewController presentViewController:animated:completion:] + [ : 164]
2923 ZQMusic 0x0000000105d9ac44 -[UIViewController(SKPresent) SKPresentViewController:animated:completion:] + [UIViewController+SKPresent.m : 0]
24 ZQMusic 0x000000010407fb38 specialized static ZLEditImageViewController.showEditImageVC(parentVC:animate:image:editModel:cancel:completion:) + [ZLEditImageViewController.swift : 0]
25 ZQMusic 0x000000010410cfe4 closure #2 in ZLThumbnailViewController.showEditImageVC(model:) + [ : 336]
26 ZQMusic 0x00000001040a0b98 specialized ZLMainAsync(after:handler:) + [ : 0]
27 ZQMusic 0x00000001040c1748 closure #2 in static ZLPhotoManager.fetchImage(for:size:resizeMode:progress:completion:) + [ZLPhotoManager.swift : 0]

Description and Steps

Please fill in the detailed description of the issue (full output of any stack trace, compiler error, ...) and the steps to reproduce the issue.
image

Info

ZLPhotoBrowser version: e.g. 4.5.7
Device: e.g. iPhone 14 Pro
Device version: e.g. iOS 16.0
Xcode version: e.g. Xcode 14.0

Configuration code of ZLPhotoConfiguration

![image](https://github.com/user-attachments/assets/a05f4f3b-4749-4522-a785-29d84421dc6f)

#import "UIViewController+SKPresent.h"

@implementation UIViewController (SKPresent)

+ (void)load {
 Method originMethod = class_getInstanceMethod(self, @selector(presentViewController:animated:completion:));
 Method swizzledMethod = class_getInstanceMethod(self, @selector(SKPresentViewController:animated:completion:));
 method_exchangeImplementations(originMethod, swizzledMethod);
}

- (void)SKPresentViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)flag completion:(void (^)(void))completion {
 [[NSNotificationCenter defaultCenter] postNotificationName:@"viewControllrIsPresenting" object:nil];
 [self SKPresentViewController:viewControllerToPresent animated:flag completion:completion];
}

@end
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

1 participant