I connect a ıp cam(jpeg), and show this image, and ı repeat continually, After a while my app error this. And I tested other phone and showed this one.
10-28 15:12:51.525: ERROR/AndroidRuntime(675): Uncaught handler: thread Thread-11 exiting due to uncaught exception
my codes:
public void parse(InputStream is){
try {
if (!type.isMjpegStream()) {
CameraManagerScreen.ActiveCam.setConnected(true);
setImage(is);
is.close();
System.gc();
if(!mjpeghttp.isCanceled())
go();
}
} catch (Exception e) {
}
}
and my connection is:
protected void connect() {
InputStream is = null;
try {
HttpParams httpParameters = new BasicHttpParams();
// Set the timeout in milliseconds until a connection is
// established.
int timeoutConnection = 20000;
HttpConnectionParams.setConnectionTimeout(httpParameters,
timeoutConnection);
// Set the default socket timeout (SO_TIMEOUT)
// in milliseconds which is the timeout for waiting for data.
int timeoutSocket = 20000;
HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);
client = new DefaultHttpClient(httpParameters);
method = new HttpGet(getUrl());
System.out.println("Baglanıyor: " + method.getURI().toString());
method.addHeader("Authorization", getBase64Encode());
res = client.execute(method);
System.out.println("RESPONSE: "
+ res.getStatusLine().getStatusCode());
is = res.getEntity().getContent();
if (!cancel) {
onReturn(res.getStatusLine().getStatusCode(), is);
}
} catch (Exception e) {
System.out.println(e.getMessage());
try {
cancel = true;
Thread.sleep(60);
} catch (Exception ie) {
}
onError(new Exception("0"));
}
}
Error...
10-28 14:13:06.794: INFO/dalvikvm(3502): Stack overflow, expanding (0x439b0200 to 0x439b0000)
10-28 14:13:06.794: INFO/dalvikvm(3502): Shrank stack (to 0x439b0200, curFrame is 0x439b0268)
10-28 14:13:06.794: WARN/dalvikvm(3502): threadid=17: thread exiting with uncaught exception (group=0x4001b180)
10-28 14:06:19.944: ERROR/AndroidRuntime(3420): Uncaught handler: thread Thread-11 exiting due to uncaught exception
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): java.lang.StackOverflowError
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at java.util.Hashtable.get(Hashtable.java:274)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at java.util.Properties.getProperty(Properties.java:177)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at java.lang.System.getProperty(System.java:440)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at java.lang.System.getProperty(System.java:412)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at java.lang.Boolean.getBoolean(Boolean.java:174)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at org.apache.harmony.luni.net.NetUtil$Action.run(NetUtil.java:89)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at org.apache.harmony.luni.net.NetUtil$Action.run(NetUtil.java:80)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at java.security.AccessController.doPrivilegedImpl(AccessController.java:264)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at java.security.AccessController.doPrivileged(AccessController.java:84)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at org.apache.harmony.luni.net.NetUtil.preferIPv4Stack(NetUtil.java:61)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at org.apache.harmony.luni.net.PlainSocketImpl.create(PlainSocketImpl.java:266)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at java.net.Socket.checkClosedAndCreate(Socket.java:889)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at java.net.Socket.connect(Socket.java:1036)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:117)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:140)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.Http.connect(Http.java:75)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.MjpegHttp.connect(MjpegHttp.java:33)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.Http.go(Http.java:46)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.CameraHttp.go(CameraHttp.java:13)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.camera.Camera.go(Camera.java:121)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.camera.Camera.parse(Camera.java:170)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.MjpegHttp.onReturn(MjpegHttp.java:23)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.Http.connect(Http.java:82)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.MjpegHttp.connect(MjpegHttp.java:33)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.Http.go(Http.java:46)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.CameraHttp.go(CameraHttp.java:13)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.camera.Camera.go(Camera.java:121)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.camera.Camera.parse(Camera.java:170)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.MjpegHttp.onReturn(MjpegHttp.java:23)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.Http.connect(Http.java:82)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.MjpegHttp.connect(MjpegHttp.java:33)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.Http.go(Http.java:46)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.CameraHttp.go(CameraHttp.java:13)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.camera.Camera.go(Camera.java:121)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.camera.Camera.parse(Camera.java:170)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.MjpegHttp.onReturn(MjpegHttp.java:23)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.Http.connect(Http.java:82)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.MjpegHttp.connect(MjpegHttp.java:33)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.Http.go(Http.java:46)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.CameraHttp.go(CameraHttp.java:13)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.camera.Camera.go(Camera.java:121)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.camera.Camera.parse(Camera.java:170)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.MjpegHttp.onReturn(MjpegHttp.java:23)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.Http.connect(Http.java:82)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.MjpegHttp.connect(MjpegHttp.java:33)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.Http.go(Http.java:46)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.CameraHttp.go(CameraHttp.java:13)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.camera.Camera.go(Camera.java:121)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.camera.Camera.parse(Camera.java:170)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.MjpegHttp.onReturn(MjpegHttp.java:23)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.Http.connect(Http.java:82)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.MjpegHttp.connect(MjpegHttp.java:33)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.Http.go(Http.java:46)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.connection.CameraHttp.go(CameraHttp.java:13)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepvizyon.camera.Camera.go(Camera.java:121)
10-28 14:06:19.994: ERROR/AndroidRuntime(3420): at spexco.cepviz