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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Regular Contributor
Posts: 83
Registered: ‎12-09-2010
My Device: Not Specified

Create COD module via CodeModuleManager return 0 handle

Hello,

I'm trying to install my application  but after the 8th module the CodeModuleManager won't create modules and return me 0 handle.

I've wrote a really simple script which doesn't write any data in modules but juste create them.

 

            int[] modulesHandles = new int[15];
            int moduleSize = 1024 * 60;
                
            for (int i = 0 ; i < modulesHandles.length ; i++)
            {
                  modulesHandles[i] = CodeModuleManager.createNewModule(moduleSize);
                  System.out.println("Module "+i + " > handle : " + modulesHandles[i] );
            }

 And the result is :

 

[101.859] Module 0 > handle : 18964
[101.867] Module 1 > handle : 18963
[101.875] Module 2 > handle : 18961
[101.875] Module 3 > handle : 18959
[101.882] Module 4 > handle : 18958
[101.882] Module 5 > handle : 18957
[101.89] Module 6 > handle : 18956
[101.89] Module 7 > handle : 18955
[101.89] Module 8 > handle : 0
[101.89] Module 9 > handle : 0
[101.89] Module 10 > handle : 0
[101.89] Module 11 > handle : 0
[101.89] Module 12 > handle : 0
[101.898] Module 13 > handle : 0
[101.898] Module 14 > handle : 0

 

 

I've exactly the same problem if I wrote data in modules and same result if I reduce the module size..

I can't understand why after 8 modules the codemodulemanager won't to save more modules...

I'm in the simulator, someone can tell me if I'm doing something wrong?

Thanks for your help.

Regular Contributor
Posts: 83
Registered: ‎12-09-2010
My Device: Not Specified

Re: Create COD module via CodeModuleManager return 0 handle

Hello,

Someone have tried this simple code  and have same issue ?

 

thanks

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

Re: Create COD module via CodeModuleManager return 0 handle

Which BlackBerry Smartphone model and BlackBerry handheld software version are you testing on?  You can find this under Options, About on the BlackBerry Smartphone.

 

Are you testing on a real device or in the simulator?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Regular Contributor
Posts: 83
Registered: ‎12-09-2010
My Device: Not Specified

Re: Create COD module via CodeModuleManager return 0 handle

Hello,

I've tried on both, simulator (for 9360) and bby 9360 (7.0.0.594)

Thank you

Regular Contributor
Posts: 83
Registered: ‎12-09-2010
My Device: Not Specified

Re: Create COD module via CodeModuleManager return 0 handle

Hello Mark,
Have you tried to reproduce the problem?
BlackBerry Development Advisor
Posts: 15,888
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Create COD module via CodeModuleManager return 0 handle

I have been able to reproduce this.  You can work around this issue by creating the module and writing the data all in a single call using CodeModuleManager.createNewModule(int, byte[], int).

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.