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
Posts: 56
Registered: ‎07-14-2008
My Device: Not Specified

4.5 PIM problem

Recently a number of our users have reported our application is crashing when syncing with the BlackBerry PIM system.  Looking at the device log we see this:

 

S Java Exception - Error - 1/12 18:06:48
| No detail message
| net_rim_pdap
| RepeatRule
| setInt
| 0xBD81
| net_rim_pdap
| RepeatRuleUtil
| createRepeatRule
| 0xC068
| net_rim_pdap
| EventImpl
| <init>
| 0x824F
| net_rim_pdap
| EventListImpl
| items
| 0x86DC
| com_gwhizmobile_gotta
| Got2PIMSync
| syncEvents

 

This crash is occurring in the call to items() as shown here:

 

         Enumeration en;

 

           try {
                en = evl.items(EventList.OCCURRING,
                                        mToday,
                                        mNextWeek,
                                        false);
            } catch (PIMException e1) {
                Log.bblog(TAG, "Can't get Event List for new events");
                continue;
            }

 

It seems that the call to items() is throwing an exception.  I cannot repeat this error on my own device which is running 4.5 but I've had several customers running 4.5 report this error within the last few days.  This is code that has not changed in six months.

 

Any ideas?

 

Developer
Posts: 56
Registered: ‎07-14-2008
My Device: Not Specified

Re: 4.5 PIM problem

Update:  I had a customer run some debug code, and the exception being thrown is a java.lang.IllegalArgumentException.  That exception should not be thrown from that method according to the API dox.

 

I just don't get why this has been working for so long and just started to fail.  

BlackBerry Development Advisor
Posts: 15,083
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell
Developer
Posts: 56
Registered: ‎07-14-2008
My Device: Not Specified

Re: 4.5 PIM problem

Mark -

 

Thanks for your response - can I get information on specific conditions that cause it to happen?

 

Mike

BlackBerry Development Advisor
Posts: 15,083
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: 4.5 PIM problem

After some further investigation, we found that this issue exists in BlackBerry handheld software version 4.5.0 and higher and has not yet been fixed. 

 

The issue is that EventList.items() throw an IllegalArgumentException if one of the events to be included in the returned Enumeration has a “relative, yearly” recurrence set.  There is unfortunately no workaround for the issue, except to try to exclude the problematic event, which is tricky because you just have to use trial and error to determine the date range to specify in order to exclude it.

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
Developer
Posts: 56
Registered: ‎07-14-2008
My Device: Not Specified

Re: 4.5 PIM problem

Mark -

 

Thanks for taking the time to figure out what was going on.  At least this lets me let my customers know how to get around the issue.

 

Mike

New Developer
New Developer
Posts: 1
Registered: ‎08-20-2009
My Device: Not Specified

Re: 4.5 PIM problem

[ Edited ]
If I create yearly repeating event with relative date in january used a standard application of the blackberry device "calendar", this application displays it and does not crash. But if my application tries to receive this event with evl.items(), my application crashs, because the exception is thrown out.
How the standard application "calendar" receives the list of events? I can use this way in my application?
Message Edited by aav on 08-20-2009 11:00 AM
Visitor
Posts: 1
Registered: ‎08-09-2008
My Device: Not Specified

Re: 4.5 PIM problem

Has this problem been fixed? I'm running 4.5 also and cannot install my app's because of getting PIM error's.

Regards,

Steve