Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

I have been just testing my application on VX6000 in low memory conditions.

I have just discovered that calling ISHELL_CreateInstance crashes the phone when there is no memory available and I am trying to create an address book instance. It *only* happens when I am trying to create address book.

I wonder if anyone else has experienced this problem. This is definitely BREW / VX6000 specific implementation problem but it may fail True BREW testing.

Following sample code is crashing every time:

// allocate all available memory
int size = 65536 ;
while (size > 0)
{
void *xx = MALLOC(size) ;
if (xx == 0) size = size / 2 ;

// try to create address book, the phone will restart here...
ISHELL_CreateInstance(m_shell, AEECLSID_ADDRBOOK, (void**)&m_addr_book) ;

I did the exactly same tests with IADDRBOOK_EnumNextRec()
Apparently it's crashing as well, but in a bit different way. It displays an error: "Application Error - Memory Access"
Looks like the addressbook implementation on VX6000 is really unstable :-(

I did the exactly same tests with IADDRBOOK_EnumNextRec()
Apparently it's crashing as well, but in a bit different way. It displays an error: "Application Error - Memory Access"
Looks like the addressbook implementation on VX6000 is really unstable :-(

Why do you think this is specific to the VX6000? Your sample code was crashing my emulator just fine.

Why do you think this is specific to the VX6000? Your sample code was crashing my emulator just fine.

Max,
What exactly means "crashing"? I tried the same code in 3.0 Simulator and ISHELL_CreateInstance returns -1 but no access violation. And BTW - what's -1?

Max,
What exactly means "crashing"? I tried the same code in 3.0 Simulator and ISHELL_CreateInstance returns -1 but no access violation. And BTW - what's -1?

This was on the 2.1 emulator. It looks like a problem with AddrBook in BREW 2.x.

This was on the 2.1 emulator. It looks like a problem with AddrBook in BREW 2.x.

I have created a bug report for this issue.

I have created a bug report for this issue.