We have been struggling a while with that our application reboots on our series 40 devices.
This crash is really hard to reproduce since it don't happen most of the time.
We finally traced it down to when the http connection being opened.
Is this a known error?
Has anyone experienced the same?
Is there a workaround?
I did read through the Known issues and have searched the forums but found nothing.
Our set-up is as follows:
Permission for http is set in the jar signed jar file.
The MIDlet is set to prompt for access to the network every time.
Most of the time (like 19 of 20 tries) when the connection is executed, the prompt is shown and whether choosing to allow or not allow the connection the application executes fine.
Some times the application causes the phones to reboot, before the prompt is shown.
This bug was hard to trace down since no Throwables are thrown.
One could expect some RuntimeException, but no.
The firmwares of the two devices are:
Nokia 6021: V 03.93
Nokia 6230i: V 03.46
Code for http used when this crash appeared:
Debug trace output:
public StreamConnection openStreamConnection(String url, String contentType, int contentLength) throws IOException
String params = model.getRouterProperty(RouterProperties.KEY_URL_POSTFIX_PARAMS, "");
trace("got RouterProperty: " + model.getRouterProperty(RouterProperties.KEY_URL_POSTFIX_PARAMS, ""));
HttpConnection con = (HttpConnection)Connector.open(url + params, 3); //Connector.READ_WRITE );
trace("set requestProperty excpect");
con.setRequestProperty( "Content-Type", contentType );
trace(" set Content-Type: " + contentType + " (Request)");
con.setRequestProperty( "Content-Length", String.valueOf(contentLength));
trace("set request property Content-Length" + String.valueOf(contentLength));
con.setRequestMethod( HttpConnection.POST );
trace("set request method POST");
public void ourHttpStarter(int length) throws IOException
header = this.getHeader(length);
trace("url: " + url);
trace("contentType: " + this.getContentTypeRequest());
trace("h.length + header" + (header.length + length));
if(null != con) con.close();
con = openStreamConnection(url, this.getContentTypeRequest(), header.length + length);
trace("SecurityException: " + se.getMessage());
throw new IOException(se.getMessage());
trace("IllegalArgumentException: " + iae.getMessage());
throw new IOException(iae.getMessage());
trace("Throwable:" + t.getMessage());
throw new IOException(t.getMessage());
h.length + header 43