Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gtk gtk
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,435
    • Issues 1,435
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 239
    • Merge requests 239
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • gtkgtk
  • Issues
  • #1705

Closed
Open
Created Feb 26, 2019 by rebelwocause@rebelwocause

GtkTextView Rendering issues

I have experienced rendering issues with GtkTextView, libgtk-3-0 versions 3.22.x

My setup is: Linux Mint 19.1 Tessa (up to date) with: libgtk-3-0 version: 3.22.30-1ubuntu1 libglib2.0-0 version: 2.56.3-0ubuntu0.18.04.1 libcairo2 version: 1.15.10-2ubuntu0.1 OR Linux Mint LMDE3 (Debian based and up to date) with: libgtk-3-0 version: 3.22.11-1 libglib2.0-0 version: 2.50.3-2 libcairo2 version: 1.14.8-1

The rendering issue effects anything that uses GtkTextView -> GtkSourceView -> GEdit, Xed etc...

The problem occurs when height of GtkTextView gets too large -> many lines and or large font. No Text scaling is used ( default 1.0 ) Once a certain 'magic' height is reached the textview renders large portions of background as black. Scrolling up and down may be required to see this...

The approximate 'magic' height = INT_MAX / 255 = 2147483647 / 255 = 8421504 so may be some sort of integer math overflow issue?

Any combination of font size and number of lines that exceeds the 'magic' number appears to cause the problem lines Monospace Font Size 56200 96 110900 48 383000 13 444000 12 468000 11 496000 10 562000 9 648000 8

The problem occurs on Mint 19.0 gtk 3.22.30 , Mint 19.1 gtk 3.22.30, LMDE3 gtk 3.22.11

FINE on Mint 18.2 LiveCD libgtk-3-0 version: 3.18.9-1ubuntu3.3 libglib2.0-0 version: 2.48.2-0ubuntu1 libcairo2 version: 1.14.6-1

FINE on Mint 17.3, Gtk 3.10.8, other version unknown

I believe this problem is what has been referenced in: https://forums.linuxmint.com/viewtopic.php?t=272218\

Below are some images showing the problem, and attached is a small python script which can be used to show the problem.

This info can also be found at https://github.com/rebelwocause/Test-of-gtk-3.22.x-GtkTextView-Rendering

GtkTextView with Monospace font 12 and 450000 lines and selection (selection rendered ok) GtkTextView with Monospace font 12 and 450000 lines NO selection
Edited Feb 27, 2019 by Timm Bäder
Assignee
Assign to
Time tracking