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
youngjun
Posts: 40
Registered: ‎09-03-2008
My Device: Not Specified
Accepted Solution

ControlledAccessException on RuntimeStore.getRuntimeStore()

We entered uncaught exception when launch an in house blackberry application on some berries. The error seems to go away after a battery reset on 8700, but we were getting it ramdomly on the 9000 device (every few reboots).

The application is built on JDE4.1.0

*************************************

event log:

Name: ControlledAccessException
GUID: 9c3cd62e3320b498
Time: Aug 07, 2008 11:25:06
No detail message
net_rim_cldc-12
ApplicationControl
assertIPCAllowed
0x2A87
net_rim_cldc-5
RuntimeStore
<private>
0xA165
net_rim_cldc-5
RuntimeStore
getRuntimeStore
0xA179
com_ms_rcdecommon
SMRTLED
getSMRTLED
0x3B30
com_ms_morganphone
MorganPhone
main
0x1322

*******************************************

code excerpt:

public static SMRTLED getSMRTLED()

{

RuntimeStore rs = RuntimeStore.getRuntimeStore();

SMRTLED sled = (SMRTLED) rs.get(
SMRTLED_STORE);

if (sled == null) {sled =

new SMRTLED();rs.put(SMRTLED_STORE, sled);

}

 

return sled;

}

*********************************

'sled' is not wrapped with ControlledAccess, why do we get ControlledAccessException?

 

Thanks,

 

June Young

Please use plain text.
BlackBerry Development Advisor
MSohm
Posts: 14,649
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook

Re: ControlledAccessException on RuntimeStore.getRuntimeStore()

ControlledAccessExpcetions can be thrown if the application tries to do something that it does not have permission to do.  These settings can be seen and updated by going to Options, Advanced Options, Applications, select your application and choose Edit Permissions from the menu.

 

An application can also query and request for permission changes by using the ApplicationPermissions class.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.