SVG-Plot fails with ampersand in schematic or board filename

Bug #1171160 reported by Bernd Wiebus
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Low
Dick Hollenbeck

Bug Description

If i plot to SVG, i get an error message from Inkscape or Gimp, when the filename of the original schematic or board file contains an ampersand "&". In windows and linux, ampersands are legal at filenames, and kicad, Gimp and Inkscape aczept filenames with ampersand. But in this case, kicad creates a SVG file with a title block (<title> ~~~ </title>) which contains the original filename and so the ampersand. In this title block, a ampersand somehow is fatal (perhaps escape sequence or something like this). Deleting just this ampersand out of the titel block with an editor makes the file usable. I am still unshure, wether this is an kicad, Inkscape or Gimp error or even a problem of the SVG definition.
This bug is not security dangerous, but very nasty, if you do not know the simple workaround.
Please look at user group discussion at: http://tech.groups.yahoo.com/group/kicad-users/message/14952
With best regards: Bernd Wiebus alias dl1eic
<email address hidden>

Revision history for this message
Bernd Wiebus (bernd-wiebus) wrote :

Hello.
I forgot to tell:
Application: Pcbnew
Version: (2013-03-30 BZR 4007)-stable
Build: wxWidgets 2.8.10 (no debug,Unicode,compiler with C++ ABI 1002,GCC 4.4.5,wx containers,compatible with 2.6)
Platform: Linux 2.6.32-5-686 i686, 32 bit, Little endian, wxGTK
Boost version: 1.53.0
Options: USE_PCBNEW_NANOMETRES=ON
         KICAD_GOST=OFF
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=OFF
         KICAD_SCRIPTING_MODULES=OFF
         KICAD_SCRIPTING_WXPYTHON=OFF

and GIMP 2.6.10 / Inkscape 0.47 at Debian Squeeze. But at Wheezy its the problem.

With best regards: Bernd Wiebus alias dl1eic
<email address hidden>

Revision history for this message
Bernd Wiebus (bernd-wiebus) wrote :

I have to apologize. i did not mean SVG plot, but SVG export.
With best regards: Bernd Wiebus alias dl1eic
<email address hidden>

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote : Re: [Bug 1171160] Re: SVG-Plot fails with ampersand in schematic or board filename

The export is xml. Xml disallows some characters unless they are escaped.
& is one that must expressed as

&amp;

Might be a bug in wx not kicad per se.
 On Apr 24, 2013 11:50 AM, "Bernd Wiebus" <email address hidden>
wrote:

> I have to apologize. i did not mean SVG plot, but SVG export.
> With best regards: Bernd Wiebus alias dl1eic
> <email address hidden>
>
> --
> You received this bug notification because you are a member of KiCad Bug
> Squad, which is subscribed to KiCad.
> https://bugs.launchpad.net/bugs/1171160
>
> Title:
> SVG-Plot fails with ampersand in schematic or board filename
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1171160/+subscriptions
>

Revision history for this message
Lorenzo Marcantonio (l-marcantonio) wrote :

On Wed, Apr 24, 2013 at 05:51:14PM -0000, Dick Hollenbeck wrote:
> Might be a bug in wx not kicad per se.

AFAIK the svg *export* is done with the wx print infrastructure. SVG
plots are done by the plotter classes in kicad.

So I too think that's probably a wx issue.

--
Lorenzo Marcantonio
Logos Srl

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote :

Bernd,

This is almost certainly a bug in wx, and one that we cannot work around other than avoiding use of that character in such a context.

The true fix would be to report it to the wxWidgets team, and get it fixed there. It is not a critical bug. I am marking as won't fix and not critical.

Thanks for reporting it, and if you are ambitious, you could file it with wxWidgets team and refer to this bug report in your report over there.

Dick

Changed in kicad:
status: New → Won't Fix
importance: Undecided → Low
Revision history for this message
jean-pierre charras (jp-charras) wrote :

The svg *export* is no more done with the wx print.
Since some time the svg export uses the svg plotter.
(the wx version of svg exporter has an annoying bug for arcs)
So the bug could be in svg plotter.
(I did not yet have the time to see it)

Revision history for this message
Bernd Wiebus (bernd-wiebus) wrote :

Hello Dick.

> This is almost certainly a bug in wx, and one that we cannot work around
> other than avoiding use of that character in such a context.
>

Yes, normaly i am very carefully and using only the numbers, the letters
without special signs, a "-" and a "_" for file names. A point only to
discriminate suffixes......I do not now anymore, which devil rode me at
2010 to use an ampersand at a file name. Perhaps it was derived from a
firm name with an ampersand in....

> The true fix would be to report it to the wxWidgets team, and get it
> fixed there. It is not a critical bug. I am marking as won't fix and
> not critical.
>

Ok, i made some remarks about this bug at a german kicad FAQ
http://www.mikrocontroller.net/articles/KiCAD#Tipps.26Tricks_.2F_Eigenheiten_.2F_Bugs
So somebody would find clues about whats going on, if he notice this
strange behavior.

> Thanks for reporting it, and if you are ambitious, you could file it
> with wxWidgets team and refer to this bug report in your report over
> there.

The wx librarys are C/C++ librarys i think. I do not know any C/C++. So
my reporting to the wx team would be an unintelligible stammering. I can
nothing tell about whats going on. I can only tell what happens if i use
programs at a certain way....

But you see what Mr. Charras wrote about this bug. So this has to be
proofed first. It would not be fair to blame the wx team for nothing.

Yet another topic: What is with Bug 1171171 ?
https://bugs.launchpad.net/kicad/+bug/1171171

With best regards: Bernd Wiebus alias dl1eic

Adresse:
Dipl.-Ing. Bernd Wiebus, CID+
Weezer Str. 5
47589 Uedem
Tel. 02825-9399977 (fest)
     0162-6157950 (mob.)

E-Mail: <email address hidden>

Revision history for this message
Bernd Wiebus (bernd-wiebus) wrote :

Hello Jean-Pierre Charras.

> (the wx version of svg exporter has an annoying bug for arcs)

Oh....

I am watching strange behavior at bitmap2component similar to bug 792399

https://bugs.launchpad.net/kicad/+bug/792399 wich is fixed since 2006.

Logos are not plotted to gerber, and some clues (people telling me
about) are pointing towards arcs.

But first i have to look for myself, whats going on. From my experience
with some problems at bitmap2component some years ago i think i remember
that bitmap2component does not use arcs. So this could not be....

With best regards: Bernd Wiebus alias dl1eic

Adresse:
Dipl.-Ing. Bernd Wiebus, CID+
Weezer Str. 5
47589 Uedem
Tel. 02825-9399977 (fest)
     0162-6157950 (mob.)

E-Mail: <email address hidden>

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote :

On Apr 26, 2013 12:46 AM, "Bernd Wiebus" <email address hidden> wrote:
>
> Hello Dick.
>
> > This is almost certainly a bug in wx, and one that we cannot work around
> > other than avoiding use of that character in such a context.
> >
>
> Yes, normaly i am very carefully and using only the numbers, the letters
> without special signs, a "-" and a "_" for file names. A point only to
> discriminate suffixes......I do not now anymore, which devil rode me at
> 2010 to use an ampersand at a file name. Perhaps it was derived from a
> firm name with an ampersand in....
>
> > The true fix would be to report it to the wxWidgets team, and get it
> > fixed there. It is not a critical bug. I am marking as won't fix and
> > not critical.
> >
>
> Ok, i made some remarks about this bug at a german kicad FAQ
>
http://www.mikrocontroller.net/articles/KiCAD#Tipps.26Tricks_.2F_Eigenheiten_.2F_Bugs
> So somebody would find clues about whats going on, if he notice this
> strange behavior.
>
> > Thanks for reporting it, and if you are ambitious, you could file it
> > with wxWidgets team and refer to this bug report in your report over
> > there.
>
> The wx librarys are C/C++ librarys i think. I do not know any C/C++. So
> my reporting to the wx team would be an unintelligible stammering.

Just asking that you post the url to this discussion over there. Nothing
more required of you than your time. Which is what you are asking of us.
Once they read this thread, it will get fixed and many months later it will
go away from kicad.

I am taking no further action, it is up to you.

 I can
> nothing tell about whats going on. I can only tell what happens if i use
> programs at a certain way....
>
> But you see what Mr. Charras wrote about this bug. So this has to be
> proofed first. It would not be fair to blame the wx team for nothing.
>
> Yet another topic: What is with Bug 1171171 ?
> https://bugs.launchpad.net/kicad/+bug/1171171
>
> With best regards: Bernd Wiebus alias dl1eic
>
>
>
> Adresse:
> Dipl.-Ing. Bernd Wiebus, CID+
> Weezer Str. 5
> 47589 Uedem
> Tel. 02825-9399977 (fest)
> 0162-6157950 (mob.)
>
> E-Mail: <email address hidden>
>
> --
> You received this bug notification because you are a member of KiCad Bug
> Squad, which is subscribed to KiCad.
> https://bugs.launchpad.net/bugs/1171160
>
> Title:
> SVG-Plot fails with ampersand in schematic or board filename
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1171160/+subscriptions

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote :

On Apr 26, 2013 1:14 AM, "Dick Hollenbeck" <email address hidden> wrote:
>
>
> On Apr 26, 2013 12:46 AM, "Bernd Wiebus" <email address hidden>
wrote:
> >
> > Hello Dick.
> >
> > > This is almost certainly a bug in wx, and one that we cannot work
around
> > > other than avoiding use of that character in such a context.
> > >
> >
> > Yes, normaly i am very carefully and using only the numbers, the letters
> > without special signs, a "-" and a "_" for file names. A point only to
> > discriminate suffixes......I do not now anymore, which devil rode me at
> > 2010 to use an ampersand at a file name. Perhaps it was derived from a
> > firm name with an ampersand in....
> >
> > > The true fix would be to report it to the wxWidgets team, and get it
> > > fixed there. It is not a critical bug. I am marking as won't fix and
> > > not critical.
> > >
> >
> > Ok, i made some remarks about this bug at a german kicad FAQ
> >
http://www.mikrocontroller.net/articles/KiCAD#Tipps.26Tricks_.2F_Eigenheiten_.2F_Bugs
> > So somebody would find clues about whats going on, if he notice this
> > strange behavior.
> >
> > > Thanks for reporting it, and if you are ambitious, you could file it
> > > with wxWidgets team and refer to this bug report in your report over
> > > there.
> >
> > The wx librarys are C/C++ librarys i think. I do not know any C/C++. So
> > my reporting to the wx team would be an unintelligible stammering.
>
> Just asking that you post the url to this discussion over there. Nothing
more required of you than your time. Which is what you are asking of us.
Once they read this thread, it will get fixed and many months later it will
go away from kicad.
>
> I am taking no further action, it is up to you.
>

Sorry, your interpretation of jp's remarks are corrrect and better than
mine. I just looked at the code (on my cell phone). And see the problem.

I will fix it in the morning. There's some escaping code in wx somewhere
we should be able to use.

> I can
> > nothing tell about whats going on. I can only tell what happens if i use
> > programs at a certain way....
> >
> > But you see what Mr. Charras wrote about this bug. So this has to be
> > proofed first. It would not be fair to blame the wx team for nothing.
> >
> > Yet another topic: What is with Bug 1171171 ?
> > https://bugs.launchpad.net/kicad/+bug/1171171
> >
> > With best regards: Bernd Wiebus alias dl1eic
> >
> >
> >
> > Adresse:
> > Dipl.-Ing. Bernd Wiebus, CID+
> > Weezer Str. 5
> > 47589 Uedem
> > Tel. 02825-9399977 (fest)
> > 0162-6157950 (mob.)
> >
> > E-Mail: <email address hidden>
> >
> > --
> > You received this bug notification because you are a member of KiCad Bug
> > Squad, which is subscribed to KiCad.
> > https://bugs.launchpad.net/bugs/1171160
> >
> > Title:
> > SVG-Plot fails with ampersand in schematic or board filename
> >
> > To manage notifications about this bug go to:
> > https://bugs.launchpad.net/kicad/+bug/1171160/+subscriptions

Changed in kicad:
assignee: nobody → Dick Hollenbeck (dickelbeck)
status: Won't Fix → Fix Committed
Jon Neal (reportingsjr)
Changed in kicad:
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.