The Material Time Picker component crashes on Android during app background/foreground cycle
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- android, javascript, react-native
- 領域
- mobile
調査の方向性
Start by tracing the Android Material time picker flow in RNMaterialTimePicker.kt and MaterialTimePickerModule.kt, especially the show call in the stack trace and how opening is scheduled. Reproduce the background/foreground interruption on Android with the provided steps. Done means returning to the app after interrupting the dialog no longer crashes.
索引モデルが issue の本文から書いたものです。
説明
Bug report
Summary
Using the Material Design time picker in my Android app causes a crash when the user switches to another app or locks the device while the time picker dialog is opening or open, and then go back to my app.
Expected Behavior:
The app should resume gracefully without crashing, even if the time picker dialog was interrupted or not fully shown.
Actual Behavior:
The app crashes when returning from background after attempting to open the time picker.
Steps to reproduce
- I open a screen with the time picker
- I tap a button that opens the time picker
- I press the home button before the picker fully appears
- When I return to my app, it crashes
Code -
const DateTimePicker: React.FC<DateTimePickerProps> = ({
testID,
value,
mode,
display,
onChange,
style,
minimumDate,
maximumDate,
is24Hour = false,
androidProps = {},
}) => {
const {title, positiveButton, negativeButton} = androidProps;
return (
<View style={styles.container}>
<DateTimeSelector
testID={testID}
value={value}
mode={mode}
display={display}
design="material"
onChange={onChange}
title={title}
positiveButton={positiveButton}
negativeButton={negativeButton}
style={style}
minimumDate={minimumDate}
maximumDate={maximumDate}
is24Hour={is24Hour}
/>
</View>
);
};
now I'm using above component as in our app screen ->
<DateTimePicker
testID={'DATE_TIME_PICKER'}
value={get.selectedDate}
mode="time"
display={get.isAndroid ? 'clock' : 'spinner'}
maximumDate={get.maximumDate}
onChange={set.handleTimeChange}
is24Hour={get.is24HourFormat}
style={styles.dateTimePicker}
androidProps={{
title: t('selectTime'),
positiveButton: {label: t('Button.ok')},
negativeButton: {label: t('Button.cancel')},
}}
/>
Error
androidx.fragment.app.BackStackRecord.commitInternal (BackStackRecord.java:341)
androidx.fragment.app.BackStackRecord.commit (BackStackRecord.java:306)
androidx.fragment.app.DialogFragment.show (DialogFragment.java:507)
com.reactcommunity.rndatetimepicker.RNMaterialTimePicker.show (RNMaterialTimePicker.kt:109)
com.reactcommunity.rndatetimepicker.RNMaterialTimePicker.open (RNMaterialTimePicker.kt:29)
com.reactcommunity.rndatetimepicker.MaterialTimePickerModule.open$lambda$0 (MaterialTimePickerModule.kt:46)
com.reactcommunity.rndatetimepicker.MaterialTimePickerModule.$r8$lambda$Fd7Bz8i6zmNahyMJIHFgC8wqsHw
com.reactcommunity.rndatetimepicker.MaterialTimePickerModule$$ExternalSyntheticLambda0.run (D8$$SyntheticClass)
android.os.Handler.handleCallback (Handler.java:958)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loopOnce (Looper.java:230)
android.os.Looper.loop (Looper.java:319)
Environment
- @react-native-community/datetimepicker: 8.4.1
- React Native: v0.76.6
- Android: 14
- 主要言語
- JavaScript
- スター
- 2.9k
- フォーク
- 459
- 平均マージ
- 4日 16時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react-native-datetimepicker/datetimepicker のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
react-native-datetimepicker/datetimepicker#1070 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
react-native-datetimepicker/datetimepicker#1047 · コメント 6 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
react-native-datetimepicker/datetimepicker#1046 · コメント 1 件 ·
react-native-datetimepicker/datetimepicker の issue をすべて見る
似ている issue
-
cdx-audit output written to a pipe is cut off at 64 KiB再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug mode:cli
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
Build produces empty forge.min.js: package.json lists "forge" instead of "node-forge"対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Fei2411/DeepSeek-Bot#963 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Miaotofu01/Study-Mate#244 ·
メンテナーはふだん 1 日以内に返信
-
test-reliability
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Azure/azure-sdk-for-js#40672 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信