Yalantis / Segmentio

Animated top/bottom segmented control written in Swift.
https://yalantis.com/
MIT License
2.53k stars 324 forks source link

App crash when device orientation is changed #146

Open ReflectCode opened 3 years ago

ReflectCode commented 3 years ago

What did you do?

Run app and change device orientation

What did you expect to happen?

App should work in all orientation

What happened instead?

App crashed immediately

Your Environment

Stack

   CocoaPods : 1.10.1
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
    RubyGems : 3.0.3
        Host : macOS 11.4 (20F71)
       Xcode : 12.5 (12E262)
         Git : git version 2.30.1 (Apple Git-130)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0

Podfile

# Uncomment the next line to define a global platform for your project
platform :ios, '13.2'
target 'TabBarV1' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for TabBarV1
  pod 'Segmentio'
end

Crash Info:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'No view controllers' File : Segmentio.swift After end of function : open override func layoutSubviews() {}

Device orientation change cash log.txt

Project that demonstrates the bug

https://github.com/ReflectCode/PagerAdapter-demo

ReflectCode commented 3 years ago

Device orientation change cash log.txt