Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Highlighted
Developer
Posts: 66
Registered: ‎09-04-2008
My Device: Z10
Accepted Solution

App crashes: "All WebKit threads for this process have been shut down"

Hi bbdevs,

 

develop a webworks application wich uses the 

watchPosition()

function. 

 

At some time during the watchPosition Function is active my app crashes away.

This happens on a Z10 where my app is installed in debug mode. 

I use Webworks SDK 1.0.4.11 and bbUI.js 0.9.6.131.

 

The "watchPosition()" function calls a function where i make a small database insert on the devices websql.

This works well - also when app is backgrounded. 

 

Befor the app crashes the last thing happend is a successful insert of the data to the database. This is what my console.log says.

For better debugging i installed the Momentics IDE (from the cascades tools) and connected to the device via ssh.

With the command "slog2info -w" i can see more logs then in my chrome browser (Thanks to ekke for this great tip!).

 

This happens in the slog befor the app crahes:

Apr 05 14:06:15.042      webkit_launcher.233201698               webkit      0  All WebKit threads for this process have been shut down.
Apr 05 14:06:15.063      webkit_launcher.233201698               webkit      0  WebKit graphics for this process has been shut down.
Apr 05 14:06:15.134      webkit_launcher.233201763               webkit      0  Received unexpected connection death 1073741825 from parent process! Exiting...

 A few minutes ago i found this in the log too:

Apr 05 14:04:58.440      webkit_launcher.233201698               webkit      0  Thread 5: responding to low memory
Apr 05 14:04:58.440      webkit_launcher.233201698               webkit      0  Thread 7: responding to low memory
Apr 05 14:04:58.440      webkit_launcher.233201698               webkit      0  Thread 1: responding to low memory
Apr 05 14:04:58.441      webkit_launcher.233201763               webkit      0  Thread 4: responding to low memory
Apr 05 14:04:58.441      webkit_launcher.233201763               webkit      0  Thread 1: responding to low memory
Apr 05 14:04:58.441      webkit_launcher.233201763               webkit      0  Thread 6: responding to low memory
Apr 05 14:04:58.441      webkit_launcher.233201763               webkit      0  Thread 14: responding to low memory
Apr 05 14:04:58.446      webkit_launcher.233201698               webkit      0  Thread 4: responding to low memory
Apr 05 14:04:58.619      webkit_launcher.233201763               webkit      0  Thread 3: responding to low memory

For mor informations:

This is my SQL Transaction, which is called by the watchPosition function:

database = window.openDatabase('mydbname', '', 'my Database', 1 * 1024 * 1024);
			try {
				database.transaction(
			        function (tx) {tx.executeSql('INSERT INTO tbl_gps (lon, lat, alt, acc, altacc, head, speed) VALUES (?, ?, ?, ?, ?, ?, ?)',
			            [posData.coords.longitude, posData.coords.latitude, posData.coords.altitude, posData.coords.accuracy, posData.coords.altitudeAccuracy, posData.coords.heading, posData.coords.speed],
			            function (tx, res) {
			            	onInsertSuccess = true;
							console.log('Data insert into Table GPS Data Successfully');
			            },
			            function (tx, err) {
			            	onInsertSuccess = true;
			            	showToast("ERROR - DB INSERT Trail GPS Data - code: "+err.code+", message: "+err.message, "OK", 60000);
			            });
			        }
			    );
			 } catch (err) {
				 console.log('There was an Error during database transaction! '+err.message);
			 }

 Has anybody any idea to this problem solved? I will be happy on any comment to bring me a little bit forward to let this work.

 

Thanks a lot in advance to everybody who read this thread.... and thanks a lot more for any tip!!!

 

Lars.

---

My Twitter:
http://twitter.com/lgentz
Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: App crashes: "All WebKit threads for this process have been shut down"

Thanks for posting this question.  This feels like more than a common troubleshooting problem, we may be dealing with a platform bug here.  Can you submit this to the developer issue tracker and I'll get this escalated to the WebKit team for investigation. There may be something happening a the native layer that is interfering with debug mode + WebDB.

 

File the issue under "BlackBerry 10" and please provide all the details listed below for steps to reproduce / expected / actual results.  In fact, if you could post a working sample that reproduces this issue, it will help greatly with the investigation:

https://www.blackberry.com/jira/secure/Dashboard.jspa

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Developer
Posts: 66
Registered: ‎09-04-2008
My Device: Z10

Re: App crashes: "All WebKit threads for this process have been shut down"

Hi adam,

 

thanks for your message. I tested a lot last weekend and after hours and hours i figured out more details on this memory problem.

First:
It was not a database problem :-)
The database transaction is accidentally the last thing that asynchron happens. But the reason for the app crash was an other.

I also draw a line on the map with every location-update.  I use openlayers for this feature. When the app is in background it seems that there is a problem with openlayers. 

 

I found a solution to solve this:

I store my data for the line in an array when the app is backgrounded - when it comes back to foreground i take the data of the array and draw the line again. 

 

When i get the error again - hope not of course - i will open an issue in jira.

 

Thanks also to luca for some brainstorming !

 

---

My Twitter:
http://twitter.com/lgentz