program crash when using c++ code

Help
stefanik
2013-07-09
2013-07-12
  • stefanik
    stefanik
    2013-07-09

    Hy,
    i'm completely new about c++ but i'm not able to understand wath i'm doin wrong. I've installed MinGW and eclipse CDT on windows and i'm able to compile the c++ example correctly (no errors), but when i start the program it chashes at the callback level without any possibility to acess the image object. It seems to recognize the qr code but in the callback procedure it is impossible to refer the image object.
    I've also compiled the zbar source code under ubutu 12.04 but i have the same problem: in the callback procedure, when i try to access the image object, the program crashes.

    Any other experiment the same problem?

    tanks
    bye

     
  • stefanik
    stefanik
    2013-07-12

    it seems enough to add

    Image tmp(zimg, 1);

    before

    Image image = (Image)zbar_image_get_userdata(zimg);
    ((Handler)userdata)->image_callback(image);

    in static void _cb of image.h

    i don't know why!!!