Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Studio crashes when trying to empty the search/replace lines. #829

Open
farost opened this issue Apr 15, 2024 · 0 comments
Open

Studio crashes when trying to empty the search/replace lines. #829

farost opened this issue Apr 15, 2024 · 0 comments

Comments

@farost
Copy link
Member

farost commented Apr 15, 2024

Description

When I open the replace window (Ctrl/Cmd + R) and want to clear parts of either the Search or the Replace lines before inserting your new data, I use the option + backspace (Mac) combination to delete everything word by word. However, if I press this combination while having the cursor in the 0 position, the studio crashes.

Environment

  1. TypeDB distribution: Core
  2. TypeDB version: 2.27.0
  3. Environment: Mac
  4. Studio version: 2.27.0
  5. Other details: -

Reproducible Steps

  1. Open TypeDB Studio and any file.
  2. Open the Search/Replace window (command + F).
  3. Press option + backspace (or tab -> option + backspace to switch to the Replace line).

Unexpected result: TypeDB Studio crashes:

Title: offset(-1) is out of bounds [0, 0]
Trace: java.lang.IllegalArgumentException: offset(-1) is out of bounds [0, 0]
	at androidx.compose.ui.text.MultiParagraph.requireIndexInRangeInclusiveEnd(MultiParagraph.kt:755)
	at androidx.compose.ui.text.MultiParagraph.getWordBoundary--jx7JFs(MultiParagraph.kt:589)
	at androidx.compose.ui.text.TextLayoutResult.getWordBoundary--jx7JFs(TextLayoutResult.kt:518)
	at androidx.compose.foundation.text.selection.BaseTextPreparedSelection.getPrevWordOffset(TextPreparedSelection.kt:278)
	at androidx.compose.foundation.text.selection.BaseTextPreparedSelection.getPrevWordOffset$default(TextPreparedSelection.kt:272)
	at androidx.compose.foundation.text.selection.BaseTextPreparedSelection.getPreviousWordOffset(TextPreparedSelection.kt:198)
	at androidx.compose.foundation.text.TextFieldKeyInput$process$2$5.invoke(TextFieldKeyInput.kt:148)
	at androidx.compose.foundation.text.TextFieldKeyInput$process$2$5.invoke(TextFieldKeyInput.kt:147)
	at androidx.compose.foundation.text.selection.TextFieldPreparedSelection.deleteIfSelectedOr(TextPreparedSelection.kt:397)
	at androidx.compose.foundation.text.TextFieldKeyInput$process$2.invoke(TextFieldKeyInput.kt:147)
	at androidx.compose.foundation.text.TextFieldKeyInput$process$2.invoke(TextFieldKeyInput.kt:103)
	at androidx.compose.foundation.text.TextFieldKeyInput.commandExecutionContext(TextFieldKeyInput.kt:223)
	at androidx.compose.foundation.text.TextFieldKeyInput.process-ZmokQxo(TextFieldKeyInput.kt:103)
	at androidx.compose.foundation.text.TextFieldKeyInputKt$textFieldKeyInput$2$1.invoke-ZmokQxo(TextFieldKeyInput.kt:255)
	at androidx.compose.foundation.text.TextFieldKeyInputKt$textFieldKeyInput$2$1.invoke(TextFieldKeyInput.kt:255)
	at androidx.compose.ui.input.key.KeyInputModifier.propagateKeyEvent-ZmokQxo(KeyInputModifier.kt:124)
	at androidx.compose.ui.input.key.KeyInputModifier.processKeyInput-ZmokQxo(KeyInputModifier.kt:103)
	at androidx.compose.ui.platform.SkiaBasedOwner.sendKeyEvent-ZmokQxo(SkiaBasedOwner.skiko.kt:231)
	at androidx.compose.ui.ComposeScene.sendKeyEvent-ZmokQxo(ComposeScene.skiko.kt:572)
	at androidx.compose.ui.awt.ComposeLayer$onKeyEvent$1.invoke(ComposeLayer.desktop.kt:410)
	at androidx.compose.ui.awt.ComposeLayer$onKeyEvent$1.invoke(ComposeLayer.desktop.kt:406)
	at androidx.compose.ui.awt.ComposeLayer.catchExceptions(ComposeLayer.desktop.kt:109)
	at androidx.compose.ui.awt.ComposeLayer.onKeyEvent(ComposeLayer.desktop.kt:406)
	at androidx.compose.ui.awt.ComposeLayer.access$onKeyEvent(ComposeLayer.desktop.kt:87)
	at androidx.compose.ui.awt.ComposeLayer$7.keyPressed(ComposeLayer.desktop.kt:385)
	at java.desktop/java.awt.Component.processKeyEvent(Unknown Source)
	at java.desktop/java.awt.Component.processEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

Expected result

Nothing happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant