Force unloading a DLL in RAM
| Wed, 2007-07-04 13:53 | |
|
|
Hello, I think I have a problem when upgrading a DLL to a newer version. My application sometimes crash after an update with the following scenario: After a phone rebbot, everything works well. I cannot find the information again, but I remember having read somewhere that DLL were kept in RAM 15 or 20 seconds after nobody uses them and that could cause a problem in case of upgrade. Which is typically my case. However, I do not have a solution for this. How can I force Symbian OS to discard the RAM copy of my DLL ? Thanks for any help. Eric Bustarret |






Forum posts: 363
Hello Eric,
I have never seen this problem. I have had to use a "killer" process that is run automatically on uninstallation by the uninstaller, but that was to force release of fonts, recognizers etc.
Even if the kernel did "lazy" unloading of DLLs, I have a hard time believing it would actually result in this kind of problem.
Were you able to verify that the installer installs the newer version? If that is the case, there is no way that the in-RAM loaded code would be mismatched with the on-disk version.
If you need a quick fix and you know that adding a delay would solve the problem, then perhaps you could have the PKG contain a "starter" EXE with a delay to start the actual app .
Cheers,
Pawel
Forum posts: 2006
Hello Pawel,
Good to hear from you again!
Yes it does. Actually my DLL also acts as a repository for some bitmaps and skinned component shared by the others EXEs... and the new icons only appears after a phone reboot. New features are also available after the installation & reboot.
Yep. But that would be a last solution to implement. The user experience would be too strange as the application appear on screen right after installation and that is a requirement from my customer.
Cheers,
Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant
Forum posts: 363
Ok,
Let's separate icons and code from each other
. There is a known problem with SVG and bitmap caching that will result in "old" icons showing even if you explicitly load new ones. I have a solution to that somewhere..
But can you verify that you indeed have "new" code on disk and "old" code in memory?
Forum posts: 2006
If you find the solution back.... I am interested!
So far, everything looks fine... but this only happen sometimes. So it is quite difficult to reproduce but only happen just after an update of the app.
Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant
Forum posts: 363
Ok,
I found the thread where I discussed this before. It is good to know this when dealing with SVG bitmaps on S60. Deleting the bitmap object will NOT purge the SVG data from FBS cache on its own, you must use DestroyIconData method for this!
http://discussion.forum.nokia.com/forum/archive/index.php/t-93498.html
Cheers,
Pawel
Forum posts: 2006
Cool... Thanks a lot
Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant
Forum posts: 2006
I am 99% sure that running exe / dlls are not correctly upgraded by the installer (tested on N70 / S60 2nd edition device).
Looks ok on 3rd Edition devices however.
Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant