Search code examples
linuxxlib

Origin of message from Xlib: "Killed"


I'm using ImLib2 to grab images periodically from an Xlib application; and sending fake keysignals to the application window using libxdo. After about 10 minutes, my command-line program terminates with the message "Killed".

I'm quite new to X programming. Does anyone know where the "Killed" message is being sent from?


Solution

  • The problem seems to have been due to not calling the imlib_free_image function after each call to imlib_context_set_image. The inner loop now looks more like this:

    Imlib_Image ii = imlib_create_image_from_drawable(0,x,y,w,h,1);
    imlib_context_set_image(ii);
    DATA32 *data = imlib_image_get_data();
    examine_data(data);
    imlib_free_image();