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

Developer

Forums

Forums:

Hi
I have discovered very interesting behaviour of IDISPLAY_DrawText.
I was just preparing an application for True BREW testing and I was testing the app in low memory conditions.

So, when memory allocation fails I am displaying an error message using IDISPLAY_DrawText().... Unfortunately (in the emulator) it fails returning EUNSUPPORTED... He, he... That's really funny...

Well. I hope, maybe someone has any idea how to display text in such circumstances :-)

Ziemowit

I don't bother displaying a low-memory message: I just quit the application without telling the user why it failed. This method has passed NSTL and been accepted by the carriers several times in our applications.
The likelyhood of getting a low-memory message is very low if you have written your program to be careful about memory usage. You still must handle all allocations as if they will fail, but I suspect that testing is the only time anyone will exercise that code.
-Aaron

I don't bother displaying a low-memory message: I just quit the application without telling the user why it failed. This method has passed NSTL and been accepted by the carriers several times in our applications.
The likelyhood of getting a low-memory message is very low if you have written your program to be careful about memory usage. You still must handle all allocations as if they will fail, but I suspect that testing is the only time anyone will exercise that code.
-Aaron

Thanks a lot Aaron!
I think you are right, I am just being too concerned about small details. However True BREW Test specification says that such cases should be handled "gracefully"... Anyway, if it's ok just to exit then I think I am not worried any more...
Zim

Thanks a lot Aaron!
I think you are right, I am just being too concerned about small details. However True BREW Test specification says that such cases should be handled "gracefully"... Anyway, if it's ok just to exit then I think I am not worried any more...
Zim

glad to help. I define "gracefully" as "phone does not reset and saved data is not corrupted".

glad to help. I define "gracefully" as "phone does not reset and saved data is not corrupted".