BlackBerry Forums Support Community

BlackBerry Forums Support Community (
-   Developer Forum (
-   -   IllegalStateException issue when closing a PopupScreen (

return0 08-10-2009 04:34 AM

[SOLVED]IllegalStateException issue when closing a PopupScreen
Hi all,

I've got a PopupScreen that uses a LocationProvider to get a GPS position and that displays acquire state.
But there is an IllegalStateException when trying to close it in the

public void locationUpdated(LocationProvider provider, Location location)
event invoked by my LocationProvider. I already tried with the

synchronized(UIApplication.getEventLock()) {



synchronized(this) {

in both popup screen and a method inside another component but it changes nothing at all :cry:. If anyone already saw this issue or have an idea about how to resolve this, it would be very helpfull for me.

Thanks in advance

return0 08-10-2009 05:19 AM

Issue solved by stopping the location provider before the closing method and by still using the synchronized property.

this.oLocationProvider.setLocationListener(null, 0, 0, 0);
synchronized(UiApplication.getEventLock()) {

Sorry for the disturb, week end was very hard for me ;-)

All times are GMT -5. The time now is 11:43 AM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.