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

[Crash] Attempting to address object pointer with invalid tag #252

Open
xmollv opened this issue Aug 5, 2024 · 8 comments
Open

[Crash] Attempting to address object pointer with invalid tag #252

xmollv opened this issue Aug 5, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@xmollv
Copy link

xmollv commented Aug 5, 2024

🐛 Bug Report

We've been observing a crash, but we're not very clear on why it happens. The crash is the following:

SIGTRAP : Attempting to address object pointer with invalid tag
Queue 7645: com.gphpersistence.saveQueue


Thread 11 Queue 7645: com.gphpersistence.saveQueue (serial) [Crashed]:

0    CoreFoundation                           0x19d32014c     CFGetTypeID.cold.1 + 16
1    CoreFoundation                           0x19d180e58     CFGetTypeID + 239
2    CoreFoundation                           0x19d1c2420     __CFPropertyListIsValidAux + 59
3    CoreFoundation                           0x19d1e4694     CFPropertyListWrite + 91
4    CoreFoundation                           0x19d1e439c     CFPropertyListCreateData + 143
5    Foundation                               0x19c0ed74c     +[NSPropertyListSerialization dataWithPropertyList:format:options:error:] + 51
6    GiphyUISDK                               0x1047c1b44     0x10473c000
7    GiphyUISDK                               0x10475baa0     0x10473c000
8    libdispatch.dylib                        0x1a509013c     _dispatch_call_block_and_release + 31
9    libdispatch.dylib                        0x1a5091dd4     _dispatch_client_callout + 19
10   libdispatch.dylib                        0x1a5099400     _dispatch_lane_serial_drain + 747
11   libdispatch.dylib                        0x1a5099f30     _dispatch_lane_invoke + 379
12   libdispatch.dylib                        0x1a50a4cb4     _dispatch_root_queue_drain_deferred_wlh + 287
13   libdispatch.dylib                        0x1a50a4528     _dispatch_workloop_worker_thread + 403
14   libsystem_pthread.dylib                  0x1fa043934     _pthread_wqthread + 287
15   libsystem_pthread.dylib                  0x1fa0400cc     start_wqthread + 7

I can't get you the symbolicated crash logs because we have the GiphySDK as a dependency to an internal SPM package, and apparently there's a limitation on SPM <> Xcode where the dSYMs are not generated if the SPM package is not explicitly defined as .dynamic, which we can't change at this very moment (I understand that this is far from ideal). See:

To Reproduce

Unknown, but seems related to serializing the last used gifs to be displayed later on. It seems to happen right once the user selects a GIF and we receive the GiphyDelegate callback GiphyDelegate.didSelectMedia(giphyViewController:media:).

Screenshot 2024-08-05 at 10 25 08 Screenshot 2024-08-05 at 10 25 29

Expected behavior

SDK doesn't crash.

Actual Behavior

Sometimes the SDK does crash.

Your Environment

  • Giphy iOS SDK version: 2.2.10
  • Dependency Manager: SPM
  • Xcode Version: 15.4
  • Swift Version: 5.9
  • Device info (Simulator/Device? iOS version? Debug/Release?): Many different iPhones, only observed it on >= iOS 17. We support iOS 16 but I don't see any crashes for this issue from iOS 16 devices.

Reproducible Demo

N/A

@xmollv xmollv added the bug Something isn't working label Aug 5, 2024
@leschlogl
Copy link

Hey @xmollv,

Thank you for flagging this. We'll look into it and get back to you soon.

@msrutek-paylocity
Copy link

Hello @leschlogl any update on this? We're seeing the same crash.

@leschlogl
Copy link

Hi @msrutek-paylocity and @xmollv,

We were able to reproduce and fix the issue. It should be included in the next release. It should be released this or in the next week.

@leschlogl
Copy link

Hello!

We just released v2.2.11 that addresses this issue.

Please, let us know if everything is okay so we can close this issue!

Thank you!

@msrutek-paylocity
Copy link

@leschlogl trying to update to the 2.2.11 version, we get these errors.

Cannot find type 'SwiftUICore' in scope
Failed to build module 'GiphyUISDK'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)', while this compiler is 'Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)'). Please select a toolchain which matches the SDK.
Command SwiftCompile failed with a nonzero exit code

Has the SDK been built with a newer Swift version? This feels like a breaking change 🤔

@xmollv
Copy link
Author

xmollv commented Sep 24, 2024

Hello!

We just released v2.2.11 that addresses this issue.

Please, let us know if everything is okay so we can close this issue!

Thank you!

We release weekly, so on next Monday it'll go live the version that contains the upgraded version of the Giphy SDK. If the crash still happens I'll let you know again! Thanks for the fix 🙏🏼

@leschlogl trying to update to the 2.2.11 version, we get these errors.

Cannot find type 'SwiftUICore' in scope
Failed to build module 'GiphyUISDK'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)', while this compiler is 'Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)'). Please select a toolchain which matches the SDK.
Command SwiftCompile failed with a nonzero exit code

Has the SDK been built with a newer Swift version? This feels like a breaking change 🤔

I've upgraded to it and it seems to be compiling fine for me! I'm on Xcode 16 tho (still on Swift 5, not upgraded to 6 yet).

@msrutek-paylocity
Copy link

I'm on Xcode 16 tho (still on Swift 5, not upgraded to 6 yet).

We're still using Xcode 15.4

@leschlogl
Copy link

Hi @msrutek-paylocity

Thanks for letting us know and I apologise for that.

We released v2.2.12 that is Xcode 15 compatible.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants