Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

Crash on iOS 9 with messageBubbleFont != nil when springiness is enabled #1338

Closed
jessesquires opened this issue Dec 6, 2015 · 8 comments
Closed
Labels
Milestone

Comments

@jessesquires
Copy link
Owner

Only happens when springinessEnabled = YES. Very odd. I was able to repro, but haven't looked into this very deeply.

Related: #1263, #1252, #1217, #1210.

Workaround

self.springinessEnabled = NO;
@hhanesand
Copy link

@jessesquires Was looking at the stack trace of this crash, and I think its a direct result of a copyWithZone: method that sets messageBubbleFont to nil when copying an object.

@jessesquires
Copy link
Owner Author

@hhanesand - yes, that's correct. would you like to submit a PR?

@alberttai1
Copy link

@jessesquires I'm having this issue without enabling springiness. The weird thing is this only happens when I'm not using cocoapods and manually importing into project. The springiness workaround doesn't fix my problem at all. Is there any other way?

@jessesquires
Copy link
Owner Author

Can't reproduce this anymore. Going to close.

@eliburke
Copy link
Collaborator

@jessesquires FWIW I re-tested this a few weeks ago. Does not crash in the simulator but still crashes on hardware 100% of the time. I am of the opinion that it has to do with changing a cell's size while any of the "springiness" animations are occurring.

@jessesquires
Copy link
Owner Author

@eliburke -- hm.. I tested on device last night. iPhone 6s, iOS 9.

i was able to repro before, and it was definitely because of copyWithZone:

@jessesquires jessesquires reopened this May 23, 2016
@jessesquires
Copy link
Owner Author

new idea to guard against this: override init and set default values

skeeet pushed a commit to BluechipSystems/JSQMessagesViewController that referenced this issue May 24, 2016
…ems/JSQMessagesViewController into feature/mass_delete

* 'feature/mass_delete' of https://github.com/BluechipSystems/JSQMessagesViewController:
  bump version numbers
  Update CHANGELOG.md
  provide default init values for JSQMessagesCollectionViewLayoutAttributes to prevent assertion. fix jessesquires#1338
  follow up for jessesquires#1247 and jessesquires#1591. obfuscate private APIs. swizzle via +initialize
@ignacio-chiazzo
Copy link

@jessesquires @Lucashuang0802 @mauruskuehne In my case I made a workaround setting the finishReceivingMessageAnimated(false) as false before calling finishReceivingMessage()

pcoltau added a commit to TeletronicsDotAe/JSQMessagesViewController that referenced this issue Apr 16, 2017
…iewController

* 'master' of https://github.com/jessesquires/JSQMessagesViewController: (86 commits)
  ImageOptim on assets (jessesquires#1845)
  update changelog and spec for 7.3.4
  Fix issue jessesquires#1583: Don't highlight cell outside message bubble (when long press) (jessesquires#1744)
  update changelog and version for 7.3.3
  Updated `canPerformAction:withSender:` in `JSQMessagesComposerTextView` to call super (jessesquires#1664). Fixes jessesquires#1663.
  Update CHANGELOG and version nums for 7.3.2
  fix KVO crash. close jessesquires#1631
  formatting
  small fix regarding scrollToIndexPath (jessesquires#1642) close jessesquires#1640
  Update CHANGELOG.md
  update CHANGLOG. bump version numbers
  Reverted jessesquires#1588 to fix jessesquires#1602 and fix jessesquires#1604. (jessesquires#1623)
  bump version numbers
  Update CHANGELOG.md
  provide default init values for JSQMessagesCollectionViewLayoutAttributes to prevent assertion. fix jessesquires#1338
  follow up for jessesquires#1247 and jessesquires#1591. obfuscate private APIs. swizzle via +initialize
  copy attributes
  clean up
  fix keyboard hiding bug on iOS 9 (jessesquires#1307). fix jessesquires#1063
  - cleanup from PR jessesquires#1281 - fix menu actions, close jessesquires#1321 - make notification methods public - partially apply changes from PR jessesquires#1563
  ...
pcoltau added a commit to TeletronicsDotAe/JSQMessagesViewController that referenced this issue Apr 16, 2017
…nch3

* origin/master: (66 commits)
  ImageOptim on assets (jessesquires#1845)
  update changelog and spec for 7.3.4
  Fix issue jessesquires#1583: Don't highlight cell outside message bubble (when long press) (jessesquires#1744)
  update changelog and version for 7.3.3
  Updated `canPerformAction:withSender:` in `JSQMessagesComposerTextView` to call super (jessesquires#1664). Fixes jessesquires#1663.
  Update CHANGELOG and version nums for 7.3.2
  fix KVO crash. close jessesquires#1631
  formatting
  small fix regarding scrollToIndexPath (jessesquires#1642) close jessesquires#1640
  Update CHANGELOG.md
  update CHANGLOG. bump version numbers
  Reverted jessesquires#1588 to fix jessesquires#1602 and fix jessesquires#1604. (jessesquires#1623)
  bump version numbers
  Update CHANGELOG.md
  provide default init values for JSQMessagesCollectionViewLayoutAttributes to prevent assertion. fix jessesquires#1338
  follow up for jessesquires#1247 and jessesquires#1591. obfuscate private APIs. swizzle via +initialize
  copy attributes
  clean up
  fix keyboard hiding bug on iOS 9 (jessesquires#1307). fix jessesquires#1063
  - cleanup from PR jessesquires#1281 - fix menu actions, close jessesquires#1321 - make notification methods public - partially apply changes from PR jessesquires#1563
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants