Ubuntu: Why does my program crash if it doesn't fit in the display?



Question:

I used to make programs for my E-ink PocketBook using SDK from http://pbsdk.vlasovsoft.net/ on 32bit Ubuntu 12.04, and it worked great. Recently I went to 14.04 64bit.

I use gcc with the -m32 option for compiling for emulator which what this question is about. I spent a whole day fighting with ld and getting the compiler to work. Finally, my programs seemed to compile, but when I ran them they just crashed with segmentation fault (core dumped). Later I found out that program crashes on any screen drawing function. The emulator makes a window with dimensions of 600x800 and my laptop display uses 1366x768. It was no problem on Ubuntu 12.04, but it seems to be an issue here. If I tell the emulator to rotate the the window 90 degrees, it doesn't crash. I attached another display with dimensions of 1600x1200, and it doesn't crash. What should I do?

Everything works good with Xfce.

If you comment FullUpdate() line it will not crash.

  #include "inkview.h"    int main_handler(int type, int par1, int par2)  {      ClearScreen(); //Doesn't draw to screen, only buffer      FullUpdate(); //Draws to screen      return 0;  }    int main(int argc, char **argv)  {      InkViewMain(main_handler);      return 0;  }  

Outputs:

  Gtk-Message: Failed to load module "overlay-scrollbar"  GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.  ** Message: Command 501 selected    Segmentation fault (core dumped)  

Maybe it has to do something with overlay-scrollbar?


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »