100grams/HGPageScrollView

issue with sample project

Closed this issue · 4 comments

I was trying to scroll horizontally from the sample project and I often it crashes with the following error:

2011-12-11 05:11:34.721 HGPageScrollViewSample[9425:f803] *** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<MyTableViewController: 0x6e6d600> should have parent view controller:<HGPageScrollViewSampleViewController: 0x6e633c0> but actual parent is:<UINavigationController: 0x6e6d7b0>'

Hi,

A couple of questions:

  • Which iOS Simulator are you using? Testing with iOS 5 simulator I get a weird crash in HGPageScrollView.m, in deselectPageAnimated: (line 334) when calling addSubview:. This only happens on iOS 5 simulator, and I did not find out why yet. On 4.3 simulator it behaves perfectly well.
  • I never managed to reproduce the crash you are reporting. Are you getting this on the device too? If so, which iOS is installed on the device?
  • Can you reproduce this crash? If so, please describe a scenario that reproduces it...

cheers,
Rotem

Hello,

I can reproduce the crash very easily in the simulator (iOS5, Xcode 4.2): launch the sample app (nice, btw!), press the "11" button to make the first view zoom in, then press the "11" button again.

Running on the device (3GS, iOS 5), I can also reproduce the crash.

I cannot reproduce this on the iOS 4.3 simulator, nor on my iPod Touch (iOS 4.2.1).

Hello,
I's crash log:
*** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<MyTableViewController: 0x1cc060> should have parent view controller:<HGPageScrollViewSampleViewController: 0x1c3860> but actual parent is:<UINavigationController: 0x1ccdf0>'
*** First throw call stack:
(0x341698bf 0x358851e5 0x341697b9 0x341697db 0x352181b9 0x351d97ef 0x351d92bf 0x351d918b 0x51c3 0x35b3 0x340c3435 0x351f19eb 0x352b73cf 0x340c3435 0x351f19eb 0x351f19a7 0x351f1985 0x351f16f5 0x351f202d 0x351f050f 0x351eff01 0x351d64ed 0x351d5d2d 0x35d00df3 0x3413d553 0x3413d4f5 0x3413c343 0x340bf4dd 0x340bf3a5 0x35cfffcd 0x35204743 0x211d 0x20dc)

iPhone4 (iOS5, Xcode 4.2).

Hi, sorry about the looong delay.
This has now been fixed. See commit 4a7f4c3.