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: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Unable to upgrade a library .cod module

[ Edited ]
P.S. After you download the library module and before you install it using CodeModuleManager, just hash the module's contents (e.g., SHA-1 or MD5) and then see whether it is as expected. If your download is intact, then may be you could post here the code that passes the module's binary content to CodeModuleManager.
Message Edited by klyubin on 23-09-2009 10:35 AM
Message Edited by klyubin on 23-09-2009 10:39 AM
Developer
Posts: 83
Registered: ‎02-17-2009
My Device: Not Specified

Re: Unable to upgrade a library .cod module

I'm not sure what you mean with "just hash the module's contents (e.g., SHA-1 or MD5)"

 

Do you mean that i should check if the module gets corrupt in downloading process or in saving process?

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

Re: Unable to upgrade a library .cod module

Yes, check at which stage the module's contents get corrupted.
Developer
Posts: 83
Registered: ‎02-17-2009
My Device: Not Specified

Re: Unable to upgrade a library .cod module

Hi Klyubin and sorry for the delay in my tests, but i'm a bit of bussy these days...

 

Today my tests bring me new questions and no answers... I've been able to correctly upgrade de module and I've checked that the binary comparison between the modules (the one before downloaded and the other from the bb) also have this last difference in the last line... so, I don't know what to think...

 

I'll try as soon as possible to check the modules before installing it and after downloading...

 

Thanks

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

Re: Unable to upgrade a library .cod module

Just to keep track of what I'm getting about this issue...

 

I've managed to guess when this was happening exactly. If I try to upgrade a module for the first time, after a device wipe, it works. But if later I try to upgrade it again and I'm using a library module with the same name, vendor and version and with different code it doesn't work and the linker/verify error appears again during start up process.

 

At least is a controlled error.

 

Now that I have more or less controlled in 4.5 version, when I do the same with 4.7 os, the behaviour is not the same. Compiled and build with 4.7 the library module upgrade doesn't work becouse of a 

 

appSmiley Frustratedystem data:CMM: MyLibrary(1401) invalid sig for 0x52435

 

and later the CodeModuleManager.saveModule() call returns a CMM_HASH_INVALID error...

 

Tested on a Storm 4.7.0.132

App Built with 4.7.0.46

 

¿Any idea about this "invalid sig for  0x52435" or the CMM_HASH_INVALID?

 

Thanks

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

Re: Unable to upgrade a library .cod module

The obvious explanation, and that's the same explanation as before, is that the contents of your module have been corrupted. Have you checked whether your download code corrupts the contents of your module before your module gets written to the OS?
Developer
Posts: 83
Registered: ‎02-17-2009
My Device: Not Specified

Re: Unable to upgrade a library .cod module

[ Edited ]

Ok, i've just made a binary comparison between the downloaded library module with the original one and as you said it may have corrupted during downloading process, becouse they are not the same. The last line is different from one to another.

 

¿How can I solve or prevent this?

Message Edited by miskatonic on 10-02-2009 08:45 AM
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Unable to upgrade a library .cod module

Find out which component is responsible for the corruption. For example, it may be your (web) server, or it may be your download code on the BlackBerry.
Developer
Posts: 83
Registered: ‎02-17-2009
My Device: Not Specified

Re: Unable to upgrade a library .cod module

As you pointed, it was me who was losing one byte in my downloading code. With that fixed, everything worked as it should.

 

Thanks!

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

Re: Unable to upgrade a library .cod module

Wow. Congratulations!