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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Regular Contributor
ricken
Posts: 75
Registered: ‎12-09-2010

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.

Please use plain text.
Regular Contributor
ricken
Posts: 75
Registered: ‎12-09-2010

Re: Create COD module via CodeModuleManager return 0 handle

Hello,

Someone have tried this simple code  and have same issue ?

 

thanks

Please use plain text.
Administrator
MSohm
Posts: 12,957
Registered: ‎07-09-2008
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.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Regular Contributor
ricken
Posts: 75
Registered: ‎12-09-2010

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

Please use plain text.
Regular Contributor
ricken
Posts: 75
Registered: ‎12-09-2010

Re: Create COD module via CodeModuleManager return 0 handle

Hello Mark,
Have you tried to reproduce the problem?
Please use plain text.
Administrator
MSohm
Posts: 12,957
Registered: ‎07-09-2008
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.
Found a bug? Report it using the Issue Tracker
Please use plain text.