Skip to content

Crash: IllegalStateException: parentStyle must not be null #831

@mzorz

Description

@mzorz

Crash observed while testing Aztec with monkeys

:Sending Touch (ACTION_DOWN): 0:(586.0,1017.0)
:Sending Touch (ACTION_UP): 0:(606.0217,1014.35205)
// CRASH: org.wordpress.aztec (pid 14927)
// Short Msg: java.lang.IllegalStateException
// Long Msg: java.lang.IllegalStateException: parentStyle must not be null
// Build Label: google/sdk_gphone_x86/generic_x86:8.0.0/OSR1.170901.056/4497355:userdebug/dev-keys
// Build Changelist: 4497355
// Build Time: 1513035881000
// java.lang.IllegalStateException: parentStyle must not be null
// 	at org.wordpress.aztec.plugins.CssUnderlinePlugin.beforeSpansProcessed(CssUnderlinePlugin.kt:44)
// 	at org.wordpress.aztec.AztecParser.preprocessSpans(AztecParser.kt:117)
// 	at org.wordpress.aztec.AztecParser.toHtml(AztecParser.kt:96)
// 	at org.wordpress.aztec.AztecText.parseHtml(AztecText.kt:1331)
// 	at org.wordpress.aztec.AztecText.toPlainHtml(AztecText.kt:1302)
// 	at org.wordpress.aztec.AztecText.toPlainHtml(AztecText.kt:1290)
// 	at org.wordpress.aztec.AztecText.fromHtml(AztecText.kt:1186)
// 	at org.wordpress.aztec.AztecText.fromHtml$default(AztecText.kt:1160)
// 	at org.wordpress.aztec.History.setTextFromHistory(History.kt:150)
// 	at org.wordpress.aztec.History.undo(History.kt:137)
// 	at org.wordpress.aztec.AztecText.undo(AztecText.kt:1140)
// 	at org.wordpress.aztec.demo.MainActivity.onOptionsItemSelected(MainActivity.kt:553)
// 	at android.app.Activity.onMenuItemSelected(Activity.java:3435)
// 	at androidx.fragment.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:436)
// 	at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:196)
// 	at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
// 	at androidx.appcompat.app.AppCompatDelegateImpl.onMenuItemSelected(AppCompatDelegateImpl.java:888)
// 	at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:840)
// 	at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158)
// 	at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:991)
// 	at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:981)
// 	at androidx.appcompat.widget.ActionMenuView.invokeItem(ActionMenuView.java:625)
// 	at androidx.appcompat.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:151)
// 	at android.view.View.performClick(View.java:6256)
// 	at android.view.View$PerformClick.run(View.java:24701)
// 	at android.os.Handler.handleCallback(Handler.java:789)
// 	at android.os.Handler.dispatchMessage(Handler.java:98)
// 	at android.os.Looper.loop(Looper.java:164)
// 	at android.app.ActivityThread.main(ActivityThread.java:6541)
// 	at java.lang.reflect.Method.invoke(Native Method)
// 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
// 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
// 
** Monkey aborted due to error.

Device: Pixel 2 emulator with Android 8.0

State used to reproduce: clean wiped emu, clean your clipboard memory as well (issue echo -n '' | pbcopy on a terminal window), then run:

adb -s emulator-5554 shell monkey -p org.wordpress.aztec -v 1000000
and wait.
You may end up having to run it 2 or 3 times (it will crash before that with other crashes) until this state is reached.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions