jianlinwei / connectbot

Automatically exported from code.google.com/p/connectbot
Apache License 2.0
0 stars 0 forks source link

Shell input causes crash on Acer Iconia Tab #463

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Connect to server
2. Once connected enter input via touch keyboard or ESC (note CTRL is ok)

What is the expected output? What do you see instead?

The shell should receive my input.
Instead a dialog box appears:
"Sorry
The application ConnectBot(process org.connectbot) has stopped unexpectedly. 
Please try again."

Note: When I restart ConnectBot there is another dialog box:
"It appears ConnectBot had a problem last time it ran. Submit error report to 
ConnectBot developers?"
I clicked OK.

What version of the product are you using (you can see this by using Menu
-> About in the Host List)?
Acer Iconia Tab (A500) running Android 3.0.1

What type of system are you trying to connect to?
Debian server and CentOS server

Please provide any additional information below.
Attached the relevant LogCat dump

Original issue reported on code.google.com by Simon.Tr...@gmail.com on 12 Jun 2011 at 7:42

Attachments:

GoogleCodeExporter commented 9 years ago
In Android 3.0.1 you can not use the network in the main thread.

A quick and dirty workaround:

Replace in org.connectbot.transport.SSH the two write method (around line 
527)with:

    @Override
    public void write(final byte[] buffer) throws IOException {
        new Thread(new Runnable() {
            public void run() {
                if (stdin != null)
                    try {
                        stdin.write(buffer);
                    } catch(Exception e) {
                        Log.e(TAG,"IO Exception",e);
                    }
            }
        }).start();
    }

    @Override
    public void write(final int c) throws IOException {
        new Thread(new Runnable() {
            public void run() {
                if (stdin != null)
                    try {
                        stdin.write(c);
                    } catch(Exception e) {
                        Log.e(TAG,"IO Exception",e);
                    }
            }
        }).start();
    }

Original comment by kurt...@gmail.com on 18 Jun 2011 at 7:09

GoogleCodeExporter commented 9 years ago
could anybody tell, when bug will be fixed?

Original comment by igor.pot...@gmail.com on 23 Jun 2011 at 9:14

GoogleCodeExporter commented 9 years ago
I downloaded ConnectBot-git-2011-07-01_04-26-38.apk and it works on my Acer 
Iconia.

Thanks for the fix.

Original comment by Simon.Tr...@gmail.com on 4 Jul 2011 at 9:20