WSERV 10 Panic with bitmap loading

Login to reply to this topic.
Fri, 2003-10-24 08:02
Joined: 2003-10-17
Forum posts: 16
I'm having a problem where I get a WSERV 10 Panic error when I run my code on the phone (7650), the code works fine on the emulator.

I've figured out that the problem occurs when I'm loading bitmaps using the following:

_LIT(KMBMFileName,"Z:\\System\\apps\\lookup\\splash_icon.mbm");

// load the bitmap from an .mbm file
ibitmap = new (ELeave) CFbsBitmap();
ibitmapMask = new (ELeave) CFbsBitmap();

User::LeaveIfError(ibitmap->Load(KMBMFileName, EMbmSplash_iconSplash_image));
User::LeaveIfError(ibitmapMask->Load(KMBMFileName, EMbmSplash_iconSplash_image_mask));

This code was working, until I added another compound control. Does anyone have any idea what's going on?

Thanks.

Fri, 2003-10-24 08:34
Joined: 2003-05-27
Forum posts: 363
WSERV 10 Panic with bitmap loading
Hi,

You should activate the drawing context only once per each drawing iteration - it appears that you are doing it twice.

Cheers,
Pawel
Tue, 2003-10-28 08:40
Joined: 2003-10-08
Forum posts: 106
'Z' is ROM Drive on the device
If the problem is only during loading, it's probably because on the target device, the app is not installed on 'Z' drive. That usually is reserved for the internal ROM. On the emulator the app is installed to 'Z'. But it is not so on the device. Try changing it to 'C' or 'D' depending on where you have installed it.

Regards,
Varun

Tue, 2004-06-01 10:09
Joined: 2004-06-01
Forum posts: 38
WSERV 10 Panic with bitmap loading
Hi all, to load Bitmap from mbm file, i use this function which is pretty usefull:

void LoadBitmapL(CFbsBitmap* aBitMap,const TDesC& aPathAndFile,TInt aId/*,TBool aShareIfLoaded*/)
   {
   _LIT(KTxtCDrive,"C:");
   _LIT(KTxtZDrive,"Z:");
   TParse mbfn;
   mbfn.Set(aPathAndFile,&KTxtCDrive,NULL);
   if (!aBitMap->Load(mbfn.FullName(),aId,ETrue))//ETrue --> aShareIfLoaded
   return;
   mbfn.Set(aPathAndFile,&KTxtZDrive,NULL);
   User::LeaveIfError(aBitMap->Load(mbfn.FullName(),aId,ETrue));//ETrue --> aShareIfLoaded
   return;
   }

i found it in one of the uiq exemple.
The loading works well BUT, now i'v got a WSERV 7 panics code.
I load my bitmap in :
void CMyView::ConstructControlsL()
   {
   monImage = new (ELeave) CFbsBitmap();
   LoadBitmapL(monImage,KMBMFileName,EMbmIdimgbrassieFondgolf);
   }
and i want to draw it in the Draw() function:
void CMyView::Draw(const TRect&/* aRect*/) const
   {
   CWindowGc& gc = SystemGc();
   gc.Clear();
   gc.BitBlt(TPoint(0,0), iImgFdVueInfosGolf);
       }

I can't? what did i do wrong? or how can i draw my bitmap?

Thx a lot.

-----------------------------------------------------------

BnJ, Developpeur Beta 2

  • Login to reply to this topic.