bad numbering scheme in result attribute of filters ? Use unique ID for result

Bug #1248547 reported by v1nce
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Low
Unassigned

Bug Description

I know the names inkscape give for result are (or seem to be) correct according to http://www.w3.org/TR/SVG/filters.html#CommonAttributes in definition which states that

"If the value for ‘result’ appears multiple times within a given ‘filter’ element, then a reference to that result will use the closest preceding filter primitive with the given value for attribute ‘result’"
 = you could (re)use the same name for a result.

but would it be possible to generate unique id (counter increment) instead of simple names ?

I suspect that inkscape not using UID is part of frequent crashes or inconsistencies we see in filters (when duplicating filter or adding color matrix...)

The bad numbering even affect the default filters.svg that come with inkscape

See https://bugs.launchpad.net/inkscape/+bug/1248542

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

Please provide information about which version of Inkscape this report is based on (stable, or trunk (revision)).

Changed in inkscape:
status: New → Incomplete
tags: added: filters-svg
Revision history for this message
v1nce (vincent-pennec) wrote :

any version up to dev 12777 at least

add matrix
add merge
link merge to the matrix (matrix get a result attribute="result1")
duplicate matrix => the new matrix get a result attribute="result1" too
add a new merge
link merge to the first matrix = BUG it links to the last matrix instead

su_v (suv-lp)
Changed in inkscape:
status: Incomplete → New
Revision history for this message
jazzynico (jazzynico) wrote :

Bug from comment #2 confirmed on Windows XP, Inkscape trunk revision 12782 and 0.48.4.

But since the filters naming is conform to the recommendations, I'd say we should fix the way Inkscape handle the filters, not the filters themselves. Using unique ids would just hide the bug, not fix it. Do you mind if I change the report's title accordingly ("Duplicate result attribute ids lead to errors in the filters links")?

Changed in inkscape:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
v1nce (vincent-pennec) wrote :

> But since the filters naming is conform to the recommendations, I'd say we should fix the way Inkscape handle the filters, not the filters themselves.

What you mean by 'not the filters themselves'
because some filters in current Filters.svg were broken anyway (their "in" attribute reference non existing source)

IMO bugs in inkscape show that the spec were badly designed by allowing duplicate name in result when there should be "local" id.

Yes it would be better if inkscape handle the filters accordingly to the svg spec but before this happens I'd really like a quick bug fix that would be giving a new unique id for result when duplicating a primitive in inkscape.

I think very few people use filters from "external" sources (hand designed or proprietary software designed). Most will use the predefined ones. Few will try to design their own (because of bugs ;) ).
So if one fix the filters.svg + duplication bug then we can wait for a better fix.

Revision history for this message
jazzynico (jazzynico) wrote :

> What you mean by 'not the filters themselves'

Of course we will fix the broken filters (in the filters.svg file). But IMHO, having duplicate result attribute id in the predefined filters file is not a bug, and Inkscape should handle it differently so that it doesn't prevent the filters from being incorrectly linked.

> I'd really like a quick bug fix that would be giving a new unique id for result when duplicating a primitive in inkscape.

Yes, it could be a solution. I haven't investigated the code yet, so I can't tell if implementing such a workaround is quicker than fixing the bug.

Thanks for your idea!

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.