Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
miskatonic
Posts: 83
Registered: ‎02-17-2009
My Device: Not Specified

ControlledAccessException on PersistentStore while launching application...

Hi,

 

I've made an app that stops and delete a running module, and reinstalls and launch a new version of it. Some kind of upgrading module mechanism using GlobalEventListener.

 

I've been able to test it succesfully on a Curve 8900 4.6.1, with my apps built using 4.5.0 jde but when i test it in both Storm 2 5.0.0.306 and Bold 9700 5.0.0.321 I'm getting the following prompt:

 

"Application terminated: MyApp has been denied the "Cross Application Communication" permission"

 

In the eventlog this is what i get. The java error is exactly when launching new module. If later i make a hard-reset the new module launches properly (it's an auto-run module)

 

guid:0x9C3CD62E3320B498 time: Thu Dec 10 12:34:30 2009  severity:1 type:3 app:Java Exception data:
    ControlledAccessException
    No detail message
    net_rim_cldc-19(4AD92B03)
     ApplicationControlImpl
     assertIPCAllowed
     0x2178
    net_rim_cldc-19(4AD92B03)
     ApplicationControl
     assertIPCAllowed
     0x2C2
    net_rim_cldc(4AD92B03)
     PersistentStore
     <private>
     0x9C73
    net_rim_cldc(4AD92B03)
     PersistentStore
     getPersistentObject
     0x9CA9
    MyApp(4B20D86B)
     MyApp
     <init>
     0x3579
    MyApp(4B20D86B)
     MyApp
     main
     0x3623

 

It's strange because i've checked that the "cross application communication" default permission is set to allow. I have even tried setting all permissions to allow and i get the same error...

 

Any idea?

Thanks in advance...

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: ControlledAccessException on PersistentStore while launching application...

Long time ago there used to be a bug/feature where reinstalling a module without rebooting would result in the permissions of this module looking OK, but actually the module would lack the IPC permission. Cold-rebooting the device used to help.

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: ControlledAccessException on PersistentStore while launching application...

I can confirm that we used to see this 'feature' too.  Cold restart worked for us too.

Developer
miskatonic
Posts: 83
Registered: ‎02-17-2009
My Device: Not Specified

Re: ControlledAccessException on PersistentStore while launching application...

Thanks for your reply...

 

What do you mean with cold-reboot? is what i call hard-reset? (battery out and so...)

 

Is this the one and only solution?

 

Is this a known "bug/feature" which i can follow somewhere?

 

 

Developer
miskatonic
Posts: 83
Registered: ‎02-17-2009
My Device: Not Specified

Re: ControlledAccessException on PersistentStore while launching application...

Can anyone throw some light on this?

 

Any solution other than hard reset?

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: ControlledAccessException on PersistentStore while launching application...

I am not aware of another solution.

Developer
dnepr
Posts: 723
Registered: ‎03-12-2009
My Device: Playbook

Re: ControlledAccessException on PersistentStore while launching application...

Fun "feature"... there are a lot of such "features" when installing/updating modules.

 

There is a workaround that does not require a cold boot though.

 

It requires you to request a permission screen (via ApplicationPermissionsManager) the request for permissions is blocking, so you can just force the permissions screen and add a flag to persistent object that the permissions have been requested.

 

As far as I can tell just saving the permissions is enough to fix all of the "features" as we like to call them.

 

This is really annoying bug, since it requires user interaction.   Nevertheless, asking for permissions is much less painful than a 15 minute cold boot.

 

This fixes all sorts of "features" with CMM libraries, class linking, etc.  Stuff that typically requires a reboot.