Fix pixman_region_init_rect bug

5.5k Views Asked by At

I know this is a bug that has been around for a while and fixed. But my situation seems to be a little different. When I open say a text file in gedit via terminal, I receive this error:

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

I know it is because of my theme, because I do not get the error when I switch my theme. But I really like my theme and don't want to change it. Instead, I would like to figure out what or which lines are causing the error, and correct them. But, I don't not know how exactly to go about it. In Android, I can simply run adb logcat, and see what is causing issues. But I am not on Android, I'm on Linux Mint 17.2 running cinnamon desktop. So, my question is, how can I log this error or track it down somehow?

1

There are 1 best solutions below

1
On

Just as the error message suggests, you need to use a debugger and set a breakpoint on the '_pixman_log_error' function. A standard debugger in Linux is gdb, and you can find a complete user manual for it here: https://sourceware.org/gdb/current/onlinedocs/gdb/

In your particular use case, the best option is probably to attach the debugger to a running process. This can be done by starting gdb as "gdb -p pid", where pid is the process id number. Then enter "b _pixman_log_error" (set a breakpoint on _pixman_log_error) in the gdb command prompt, followed by "c" (continue). The execution will continue until reaching the breakpoint and return back to the gdb command prompt. Then type "bt" (stack backtrace) and it will print the caller functions chain.

Note that if the offending process is critical for running the desktop environment on your computer, then attaching to it will just freeze the system. The best method would be to use another computer (for example laptop) and login from it to your primary computer via ssh. Then gdb can be run in the ssh session.