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

ProMotion crashing in iOS 8 with ProMotion-formotion #562

Closed
fschwahn opened this issue Nov 3, 2014 · 8 comments
Closed

ProMotion crashing in iOS 8 with ProMotion-formotion #562

fschwahn opened this issue Nov 3, 2014 · 8 comments
Assignees

Comments

@fschwahn
Copy link

fschwahn commented Nov 3, 2014

Hi,
this issue is a bit obscure, but ProMotion crashes when used with a formotion screen. You need a an :image-row, and do the following:

  1. Open the app in portrait mode
  2. Press on the image row - a menu appears
  3. Rotate your device.
  4. Press either "Take" or "Choose"

Now the app crashes, because visibleViewController in NavigationController is nil:
https://github.com/clearsightstudio/ProMotion/blob/master/lib/ProMotion/cocoatouch/navigation_controller.rb#L10 - the error message being:

Terminating app due to uncaught exception 'NoMethodError', reason: 'undefined method `shouldAutorotate' for nil:NilClass (NoMethodError)

I updated the row to read visibleViewController.shouldAutorotate if visibleViewController - which seems to fix the problem. But I don't understand what is happening here. Why is visibleViewController nil in the first place?

This issue seems to happen only in iOS 8, and I cannot reproduce in the simulator, only on a real device. It happens in ProMotion versions 2.0.1 and 2.1.0.beta1.

All the best,
Fabian

@jamonholmgren
Copy link
Owner

Thanks for the detailed error report, @fschwahn!

Quick question: does the view controller in question happen to be in a MoreNavigationController?

@fschwahn
Copy link
Author

fschwahn commented Nov 4, 2014

@jamonholmgren no

@jamonholmgren
Copy link
Owner

Hm, okay. I don't have time to dive into this, unfortunately. If you'd like to submit a pull request with your workaround, feel free. I can't think of any major regressions this would cause.

@fschwahn
Copy link
Author

fschwahn commented Nov 4, 2014

@jamonholmgren Unfortunately I also don't have any time, otherwise I'd build a small app reproducing the issue. I'll submit a PR when I have some spare time, maybe we can get to the bottom of this in the future. Thanks you for your time!

@jamonholmgren
Copy link
Owner

👍

@jamonholmgren
Copy link
Owner

@fschwahn Did you end up figuring out what was going on?

@fschwahn
Copy link
Author

fschwahn commented Dec 8, 2014

no, I'm still running the workaround - unfortunately I won't have time in the foreseeable future to tackle this.

@jamonholmgren
Copy link
Owner

Thanks, @fschwahn. Let's just implement the workaround. Maybe @kevinvangelder or @carlinisaacson?

visibleViewController.shouldAutorotate if visibleViewController

Here: https://github.com/clearsightstudio/ProMotion/blob/master/lib/ProMotion/cocoatouch/navigation_controller.rb#L10

@kevinvangelder kevinvangelder self-assigned this Jan 21, 2015
jamonholmgren added a commit that referenced this issue Jan 22, 2015
implemented workaround for image autorotate crash #562
ryanlntn added a commit to ryanlntn/ProMotion that referenced this issue Jan 23, 2015
…nto version-2.3

* 'version-2.3' of github.com:clearsightstudio/ProMotion:
  Version 2.2.1
  snake case variables for consistency.
  added tests
  Fixes issue with auto-detected links not opening.
  implemented workaround for image autorotate crash jamonholmgren#562
  Write spec to ensure on_init is not used in the future
  Cleanup screen_setup
  Disabled another Travis test
  Disabled another test. This is getting monotonous
  More Travis skipped tests
  Use Travis env variables instead
  Disable failing test for Travis
  Fix: wrong cell detection problem in search_result_table of longpressable TableScreen.
  No version bump yet
  Specs updated for iOS 7 and iOS 8
  Resolving iOS 7 errors
  Updated splitview to iOS 8 compatibility
markrickert added a commit that referenced this issue Jan 24, 2015
* master: (21 commits)
  SVG image update
  Version 2.2.1
  snake case variables for consistency.
  added tests
  Fixes issue with auto-detected links not opening.
  implemented workaround for image autorotate crash #562
  Write spec to ensure on_init is not used in the future
  Cleanup screen_setup
  Disabled another Travis test
  Disabled another test. This is getting monotonous
  More Travis skipped tests
  Use Travis env variables instead
  Disable failing test for Travis
  Fix: wrong cell detection problem in search_result_table of longpressable TableScreen.
  No version bump yet
  Specs updated for iOS 7 and iOS 8
  Resolving iOS 7 errors
  Updated splitview to iOS 8 compatibility
  Fix: App crash problems when empty cell long-pressed.
  allow passing an instantiated view as a table section's :title_view
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants