Guides flicker under the mouse after changing the label of any guide

Bug #1498444 reported by Pedro de Carvalho
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
jazzynico

Bug Description

Hi everyone!

Steps:
1 - open document, add guides and add a label to one of them,
2 - hover past any guide.
3 - see that some of them flicker.

If I reopen the document, the guides don't flicker any more and all the labels are present.

Arch Linux, 4.1.6 x86_64
Inkscape 0.91 r13725
RV710/M92 [Mobility Radeon HD 4530/4570/545v]

Thanks for your hard work!
p.

Tags: guides
Revision history for this message
Pedro de Carvalho (p.c) wrote :
Revision history for this message
jazzynico (jazzynico) wrote :

Not reproduced on Xubuntu 15.04 with Inkscape 0.91 and trunk rev. 14380 (tested with 10 horizontal guides and 10 vertical guides -all with a label- on a simple rectangle drawing).

Could you please attach a test document we could use to try to reproduce the bug?

Revision history for this message
Pedro de Carvalho (p.c) wrote :

Hi jazzynico, thanks for your help.

i've built from bzr the latest inkscape and now i have Inkscape 0.91+devel r14381, with gtk3. ( hey, coloured guides!! )

The problem persists.

i've included the same file from the screencast.

i'm using the open source driver for amd, tonight i'll change to the proprietary one and check if the issue remains.

thanks again,
p.

Revision history for this message
su_v (suv-lp) wrote :

Flickering not reproduced with GTK2-based Inkscape 0.91+devel r14381 on OS X 10.7.5
(both available GTK+ backends tested: X11, Quartz)

Revision history for this message
su_v (suv-lp) wrote :

JFTR (likely unrelated to the flickering reported here) - a known issue with guide labels which still persists in latest trunk:
* Bug #1469514 “Crash when renaming a guideline label in a new session”
  https://bugs.launchpad.net/inkscape/+bug/1469514

Revision history for this message
jazzynico (jazzynico) wrote :

Flickering confirmed on Xubuntu 15.04, Inkscape trunk rev. 14380.
Steps:
1. Open the document attached comment #3.
2. Change a label (tested with the guide named "asdasd2", label replaced with "test").
3. Hover the guides.
4. Some of them flicker.

Note sure it's directly related, but when double-clicking the changed guide, the label field shows "P\Uffffffff", as if there were something wrong with the label encoding or a memory management problem (and it strongly reminds me a of bug I already ran into in the past...)

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
jazzynico (jazzynico) wrote :

And the following message shows on the console when opening the guides dialog on a changed guide:
----
Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()

Revision history for this message
Pedro de Carvalho (p.c) wrote :

i just found that opening any file with guides and renaming one, reproduces the flickering.

here's a simpler file:

Revision history for this message
su_v (suv-lp) wrote :

On 2015-09-22 18:02 (+0200), jazzynico wrote:
> Note sure it's directly related, but when double-clicking the
> changed guide, the label field shows "P\Uffffffff", as if there were
> something wrong with the label encoding or a memory management
> problem (and it strongly reminds me a of bug I already ran into in
> the past...)

Since these steps on my system trigger a crash, it seems related to bug #1469514 after all (maybe depending on compiler or other local differences in the build env).

Other earlier related reports: Bug #1299185, Bug #1029033

Revision history for this message
jazzynico (jazzynico) wrote :

Thanks ~suv!

Yes, I was referring to Bug #1029033 (see comment #4...). But there are chances the flickering, invalid encoding and crash are all linked.

Revision history for this message
jazzynico (jazzynico) wrote :

It seems the label value is double-freed in sp-guide.cpp (http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/14380/src/sp-guide.cpp#L106) and in display/guideline.cpp (http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/14380/src/display/guideline.cpp#L231). Removing sp-guide.cpp:106 seems to fix the issue (and related crashes and encoding issues).

Changed in inkscape:
milestone: none → 0.92
status: Confirmed → Triaged
Revision history for this message
jazzynico (jazzynico) wrote :

@Martin - Could you please take a look and confirm the memory issue?

Revision history for this message
su_v (suv-lp) wrote :

Attaching fix proposed in the comment 11 as diff (based on trunk r14415).

Revision history for this message
Pedro de Carvalho (p.c) wrote :

you guys are amazing! looking forward to the next version!

Revision history for this message
jazzynico (jazzynico) wrote :

Patch applied to the trunk rev. 14426.

Feel free to revert if there's a more elegant or efficient fix.

Changed in inkscape:
assignee: nobody → jazzynico (jazzynico)
status: Triaged → Fix Committed
tags: added: backport-proposed
removed: labels
Revision history for this message
su_v (suv-lp) wrote :

Fix backported to 0.91.x in rev 13846.

Changed in inkscape:
milestone: 0.92 → 0.91.1
tags: removed: backport-proposed
jazzynico (jazzynico)
Changed in inkscape:
milestone: 0.91.1 → 0.92
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.