Import preferences from 0.46

Bug #437929 reported by ScislaC
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Jon A. Cruz

Bug Description

JonCruz has informed me that we've had user issues related to old preferences files from 0.46 or earlier that can be a cause of issues to users migrating to 0.47.

He is going to look into handling this correctly, which will possibly having special cases of selectively importing certain preferences. Unfortunately until then, this is going to be considered a blocker bug... *sigh*

Tags: preferences
Changed in inkscape:
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

besides migrating… please consider creating the subdirectories for user files again ;-)
(stopped with rev. 21439, at least on OS X: <https://bugs.launchpad.net/inkscape/+bug/380141/comments/2>)

Revision history for this message
Jon A. Cruz (jon-joncruz) wrote :
Changed in inkscape:
status: Confirmed → In Progress
ScislaC (scislac)
tags: added: blocker
Revision history for this message
su_v (suv-lp) wrote :

1) numeric precision preferences

~/.inkscape/preferences.xml (0.46):
   <group
       id="svgoutput"
       usenamedcolors="0"
       numericprecision="8"
       minimumexponent="-8"
       inlineattrs="0"
       indent="2" />
    <group

If 'numericprecision' is set to 1 or 2 current prerelease builds crash on start-up due to bug #399604. Until there is a real fix for it, numeric precision preferences from 0.46 would need to be filtered and set to >= 3 (default: 8) if migrated to 0.47.
0.46 doesn't have a GUI option for these SVG output preferences but they can be changed by editing the xml file manually.

2) 0.46+devel no longer stores the version number in the preferences file. Any reason not to?

~/.inkscape/preferences.xml (0.46):
<inkscape
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   version="0.46">

~/.config/inkscape/preferences.xml (0.46+devel):
<inkscape
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   version="1">

Revision history for this message
theAdib (theadib) wrote :

what about to test while reading the preferences as long as we have this issue?
That should be a simple hack and should be reverted as soon as 0.47 is out.
see my simple patch for that.

HTH, Adib

Revision history for this message
ScislaC (scislac) wrote :

Here is a BT of the crash.

Revision history for this message
ScislaC (scislac) wrote :

Here is the log from valgrind.

Revision history for this message
theAdib (theadib) wrote :

Thx for the valgrind, bt.
#1 buffer space missing for a possible dot 123.2
#2 space missing for the NUL sign that sp_svg_number_write_de generates after the string
I changed the design to not use the string data memory but to reserve a char buffer and then just append the char buffer.

However the underlaying functions (sp_svg_number_write_de, ...) must respect the PRECISION parameter to not get an buffer overflow. The functions are complex and the author might won the code obfuscation contest. I do not know if we should not reformat that functions.

Adib.

Revision history for this message
theAdib (theadib) wrote :

hm, typo fixed + add one more test for having precision parameter a minimum value of 3.
plsese use this patch instead of the previous from #7.

Adib.?field.comment=hm, typo fixed + add one more test for having precision parameter a minimum value of 3.
plsese use this patch instead of the previous from #7.

Adib.

Revision history for this message
theAdib (theadib) wrote :

attached patch will put valid version information (instead of version="1") while creating the preferences file. See comment #3 point 2.

The patch puts same information as in src/menus-skeleton.h line 12

the section will look like:
<inkscape
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   version="0.46+devel">

Adib.

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

tested with Inkscape 0.46+devel r22528+patch on OS X 10.5.8

a) new preferences file is created with 'version="0.46+devel"':
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<inkscape
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   version="0.46+devel">

b) when using an old preferences file with 'version="1"' the new version information is not updated in the preferences file (run the patched Inkscape version, change some preferences and quit Inkscape):
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<inkscape
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   version="1">

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

3) don't migrate the start/end values within the eventcontext
   id="arc" unless bug #459811 is fixed

If I am not mistaken this could potentially lock the ellipse tool in 0.47 to always creating (minuscule or invisible) arcs with no possibility for the user to reset the values permanently except by manually editing the preferences file.

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

The second patch by Krzysztof Kosiński for bug #459811 <http://launchpadlibrarian.net/35048265/ellipse-typo-v2.patch> fixes both issues with the ellipse preferences and ellipse tool control options. If the patch is accepted to go into the trunk the arc prefs can be migrated from 0.46 to 0.47 without changes.

Revision history for this message
Jon A. Cruz (jon-joncruz) wrote :

Base migration in as of revision #22573.

Changed in inkscape:
status: In Progress → Fix Released
su_v (suv-lp)
tags: added: preferences
removed: blocker
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.