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

iOS Crash while selecting a image #2117

Open
ashokkumar-hub opened this issue Dec 18, 2024 · 0 comments
Open

iOS Crash while selecting a image #2117

ashokkumar-hub opened this issue Dec 18, 2024 · 0 comments

Comments

@ashokkumar-hub
Copy link

Version

  • react-native-image-crop-picker v0.41.6
  • react-native v0.76.2

Platform

  • iOS

Expected behaviour

It should hide the image picker modal and update the selected image in state

Actual behaviour

Whenever the image is selected return to app immediately leads to crash

Steps to reproduce

1.Call the api to open image picker to select a image using

const getImagePicker = async () => {
    ImageCropPicker.openPicker({
      cropping: true,
      includeBase64: true,
      includeExif: true,
    })
      .then((result) => {
        if (isImage(result)) {
          setSelectedImage(`data:${result.mime};base64,` + result.data);
          console.log('received base64 image', `data:${result.mime};base64,` + result.data);
        }
      })
      .catch((e) => console.log(e));
  };

stacktrace

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present modally a view controller <RCTRedBoxController: 0x11776ac00> that is already being presented by <UIViewController: 0x103b229a0>.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001804b70ec __exceptionPreprocess + 172
1 libobjc.A.dylib 0x000000018008ede8 objc_exception_throw + 72
2 UIKitCore 0x00000001853472bc -[UIViewController _presentViewController:withAnimationController:completion:] + 4424
3 UIKitCore 0x0000000185347d54 __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 84
4 UIKitCore 0x000000018535ec40 UIVIEWCONTROLLERTRANSITIONCOORDINATOR_IS_EXECUTING_ALONGSIDE_ANIMATION_BLOCK + 28
5 UIKitCore 0x000000018535ecbc -[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] + 116
6 UIKitCore 0x000000018535b648 -[_UIViewControllerTransitionContext _runAlongsideCompletions] + 112
7 UIKitCore 0x000000018535b404 -[_UIViewControllerTransitionContext completeTransition:] + 192
8 UIKitCore 0x0000000185fe0670 -[UITransitionView notifyDidCompleteTransition:] + 176
9 UIKitCore 0x0000000185fe040c -[UITransitionView _didCompleteTransition:] + 848
10 UIKitCore 0x0000000186011ca4 UIVIEW_IS_EXECUTING_ANIMATION_COMPLETION_BLOCK + 28
11 UIKitCore 0x0000000186011efc -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 592
12 UIKitCore 0x0000000185fe83b8 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 212
13 UIKitCore 0x0000000185fe87e0 -[UIViewAnimationState animationDidStop:finished:] + 188
14 UIKitCore 0x0000000185fe8850 -[UIViewAnimationState animationDidStop:finished:] + 300
15 QuartzCore 0x000000018b079b1c _ZL23run_animation_callbacksPv + 128
16 libdispatch.dylib 0x0000000102cba7b8 _dispatch_client_callout + 16
17 libdispatch.dylib 0x0000000102cca45c _dispatch_main_queue_drain + 1224
18 libdispatch.dylib 0x0000000102cc9f84 _dispatch_main_queue_callback_4CF + 40
19 CoreFoundation 0x000000018041ae3c CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12
20 CoreFoundation 0x0000000180415534 __CFRunLoopRun + 1944
21 CoreFoundation 0x0000000180414960 CFRunLoopRunSpecific + 536
22 GraphicsServices 0x0000000190183b10 GSEventRunModal + 160
23 UIKitCore 0x0000000185aa2b40 -[UIApplication _run] + 796
24 UIKitCore 0x0000000185aa6d38 UIApplicationMain + 124
25 Kimbot AI.debug.dylib 0x0000000107a92f6c __debug_main_executable_dylib_entry_point + 96
26 dyld 0x0000000102d55410 start_sim + 20
27 ??? 0x0000000102f9a274 0x0 + 4344881780
)
libc++abi: terminating due to uncaught exception of type NSException

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