[Bug]: Pasting screenshot causes crash Simplex if too much data in screenshot
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Reproduce the crash on Linux using a large screenshot, then start at PlatformTextField.desktop.kt:150 and inspect the desktop clipboard path shown in the stack trace. Compare large and smaller pasted images; done means pasting a high-resolution screenshot no longer crashes the app.
Written by the indexing model from the issue text.
Description
Is there an existing issue for this?
- I have searched the existing issues
Platform
Linux
OS version
Arch
App version
6.4.8 (AppImage)
Current Behavior
I thoroughly tested it and my conversation partner also tested the same after I discovered the bug.
Observations:
- Pasting a compressed image goes fine.
- When I make a screenshot of my entire monitor then the app crashes immediately, reproducable with 100% hitrate
- When I boxselect for the screenshot and I take a part of the monitor then the app does not crash up to a reassonably large rectangle
- When I boxselect a much larger part of the monitor then the app does crash
- My friend also tested this and for him also simplex immediately crashed after pasting the screenshot
Conclusion: as from a certain filesize or resolution simplex can not handle pasting a screenshot and as a result it crashes.
Resolution of my display: 2560x1440
Resolution of my friends his display: '4k'
Expected Behavior
Obviously the expected behavior is that simplex does not crash when you paste a screenshot of a higher resolution.
Steps To Reproduce
- Make a screenshot of your entire monitor for at least 2560x1440 pixels.
- Paste it in the Simplex-AppImage which has the same version (6.4.8)
- App crashes
- Now make a screenshot of a much lower resolution, paste it in the app and it won't crash.
Relevant log output
I do not know how to quote a block of text (MarkDown??) instead of per line on GitHub, I post 2 outputs: from within the app and from the terminal (I started the app via the terminal). I leave a large number of whitelines in between the 2 outputs to make it visually clear.
In the Simplex-app itself I got this output: I copied it to the clipboard via the "share" button.
java.io.IOException: INCR data is missed.
at java.desktop/sun.awt.X11.XSelection.getData(Unknown Source)
at java.desktop/sun.awt.X11.XClipboard.getClipboardData(Unknown Source)
at java.desktop/sun.awt.datatransfer.SunClipboard.getData(Unknown Source)
at chat.simplex.common.platform.PlatformTextField_desktopKt$PlatformTextField$4$1.invoke-ZmokQxo(PlatformTextField.desktop.kt:150)
at chat.simplex.common.platform.PlatformTextField_desktopKt$PlatformTextField$4$1.invoke(PlatformTextField.desktop.kt:123)
at androidx.compose.ui.input.key.KeyInputNode.onPreKeyEvent-ZmokQxo(KeyInputModifier.kt:93)
at androidx.compose.ui.focus.FocusOwnerImpl.dispatchKeyEvent-YhN2O0w(FocusOwnerImpl.kt:347)
at androidx.compose.ui.focus.FocusOwner.dispatchKeyEvent-YhN2O0w$default(FocusOwner.kt:128)
at androidx.compose.ui.node.RootNodeOwner.onKeyEvent-ZmokQxo(RootNodeOwner.skiko.kt:299)
at androidx.compose.ui.scene.CanvasLayersComposeSceneImpl.processKeyEvent-ZmokQxo(CanvasLayersComposeScene.skiko.kt:254)
at androidx.compose.ui.scene.BaseComposeScene$inputHandler$4.invoke-ZmokQxo(BaseComposeScene.skiko.kt:64)
at androidx.compose.ui.scene.BaseComposeScene$inputHandler$4.invoke(BaseComposeScene.skiko.kt:64)
at androidx.compose.ui.scene.ComposeSceneInputHandler.onKeyEvent-ZmokQxo(ComposeSceneInputHandler.skiko.kt:136)
at androidx.compose.ui.scene.BaseComposeScene.sendKeyEvent-ZmokQxo(BaseComposeScene.skiko.kt:261)
at androidx.compose.ui.scene.ComposeSceneMediator.onKeyEvent(ComposeSceneMediator.desktop.kt:489)
at androidx.compose.ui.scene.ComposeSceneMediator.access$onKeyEvent(ComposeSceneMediator.desktop.kt:117)
at androidx.compose.ui.scene.ComposeSceneMediator$keyListener$1.keyPressed(ComposeSceneMediator.desktop.kt:284)
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.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Window.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)
In the terminal I got this output.
Exception in thread "pool-1-thread-1" com.sshtools.twoslices.ToasterException: Failed to show toast for INFO: Chirpy
at com.sshtools.twoslices.impl.NotifyToaster.toast(NotifyToaster.java:97)
at com.sshtools.twoslices.ToastBuilder.toast(ToastBuilder.java:513)
at chat.simplex.common.model.NtfManager$displayNotificationViaLib$2.invokeSuspend(NtfManager.desktop.kt:138)
at chat.simplex.common.model.NtfManager$displayNotificationViaLib$2.invoke(NtfManager.desktop.kt)
at chat.simplex.common.model.NtfManager$displayNotificationViaLib$2.invoke(NtfManager.desktop.kt)
at chat.simplex.common.views.helpers.UtilsKt$wrapWithLogging$2.invokeSuspend(Utils.kt:50)
at chat.simplex.common.views.helpers.UtilsKt$wrapWithLogging$2.invoke(Utils.kt)
at chat.simplex.common.views.helpers.UtilsKt$wrapWithLogging$2.invoke(Utils.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:61)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:261)
at chat.simplex.common.views.helpers.UtilsKt.wrapWithLogging(Utils.kt:48)
at chat.simplex.common.views.helpers.UtilsKt.wrapWithLogging$default(Utils.kt:48)
at chat.simplex.common.views.helpers.UtilsKt$withBGApi$1$1.invokeSuspend(Utils.kt:40)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@4d326f89, java.util.concurrent.Executors$FinalizableDelegatedExecutorService@439a7a4d]
E: App crashed, thread name: AWT-EventQueue-0, exception: java.io.IOException: INCR data is missed.
- Dominant language
- Haskell
- Stars
- 19.5k
- Forks
- 1.4k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 71
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from simplex-chat/simplex-chat
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
simplex-chat/simplex-chat#7547 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
simplex-chat/simplex-chat#7248 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
simplex-chat/simplex-chat#6782 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
simplex-chat/simplex-chat#6772 ·
-
[Bug]: Openbug terminal triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
simplex-chat/simplex-chat#6752 ·