Results 1 to 3 of 3

Thread: Assertion failed Error for VG_TRUE in Open VG

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    10

    Assertion failed Error for VG_TRUE in Open VG

    Hi,

    I developed an Open VG application to draw a circle and a rectangle. The window is properly initialized and updated to the colour set in the code, but the circle and rectangle is not drawn in the screen.

    When i run the application, I am getting the following errors in the hyper terminal:
    *** ASSERTION FAILED in .\OpenVGApplication.cpp(13:
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(140):
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(144):
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(146):
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(14:
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(150):
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(153):
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(155):
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(157):
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(161):
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(164):
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(166):
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(16:
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(170):
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(173):
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(176):
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(17:
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(181):
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(183):
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(186):
    vgGetError() == VG_TRUE

    *** ASSERTION FAILED in .\OpenVGApplication.cpp(18:
    vgGetError() == VG_TRUE

    My code is:
    void CreateFilledRectangleCircle(void)
    {
    VGPath Rectangle;
    VGPath Circle;
    VGPaint fillRectangle;
    VGPaint fillCircle;

    /*Set White background colour*/
    VGfloat color[4] = { 0.00f, 0.80f, 0.80f, 1.0f };//RGBA

    /* Set the background colour*/
    vgSetfv( VG_CLEAR_COLOR, 4, color );
    vgClear( 0, 0, 500, 300);

    /*Rectangle */
    /*Create the path */
    Rectangle = vgCreatePath(VG_PATH_FORMAT_STANDARD,VG_PATH_DATAT YPE_F, 1.0, 0, 0, 0,VG_PATH_CAPABILITY_ALL);
    assert(vgGetError() == VG_TRUE);
    VGubyte seg[] = {VG_MOVE_TO_ABS,VG_LINE_TO_REL,VG_LINE_TO_REL,VG_L INE_TO_REL,VG_LINE_TO_REL,VG_CLOSE_PATH};
    assert(vgGetError() == VG_TRUE);
    VGfloat coords[] = {50,100,250,0,0,100,-250,0,0,-100};

    fillRectangle = vgCreatePaint();
    assert(vgGetError() == VG_TRUE);
    VGfloat Vertices[4] = {0.0f,0.4f,1.0f,1.0f};//Used to set colour to the rectangle. RBGA
    assert(vgGetError() == VG_TRUE);
    vgSetParameteri(fillRectangle,VG_PAINT_TYPE,VG_PAI NT_TYPE_COLOR);
    assert(vgGetError() == VG_TRUE);
    vgSetParameterfv(fillRectangle,VG_PAINT_COLOR,4,Ve rtices);
    assert(vgGetError() == VG_TRUE);

    vgSetPaint(fillRectangle,VG_FILL_PATH);
    assert(vgGetError() == VG_TRUE);
    vgAppendPathData(Rectangle,6,seg,coords);
    assert(vgGetError() == VG_TRUE);
    vgDrawPath(Rectangle,VG_FILL_PATH);
    assert(vgGetError() == VG_TRUE);

    /*Circle*/
    Circle = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F, 1.0f, 0.0f, 0, 0, VG_PATH_CAPABILITY_ALL);
    assert(vgGetError() == VG_TRUE);

    fillCircle = vgCreatePaint();
    assert(vgGetError() == VG_TRUE);
    VGfloat colour[4] = {0.0f,0.5f,0.25f,1.0f};//Used to set colour to the circle. RBGA
    assert(vgGetError() == VG_TRUE);
    vgSetParameteri(fillCircle,VG_PAINT_TYPE,VG_PAINT_ TYPE_COLOR);
    assert(vgGetError() == VG_TRUE);
    vgSetParameterfv(fillCircle,VG_PAINT_COLOR,4,colou r);
    assert(vgGetError() == VG_TRUE);

    vgSetPaint(fillCircle,VG_FILL_PATH);
    assert(vgGetError() == VG_TRUE);

    vguEllipse( Circle, 400, 150, 100.0f, 100.0f );
    assert(vgGetError() == VG_TRUE);
    vgDrawPath( Circle, VG_FILL_PATH );
    assert(vgGetError() == VG_TRUE);

    vgDestroyPath( Rectangle );
    assert(vgGetError() == VG_TRUE);
    vgDestroyPaint(fillRectangle);
    assert(vgGetError() == VG_TRUE);

    vgDestroyPath( Circle );
    assert(vgGetError() == VG_TRUE);
    vgDestroyPaint(fillCircle);
    assert(vgGetError() == VG_TRUE);

    eglSwapBuffers(egldisplay, eglsurface);
    assert(eglGetError() == EGL_SUCCESS);
    }

    Please help me in solving this.

    Thanks and Regards,
    Sowmya

  2. #2
    Senior Member
    Join Date
    Feb 2006
    Posts
    115

    Re: Assertion failed Error for VG_TRUE in Open VG

    The API document I have says that vgGetError() is defined as follows:
    VGErrorCode vgGetError(void)
    and where
    VGErrorCode is an enum with values like (VG_NO_ERROR [=0], VG_BAD_HANDLE_ERROR [=0x1000], etc).

    Did they change the spec?
    Pity if they did - the call used to return lots of very useful information before... :-p

  3. #3
    Junior Member
    Join Date
    Apr 2012
    Posts
    10

    Re: Assertion failed Error for VG_TRUE in Open VG

    Hi,

    I was checking for "VG_TRUE". I printed the value of the "vgGetError() " . Now i am getting "VG_NO_ERROR ". But nothing (rectangle and circle) is drawn in the window. The background colour is changing as per the value set in "color". Please help me in solving this issue.

    Regards,
    Sowmya

Similar Threads

  1. Replies: 0
    Last Post: 11-13-2012, 12:21 AM
  2. Error: eglInitialize() failed.
    By chandrashekar in forum OpenVG and VGU
    Replies: 5
    Last Post: 07-10-2010, 04:37 PM

Posting Permissions

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