I've noticed that when there is less than about 400 bytes left in the record store:

rs = RecordStore.openRecordStore("mydata", true);
int available=rs.getSizeAvailable();

then problems start to happen.
First, no exception (RecordStoreFullException) is thrown when trying to write to the store.
Second, on exit of the app, an application error is shown, displaying the RecordStoreFullException.

E.g.

RecordStore rs=null;
try
{
rs = RecordStore.openRecordStore("mydata", true);
if(rs.getSizeAvailable()>=257) // 257 is how many bytes I need
{
// write some data
}
}
catch(Exception e)
{
// this doesn't catch the RecordStoreFullException
}

if(rs!=null)
{
try
{
rs.closeRecordStore();
}
catch (Exception e)
{
}
}

This gives an application error on exit, displaying the RecordStoreFullException, which should have been caught.

I suspect the creating of the record store triggers this.

Any thoughts?