BlackBerry Forums Support Community

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

return0 08-10-2009 03: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 04: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 01:47 PM.

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