Menu

#1743 In pixman_region32_init_rect: Invalid rectangle passed (Linux, GTK3)

Bug
closed-fixed
5
2015-09-15
2015-07-23
No

This appears to affect Scintilla/SciTE compiled for GTK3.

Tested on Mint Linux 17.2 64-bit, SciTE Version 3.5.7 compiled for GTK+ 3.10.8.

Starting SciTE generates a series of messages:

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

This does not happen for the same version compiled for GTK+ 2.24.23.

Perhaps related to bug #1681.

Related

Bugs: #1743

Discussion

  • Colomban Wendling

    Could you please run in a debugger breaking on _pixman_log_error as suggested by the error, and give a backtrace?

     
    • Lionel Barnett

      Lionel Barnett - 2015-07-23

      Apologies, but I have next to no knowledge of debugging, so I'm not
      sure I'm doing this right - you might need to advise me.

      I rebuilt scintilla and scite with

      make DEBUG=1

      However, since (I gather) the error is manifesting in the GTK3 libs,
      perhaps I should link against GTK+ debugging version? Again, not sure
      how to do that... anyhow, here is the gdb output:

      $ gdb SciTE
      GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
      Copyright (C) 2014 Free Software Foundation, Inc.
      License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law. Type "show copying"
      and "show warranty" for details.
      This GDB was configured as "x86_64-linux-gnu".
      Type "show configuration" for configuration details.
      For bug reporting instructions, please see:
      http://www.gnu.org/software/gdb/bugs/.
      Find the GDB manual and other documentation resources online at:
      http://www.gnu.org/software/gdb/documentation/.
      For help, type "help".
      Type "apropos word" to search for commands related to "word"...
      Reading symbols from SciTE...done.
      (gdb) break _pixman_log_error
      Function "_pixman_log_error" not defined.
      Make breakpoint pending on future shared library load? (y or [n]) y
      Breakpoint 1 (_pixman_log_error) pending.
      (gdb) run
      Starting program: /usr/local/bin/SciTE
      Traceback (most recent call last):
      File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py",
      line 63, in <module>
      from libstdcxx.v6.printers import register_libstdcxx_printers
      ImportError: No module named 'libstdcxx'
      [Thread debugging using libthread_db enabled]
      Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
      [New Thread 0x7fffee835700 (LWP 10989)]
      BUG
      In pixman_region32_init_rect: Invalid rectangle passed
      Set a breakpoint on '_pixman_log_error' to debug

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

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

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

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

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

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

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

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

      BUG
      In pixman_region32_init_rect: Invalid rectangle passed

      ^C
      Program received signal SIGINT, Interrupt.
      0x00007ffff542512d in poll () at ../sysdeps/unix/syscall-template.S:81
      81 ../sysdeps/unix/syscall-template.S: No such file or directory.
      (gdb) quit
      A debugging session is active.

      Inferior 1 [process 10985] will be killed.
      

      Quit anyway? (y or n) y
      $

      On 23 July 2015 at 13:22, Colomban Wendling colombanw@users.sf.net wrote:

      Could you please run in a debugger breaking on _pixman_log_error as
      suggested by the error, and give a backtrace?


      [bugs:#1743] In pixman_region32_init_rect: Invalid rectangle passed (Linux,
      GTK3)

      Status: open
      Group: Bug
      Created: Thu Jul 23, 2015 09:50 AM UTC by Lionel Barnett
      Last Updated: Thu Jul 23, 2015 09:50 AM UTC
      Owner: nobody

      This appears to affect Scintilla/SciTE compiled for GTK3.

      Tested on Mint Linux 17.2 64-bit, SciTE Version 3.5.7 compiled for GTK+
      3.10.8.

      Starting SciTE generates a series of messages:

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

      This does not happen for the same version compiled for GTK+ 2.24.23.

      Perhaps related to bug #1681.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/scintilla/bugs/1743/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      Lionel Barnett, D.Phil.
      Research Fellow
      Sackler Centre for Consciousness Science
      Department of Informatics, University of Sussex
      http://users.sussex.ac.uk/~lionelb/
      http://www.sussex.ac.uk/sackler/

       

      Related

      Bugs: #1743

  • Neil Hodgson

    Neil Hodgson - 2015-07-24

    Just downloaded Linux Mint 17.2 64-bit Cinnamon and installed into VirtualBox. I'm not seeing these messages. The main use of regions in Scintilla and thus SciTE is when painting the text window: the 'damaged' region is retrieved and used to optimize drawing. The APIs used for this are different between GTK+ 2.x and 3.x: on 2.x a GdkRegion is used and on 3.x a cairo_rectangle_list_t is used. Thus there is good reason for a difference between 2.x and 3.x.

    Invalid rectangle may mean one that has a negative width or height or even just one that is empty.
    Here is a similar issue in Eclipse: https://bugs.eclipse.org/bugs/show_bug.cgi?id=435948

     
    • Lionel Barnett

      Lionel Barnett - 2015-07-24

      Sorry, should have mentioned: tested on Linux Mint 17.2 64-bit Mate edition, but I don't run the Mate (or any other) desktop, just Fluxbox WM. I also run xsettingsd, which manages the XSETTINGS spec for GTK+, if that's of any relevance.

       
  • Lionel Barnett

    Lionel Barnett - 2015-07-27

    More on this issue: I set up a new test user, and running SciTE as this user does not produce any error messages. (I tried as far as possible to replicate the environment of the default Mint 17.2 64-bit Mate user for the test user.)

    I have not made any progress on debugging.

     
    • Neil Hodgson

      Neil Hodgson - 2015-07-28

      Something that differs between accounts is starting to sound like a theming issue. Are both of the accounts using the same GTK+ theme?

       
      • Lionel Barnett

        Lionel Barnett - 2015-07-28

        I still see this behaviour (i.e. SciTE errors in default user but not test user) if I set the same theme for both accounts via the Mate and XFCE settings dialogs as well as the xsettingsd config files. I've tried several themes including the (very standard) Clearlooks and Adwaita, and several desktops including Mate, XFCE and neat Fluxbox.

        I do suspect some Mint/Mate misconfiguration, though... the Appearance settings application in particular is somewhat flaky. I guess ultimately this is some manifestation of a messy transition from GTK+ 2 to 3. And it's still early days for Mate.

        I don't suppose you could point me at some info on debugging SciTE under GTK+-3.0 (in particular how to compile and link, which libs to link to, etc.)? I haven't had much joy with that.

         
        • Neil Hodgson

          Neil Hodgson - 2015-07-28

          Your debug build may have been for GTK+ 2 since Scintilla and SciTE default to 2. You shouldn't need GTK+ debugging libs although they could help. To build with debug and GTK+ 3.x, the command line needed for both is

          make DEBUG=1 GTK3=1

          This needs to be performed first in the scintilla/gtk directory and then in the scite/gtk directory. Then you want to run the debugger on the newly built executable which will be in scite/bin. You don't need to run "make install". So, if you are still in scite/gtk, run

          gdb ../bin/SciTE

          And place the breakpoint on _pixman_log_error. Also try pixman_log_error in case there's a name mangling issue. If that doesn't work, try breaking on pixman_region32_init_rect and examine tracebacks when that is hit. If possible report unique tracebacks from any hits, particularly if they occur just before the message. None of the code calls pixman_region32_init_rect directly so its in something called from SciTE.

          Another interesting piece of information is whether this only occurs at startup. Widgets can be a little delicate during their birth and may not be able to handle calls that are later OK.

          There are other editors such as Geany that also use Scintilla and can be built for GTK+ 3. If the same message occurs with GTK+ 3 Geany then there is a good chance that Scintilla is the cause. http://www.geany.org/

           
          • Lionel Barnett

            Lionel Barnett - 2015-07-29

            This is what I did originally (actually I had just enforced GTK3 in the makefiles).

            Breaking on _pixman_log_error or pixman_log_error gives output as in my second post in this thread. Breaking on pixman_region32_init_rect causes my entire UI to freeze, and I am forced to kill gdb from another tty (I googled this issue, and the main suggestions seemed to involve debugging under a different X server, possibly virtual or remotely).

            This problem does only seem to occur on startup - I probably failed to mention that apart from these messages on startup, my SciTE/GTK3 build seems to function perfectly normally.

            I will try building Geany for GTK3 (the Mint 17.2 repo version is GTK2) when I get a chance, and report back.

             
            • Lionel Barnett

              Lionel Barnett - 2015-07-30

              I have built Geany (version 1.25) with --enable-gtk3, and confirmed with ldd that it loads libgtk-3.so. I don't see any error messages on startup, or subsequently.

               
            • Neil Hodgson

              Neil Hodgson - 2015-07-30

              Can reproduce with Mate but only when placing the output pane below the edit pane (split.vertical=0) instead of to the right (split.vertical=1). This means the output pane starts up with a zero height which is then seen as a negative height when the (not really there) horizontal scroll bar is taken into account. The negative height then causes further problems with redrawing the (invisible) output pane.

              For now, add split.vertical=1 to user options.

              While a fix will be made, its too late for 3.6.0 and will arrive in a later release.

               
              • Lionel Barnett

                Lionel Barnett - 2015-07-30

                Ah, that would explain why my test account never showed up the issue - I have a .SciTEUser.properties for the default account which sets split.vertical=0, whereas I never set up a .SciTEUser.properties for the test account.

                 
  • Neil Hodgson

    Neil Hodgson - 2015-07-30
    • labels: --> scintilla, gtk
    • status: open --> open-accepted
    • assigned_to: Neil Hodgson
     
  • Neil Hodgson

    Neil Hodgson - 2015-08-05
    • status: open-accepted --> open-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2015-08-05

    Fix committed as [923380].

     

    Related

    Commit: [923380]

  • Neil Hodgson

    Neil Hodgson - 2015-09-15
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.