×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    30

    Error: Panic WSERV 7

    My Code

    _LIT(KMBMFileName,"c:\\resource\\apps\\CustomControls.mbm");

    ContructL()
    {
    iBitmap = new (ELeave) CFbsBitma
    CleanupStack::PushL(iBitmap);
    iBitmap->Load(KMBMFileName, EMbmCustomcontrolsGrad);
    CleanupStack::PopAndDestroy();
    }

    Draw()
    {

    gc.UseBrushPattern(iBitmap); /// Error at this line
    const TRect bRect(0,40,180,100);
    gc.SetBrushStyle(CGraphicsContext::EPatternedBrush);
    gc.DrawRect( bRect );
    }

    Error -- Panic WSERV 7

    SDK doc says -- A corrupt bitmap handle was encountered. This is a common panic uncovered when a bitmap handle refers to nothing.

    Now, the MBM is creating in \resource\apps ..... I am not able to find where exactly is the problem lies.

    How can i be sure that the MBM is created correctly. CustomControls.mbm has a size of 254 bytes. How can i check whether my MBM is corrupt or not.

    Regards,
    Daaku

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: Error: Panic WSERV 7

    CleanupStack::PopAndDestroy(); deleted the bitmap, also you should check the error values given by Load(). Actually you should get Kern-Exec-3.

    Also do not ever put member variables into the cleanup stack, it would cause Kern-Exec-3 again in any leave situation..

  3. #3
    Registered User
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128

    Re: Error: Panic WSERV 7

    Quote Originally Posted by Daaku View Post
    My Code

    _LIT(KMBMFileName,"c:\\resource\\apps\\CustomControls.mbm");

    ContructL()
    {
    iBitmap = new (ELeave) CFbsBitma
    CleanupStack::PushL(iBitmap);
    iBitmap->Load(KMBMFileName, EMbmCustomcontrolsGrad);
    CleanupStack::PopAndDestroy();
    }

    Draw()
    {

    gc.UseBrushPattern(iBitmap); /// Error at this line
    const TRect bRect(0,40,180,100);
    gc.SetBrushStyle(CGraphicsContext::EPatternedBrush);
    gc.DrawRect( bRect );
    }

    Error -- Panic WSERV 7

    SDK doc says -- A corrupt bitmap handle was encountered. This is a common panic uncovered when a bitmap handle refers to nothing.

    Now, the MBM is creating in \resource\apps ..... I am not able to find where exactly is the problem lies.

    How can i be sure that the MBM is created correctly. CustomControls.mbm has a size of 254 bytes. How can i check whether my MBM is corrupt or not.
    Hi Daaku,

    Use CleanupStack::Pop(iBitmap); in place of CleanupStack::PopAndDestroy(); because you are deleting iBitmap object..

  4. #4
    Registered User
    Join Date
    May 2009
    Posts
    30

    Re: Error: Panic WSERV 7

    Got the point... I was deleting iBitmap ... My bad.

    But when i use CleanupStack::Pop(iBitmap); instead of PopAndDestroy();

    i get a new panic Wserv Panic BITGDI 13

  5. #5
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: Error: Panic WSERV 7

    you could maybe try out copy-pasting those strings into the search field in the SDK dcos, would make it faster for you to find the information, Anyway, that one is "Invalid bitmap", thus let me repeast my self:

    check the error values given by Load().

  6. #6
    Registered User
    Join Date
    May 2009
    Posts
    30

    Re: Error: Panic WSERV 7

    Quote Originally Posted by symbianyucca View Post
    you could maybe try out copy-pasting those strings into the search field in the SDK dcos, would make it faster for you to find the information, Anyway, that one is "Invalid bitmap", thus let me repeast my self:

    check the error values given by Load().

    Yeah i'm trying that out..

    Btw .... The Error value given by Load() is -12

  7. #7
    Registered User
    Join Date
    Feb 2007
    Location
    Tampere
    Posts
    370

    Re: Error: Panic WSERV 7

    Hi,

    Worth checking for the error in documentation before posting on forum.

    KErrPathNotFound -12 Unable to find the specified folder

    Bascially your bitmap path is wrong
    Regards

    - MVP
    "Dare To Dream" - A.P.J.Kalam

  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: Error: Panic WSERV 7

    ans wiki would also have a nice error code list:: http://wiki.forum.nokia.com/index.php/Error_codes

  9. #9
    Registered User
    Join Date
    May 2009
    Posts
    30

    Re: Error: Panic WSERV 7

    Thanks Guys .... Problem solved. @symbianyucca

    As @mrudulpen pointed

    KErrPathNotFound -12 Unable to find the specified folder

    File path _LIT(KMBMFileName,"c:\\resource\\apps\\CustomControls.mbm");

    must be changed from c:\\ to z:\\

  10. #10
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: Error: Panic WSERV 7

    Note that you can not use Z on real device, also you might want to make it work in different drives, so maybe you should use TFindFile or similar for detecting the drive..

Similar Threads

  1. DrawNow() giving WSERV 12
    By ankurjain123 in forum Symbian
    Replies: 1
    Last Post: 2009-06-08, 12:28
  2. CEikEdwin and WSERV 66 panic on Nokia E61
    By mike.b in forum Symbian
    Replies: 2
    Last Post: 2006-08-29, 15:01
  3. WSERV crash when using CActive
    By thewisemonkey in forum Symbian
    Replies: 2
    Last Post: 2004-07-21, 08:00
  4. ActivateGC() and WSERV 10
    By AusPaco in forum Symbian User Interface
    Replies: 0
    Last Post: 2004-05-23, 01:16
  5. Wserv 7 error
    By ars_firoozian in forum Symbian
    Replies: 4
    Last Post: 2003-11-18, 13:56

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×