ptomasroos/react-native-scrollable-tab-view

[Android]ScrollableTabBar Crash

Richard-Cao opened this issue · 21 comments

java.lang.AssertionError: availableWidth is indefinite so widthMeasureMode must be CSSMeasureMode.UNDEFINED
                                                               at com.facebook.infer.annotation.Assertions.assertCondition(Assertions.java:65)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeImpl(LayoutEngine.java:502)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeInternal(LayoutEngine.java:373)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeImpl(LayoutEngine.java:938)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeInternal(LayoutEngine.java:373)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeImpl(LayoutEngine.java:706)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeInternal(LayoutEngine.java:373)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeImpl(LayoutEngine.java:938)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeInternal(LayoutEngine.java:373)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeImpl(LayoutEngine.java:938)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeInternal(LayoutEngine.java:373)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeImpl(LayoutEngine.java:938)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeInternal(LayoutEngine.java:373)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeImpl(LayoutEngine.java:938)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeInternal(LayoutEngine.java:373)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeImpl(LayoutEngine.java:1304)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeInternal(LayoutEngine.java:373)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeImpl(LayoutEngine.java:1088)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeInternal(LayoutEngine.java:373)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeImpl(LayoutEngine.java:1304)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeInternal(LayoutEngine.java:373)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeImpl(LayoutEngine.java:1088)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeInternal(LayoutEngine.java:373)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeImpl(LayoutEngine.java:1088)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeInternal(LayoutEngine.java:373)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeImpl(LayoutEngine.java:1088)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeInternal(LayoutEngine.java:373)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeImpl(LayoutEngine.java:1304)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeInternal(LayoutEngine.java:373)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeImpl(LayoutEngine.java:1304)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNodeInternal(LayoutEngine.java:373)
                                                               at com.facebook.csslayout.LayoutEngine.layoutNode(LayoutEngine.java:251)
                                                               at com.facebook.csslayout.CSSNode.calculateLayout(CSSNode.java:144)
                                                               at com.facebook.react.uimanager.UIImplementation.calculateRootLayout(UIImplementation.java:731)
                                                               at com.facebook.react.uimanager.UIImplementation.updateViewHierarchy(UIImplementation.java:505)
                                                               at com.facebook.react.uimanager.UIImplementation.dispatchViewUpdates(UIImplementation.java:494)
                                                               at com.facebook.react.uimanager.UIManagerModule.onBatchComplete(UIManagerModule.java:457)
                                                               at com.facebook.react.bridge.NativeModuleRegistry.onBatchComplete(NativeModuleRegistry.java:137)
                                                               at com.facebook.react.bridge.CatalystInstanceImpl$NativeModulesReactCallback.onBatchComplete(CatalystInstanceImpl.java:453)
                                                               at com.facebook.react.bridge.queue.NativeRunnableDeprecated.run(Native Method)
                                                               at android.os.Handler.handleCallback(Handler.java:739)
                                                               at android.os.Handler.dispatchMessage(Handler.java:95)
                                                               at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
                                                               at android.os.Looper.loop(Looper.java:135)
                                                               at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:193)
                                                               at java.lang.Thread.run(Thread.java:818)

Only on Android.

How can I reproduce it?

@skv-headless https://github.com/attentiveness/reading/blob/master/app/pages/Main.js#L340, change DefaultTabBar to ScrollableTabBar can reproduce. Only on android

My app crashed too.Just replace DefaultTabBar with ScrollableTabBar.

If you reproduce this on examples I'll take a look as soon as possible

ScrollableTabBar crash for android, DefaultTabBar work well.

@sunquanzhi yes

Same problem as described above.

Still crash……

@skv-headless Anything else?

Dynamic tabs use ScrollableTabBar…… @skv-headless

@Richard-Cao 那咋办,现在还崩溃么。蛋疼。

我试了,0.21版本的 是怎么弄都不会蹦的。后面react升级了 ,就出现蹦了。主要是语法经常变 很坑爹,估计里面的逻辑都乱掉了把。 @Richard-Cao

@aqnaruto Still crash.

你说的这个是启动的时候蹦,还是使用这个的时候才会蹦 @Richard-Cao

@aqnaruto Crash when use this.

@skv-headless 我也发现这个问题了,ireading项目(地址:https://github.com/attentiveness/reading),把代码下载下来,安装好包依赖,react-native run-android后,出现如楼上aqnaruto的图片中的错误

@haomiaozhichen Please speak English……

Please try version from master. There is no ViewPager. I appreciate any feedback.

still crash in 0.7.0.

+1 I have same problem.

still crash...