S60 3rd (N73) - image loading, CActiveScheduler
| Thu, 2007-09-06 20:32 | |
|
hi, thnx for ideas Jakub bool CPictureLoader::LoadPicture(const TDesC&iFileName)_________________ Jakub Misek |
|
| Thu, 2007-09-06 20:32 | |
|
hi, thnx for ideas Jakub bool CPictureLoader::LoadPicture(const TDesC&iFileName)_________________ Jakub Misek |
|
Forum posts: 364
If you're using the applciation/eikon framework to write an application as you imply then there's no need to start and stop the active scheduler. I'm surprised it works on those over platforms/devices.
Forum posts: 7
util->OpenL(); and util->ConvertL(); are doing asynchronous calls, so there must be some waiting for finished call. This procedure was posted even here on newLC/Image-loading-and-color-reduction
Forum posts: 364
I didn't say anything about not waiting for finished calls, I said you shouldn't be starting and stopping the active scheuduler if your program is an application*.
From that link you gave the files only include basic header files so its not an application so that means it has to install and start an active scheduler if it wants to use active objects. If you're an application then an active scheduler is already installed and has been started for you by the framework.
The code in that link is a mess, it and your code is confused about when/when not to use active objects and how to incorporate callbacks into them and the the code.
Read the stuff about active objects and the scheduler in here
http://www.newlc.com/topic-13580
* You say its view based so I'm assuming its an app i.e. its a graphical UI using apparc and cone and eikon (or avkon etc.).
You say the scheduler is installed, if you are an app then you shouldn't install one if you are doing so explicitly.
Forum posts: 68
That is some depricated code, but as you used it on Symbian 6 thats understandable. You should use CActiveSchedulerWait to start and stop specific sheduling loops.
Add code like this.
class CPictureLoader{
// This will be compiled for Symbian 8.1 and up
#ifdef EKA2
private:
CActiveSchedulerWait *iWait;
#endif
};
Change CActiveScheduler::Start(); with
#ifdef EKA2iWait->Start();
#else
CActiveScheduler::Start();
#endif
and CActiveScheduler::Stop(); with
#ifdef EKA2iWait->AsyncStop();
#else
CActiveScheduler::Stop();
#endif
I'm not sure if this will work, but it's the way starting and stopping the ActiveScheduler should be done. You might try to switch to CImageDecoder, instead of CMdaImageFileToBitmapUtility.
Forum posts: 7
its quite strange
iWait->Start(), CActiveScheduler::Start(), SetActive() /* i've switched to CImageDecoder and i'm using CActive object */ ... every of these methods are closing the application ... on another phones and on emulator its working fine.
Forum posts: 68
Then I think it is a problem with that specific phone, see if you can get a firmware update on that phone, can you view bitmaps in the phone's gallery? If you can get your hands on another n73, or ohter 3rd edition phone, that would show if it's a problem with the phone or your application. If you like you could send a copy of your sis file to me, and I'll check if it works on my E60(S60 3rd MR). Just send me a private msg. and I'll give you my e-mail details.
Forum posts: 7
the phones firmware is updated, everything is working. Other Active objects and ActiveSchedulers in this application are working on this phone. I thing I have bug somewhere, but the code is to simple to be wrong. Are there some other limitations of ActiveScheduling ? I'll try it on other phones ... thank you for hints
But now I changed CMdaImageFileToBitmapUtility to CImageDecoder - and there is NEW bug
(not working even on emulator) ( CImageDecoder::Convert never finishes (S60 3rd) )