question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash when attaching to screen

See original GitHub issue

Bug description

When attaching to a screen session with “screen -r” ConnectBot crashes. Seems that this is related to something specific that is shown on the currently active screen window. Attaching from a computer and changing the active window to something else removes the issue. But ConnectBot again crashes when changing back to that specific window.

Steps to reproduce

  1. Connect to my server with my credentials with a specific window active in a screen session
  2. screen -r
  3. ConnectBot restarts back to the Hosts-list

Expected behavior

Screen content shouldn’t crash ConnectBot

Android device

  • Device: Sony ZX2 Compact
  • OS: Android 9 52.0.A.3.126
  • ConnectBot Version: 1.9.5

Server information

  • OS: Ubuntu Linux 16.04
  • SSH Software and Version: OpenSSH_7.2p2 Ubuntu-4ubuntu2.6, OpenSSL 1.0.2g 1 Mar 2016

Additional context

Logcat

01-17 08:28:47.324  8255  8914 D CB.TerminalBridge: OSC: 0;userna@serv: ~
01-17 08:28:47.325  8255  8914 D CB.TerminalBridge: Unknown character ESC[! character is 112
01-17 08:28:47.325  8255  8914 D CB.TerminalBridge: ESC [ ? 3 l, unsupported.
01-17 08:28:47.325  8255  8914 D CB.TerminalBridge: ESC [ ? 1049 h, unsupported.
01-17 08:28:47.336  8255  8255 D AndroidRuntime: Shutting down VM
01-17 08:28:47.337  8255  8255 E AndroidRuntime: FATAL EXCEPTION: main
01-17 08:28:47.337  8255  8255 E AndroidRuntime: Process: org.connectbot, PID: 8255
01-17 08:28:47.337  8255  8255 E AndroidRuntime: java.lang.IllegalArgumentException: x + width must be <= bitmap.width()
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.graphics.Bitmap.createBitmap(Bitmap.java:808)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.graphics.Bitmap.createBitmap(Bitmap.java:774)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at org.connectbot.TerminalView.onDraw(TerminalView.java:460)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.View.draw(View.java:20226)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.View.buildDrawingCacheImpl(View.java:19497)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.View.buildDrawingCache(View.java:19357)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:19078)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:19061)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:19061)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:19061)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:19061)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:19061)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:19061)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:19061)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:19061)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:686)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:692)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:801)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewRootImpl.draw(ViewRootImpl.java:3332)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3129)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2498)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1473)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7215)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1004)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.Choreographer.doCallbacks(Choreographer.java:816)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.Choreographer.doFrame(Choreographer.java:751)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:990)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:873)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:280)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6710)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
01-17 08:28:47.337  8255  8255 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
01-17 08:28:47.340  1386 21625 D ActivityManager: New dropbox entry: org.connectbot, data_app_crash, 4f0087ee-2f77-4eae-b1b6-22f9f370d027
01-17 08:28:47.341  1386 21625 W ActivityManager:   Force finishing activity org.connectbot/.ConsoleActivity
01-17 08:28:47.346  8255  8255 I Process : Sending signal. PID: 8255 SIG: 9

I have also a larger Logcat dump saved, but it will need some redacting before publication here.

Screen session

The active screen window causing this is still open in my screen session, but will naturally vanish in the next reboot. Any hints on how to save the state? The problematic window just has a bash command line with some history visible.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:11

github_iconTop GitHub Comments

5reactions
realdcommented, Jan 22, 2019

Seems to depend on terminal emulation type:

xterm-256color -> crash on long lines xterm-color -> crash on long lines xterm -> ok

2reactions
majekwcommented, Feb 17, 2020

I can confirm that. It stops crashing after changing terminal type to xterm. Android 9 (Samsung A40), ConnectBot 1.9.6.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Laptop crashes on connecting an external monitor
Laptop crashes on connecting an external monitor · 1. Click Start and type devmgmt.msc, and thenEnter. The Device Manager window opens. · 2....
Read more >
Visual Studio 2017 crashes during Attach to Process
When attempting to attach to a Web Site project hosted under IIS, Visual Studio will often crash. It seems to happen the most...
Read more >
When you can't re-attach to your screen session after a lost ...
In some cases, your previous screen session may not have detached properly when you lost your connection. If this happens, you can detach ......
Read more >
Crashing when attaching video : r/signal - Reddit
I click the video I want to attach. The video preview shows briefly (maybe a second tops) before the preview screen closes and...
Read more >
Outlook Freezes When Inserting a File
Attaching files to your Outlook emails is an essential part of office ... To do this, swipe to the right side of your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found