Intermittent crash Client 3.1.x on Windows XP

Hi all,

We have a customer database.
User creates new customer.
Then clicks the account number field, this triggers a script which makes a list of unused account number to allow the user to select in a selectDialog.

Once in a while Servoy client crashes as it displays the dialog leaving a gray area on screen and renders the java console gray as well.

Nothing logged in the server log.

We have not able to repeat this so we can send a test case.
Have anyone seen anything similar?

Window XP
Java 1.5.latest (not Java 1.6)
Servoy 3.1.x series

var query = "SELECT customer_account_number FROM acc_customers WHERE customer_account_number ILIKE ? ORDER BY customer_account_number";
if(customer_name) {
	if(customer_is_person) {
		var root = utils.stringMiddleWords(customer_name,2,1);
		if(root) root = root.substr(0,1);
	} else {
		var root = customer_name.substr(0,1);	
	}
	var acc_no = globals.acc_generate_account_number(query,root.toUpperCase(),controller.getServerName());
	if(acc_no) {
		customer_account_number = acc_no;
		controller.saveData();
	}
} else {
	plugins.dialogs.showErrorDialog('Error', "Can't generate account number for customer with no name.",'OK');
}

acc_generate_account_number:

var query = arguments[0];
var server = arguments[2];
var root = plugins.dialogs.showInputDialog('New Account Number','Account Numbers starting with',arguments[1]);
if(! root) return 0;
root = root.toUpperCase();
var args = new Array();
args[0] = root + '%';
var new_acc_no = '';
var acc_nos = new Array();
var new_acc_nos = new Array();
var dataset = databaseManager.getDataSetByQuery(server,query,args,1000);
for ( var i = 1 ; i <= dataset.getMaxRowIndex() ; i++ )
{
	acc_nos[dataset.getValue(i,1)] = 1;
}

i = 1;

//if long code input, allow it to be selected
if(root.length > 3) {
	if(! acc_nos[root]) {
		new_acc_nos.push(root);		
	}
}

var done = false;
while (! done)
{
	new_acc_no = root + utils.stringRight('000' + i.toFixed(0), 3);	
	if(! acc_nos[new_acc_no]) {
		new_acc_nos.push(new_acc_no);
		if(new_acc_nos.length > 19) {
			done = true;
		}
	}
	i++;
}
return plugins.dialogs.showSelectDialog("New Account Number",  'Please select one',  new_acc_nos);

Sounds/looks like a memory issue. Have you tried raising client memory?

Hi Marcel,

servoy.maxClientHeap: 256

Is that the memory increase suggested by your plugin-installer?

Nope, that is memory for the server/developer.

I am talking about the settings in the client-admin (web) pages.
You can specify the memory for a client in there.
Not only a potential problem solver for your specific case but also nice to stop your users from complaining about performance :)