www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2014/01/03/09:56:43

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Message-ID: <52C6CF5B.6020005@estechnical.co.uk>
Date: Fri, 03 Jan 2014 14:55:23 +0000
From: Ed Simmons <ed AT estechnical DOT co DOT uk>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
MIME-Version: 1.0
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] Fwd: gnetlist silently drops components
References: <CAGRhJMZEWsXnVuJ_pCKqBovr71trDFD_93HCpfLaaS-h99=wxA AT mail DOT gmail DOT com> <CAGRhJMYm3Hy2t6Ejkvm2hTPprQH6LwRqcqU2asJ4hBnaNASgVg AT mail DOT gmail DOT com> <CAGRhJMZJeJukswvFup=atf=Zwfk78j0jDL4_OQZ2t4SatyQN8g AT mail DOT gmail DOT com>
In-Reply-To: <CAGRhJMZJeJukswvFup=atf=Zwfk78j0jDL4_OQZ2t4SatyQN8g@mail.gmail.com>
X-Authenticated-As: ed AT estechnical DOT co DOT uk
Reply-To: geda-user AT delorie DOT com

This is a multi-part message in MIME format.
--------------000007080105090406080801
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit


On 03/01/2014 12:38, Joshua Lansford wrote:
>
> On Thu, Jan 2, 2014 at 8:52 AM, Joshua Lansford 
> <joshua DOT lansford AT laserlinc DOT com <mailto:joshua DOT lansford AT laserlinc DOT com>> 
> wrote:
>
>
>       I just had a scare,  I was casually checking stuff into svn and
>     noticed in a diffed netlist output that a component from one of
>     our designs in production was missing a component.  I checked the
>     schematic and the part was there all bright eyed and bushy tailed
>     but it was completely missing from the generated netlist without
>     any complaint from gnetlist.  I took a look at the schematic with
>     vim and discovered I had a property missing a value.  I removed
>     this valueless property and *ding* the component shows back up in
>     the netlist when I run gnetlist.  Checking around some more with
>     diff I discovered there was another component silently being
>     dropped from the netlist.  gnetlist use to seg fault when there is
>     a missing valued property.  Now apparently it silently
>     assassinates the component.
>
>     At first I thought I would just make a check script to make sure
>     no components are dropped, but then I thought perhaps I might also
>     be able to fix gnetlist and further this project.  But thought I
>     would check in with everyone to make sure this isn't like this for
>     a reason or perhaps has already been fixed.
>     ~Joshua
>
>
> The following change fixes the problem:
>
> diff --git a/libgeda/src/o_attrib.c b/libgeda/src/o_attrib.c
> index 5dae202..cb161a1 100644
> --- a/libgeda/src/o_attrib.c
> +++ b/libgeda/src/o_attrib.c
> @@ -383,7 +383,7 @@ o_attrib_string_get_name_value (const gchar 
> *string, gchar **name_ptr, gchar **v
>    prev_char = g_utf8_find_prev_char (string, ptr);
>    next_char = g_utf8_find_next_char (ptr, NULL);
>    if (prev_char == NULL || *prev_char == ' ' ||
> -      next_char == NULL || *next_char == ' ' || *next_char == '\0' ) {
> +      next_char == NULL || *next_char == ' ' ) {
>      return FALSE;
>    }
>
>
> Cross posting this from gEDA-help because I never saw my posts come 
> through.
>
> Thanks,
> ~Joshua
>

Good move Joshua!

I hope this is rolled into the source by someone who can.

:-)


--------------000007080105090406080801
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <div class="moz-cite-prefix">On 03/01/2014 12:38, Joshua Lansford
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAGRhJMZJeJukswvFup=atf=Zwfk78j0jDL4_OQZ2t4SatyQN8g AT mail DOT gmail DOT com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_quote">
          <div dir="ltr">
            <div class="gmail_extra"><br>
              <div class="gmail_quote">
                <div class="im">On Thu, Jan 2, 2014 at 8:52 AM, Joshua
                  Lansford <span dir="ltr">&lt;<a
                      moz-do-not-send="true"
                      href="mailto:joshua DOT lansford AT laserlinc DOT com"
                      target="_blank">joshua DOT lansford AT laserlinc DOT com</a>&gt;</span>
                  wrote:<br>
                </div>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                  <div dir="ltr">
                    <div>
                      <div class="im"><br>
                        <div>&nbsp; I just had a scare, &nbsp;I was casually
                          checking stuff into svn and noticed in a
                          diffed netlist output that a component from
                          one of our designs in production was missing a
                          component. &nbsp;I checked the schematic and the
                          part was there all bright eyed and bushy
                          tailed but it was completely missing from the
                          generated netlist without any complaint from
                          gnetlist. &nbsp;I took a look at the schematic with
                          vim and discovered I had a property missing a
                          value. &nbsp;I removed this valueless property and
                          *ding* the component shows back up in the
                          netlist when I run gnetlist. &nbsp;Checking around
                          some more with diff I discovered there was
                          another component silently being dropped from
                          the netlist. &nbsp;gnetlist use to seg fault when
                          there is a missing valued property. &nbsp;Now
                          apparently it silently assassinates the
                          component.</div>
                        <div><br>
                        </div>
                      </div>
                      <div class="im">
                        <div>At first I thought I would just make a
                          check script to make sure no components are
                          dropped, but then I thought perhaps I might
                          also be able to fix gnetlist and further this
                          project. &nbsp;But thought I would check in with
                          everyone to make sure this isn't like this for
                          a reason or perhaps has already been fixed.</div>
                        <span><font color="#888888">
                            <div>~Joshua</div>
                          </font></span></div>
                    </div>
                  </div>
                </blockquote>
              </div>
              <br>
            </div>
            <div class="gmail_extra">The following change fixes the
              problem:</div>
            <div class="gmail_extra"><br>
            </div>
            <div class="gmail_extra">
              <div class="gmail_extra">diff --git
                a/libgeda/src/o_attrib.c b/libgeda/src/o_attrib.c</div>
              <div class="gmail_extra">index 5dae202..cb161a1 100644</div>
              <div class="gmail_extra">--- a/libgeda/src/o_attrib.c</div>
              <div class="gmail_extra">+++ b/libgeda/src/o_attrib.c</div>
              <div class="gmail_extra">@@ -383,7 +383,7 @@
                o_attrib_string_get_name_value (const gchar *string,
                gchar **name_ptr, gchar **v</div>
              <div class="gmail_extra">&nbsp; &nbsp;prev_char =
                g_utf8_find_prev_char (string, ptr);</div>
              <div class="gmail_extra">&nbsp; &nbsp;next_char =
                g_utf8_find_next_char (ptr, NULL);</div>
              <div class="gmail_extra">&nbsp; &nbsp;if (prev_char == NULL ||
                *prev_char == ' ' ||</div>
              <div class="gmail_extra">- &nbsp; &nbsp; &nbsp;next_char == NULL ||
                *next_char == ' ' || *next_char == '\0' ) {</div>
              <div class="gmail_extra">+ &nbsp; &nbsp; &nbsp;next_char == NULL ||
                *next_char == ' ' ) {</div>
              <div class="gmail_extra">
                &nbsp; &nbsp; &nbsp;return FALSE;</div>
              <div class="gmail_extra">&nbsp; &nbsp;}</div>
              <div class="gmail_extra"><br>
              </div>
              <div class="gmail_extra"><br>
              </div>
              <div class="gmail_extra">Cross posting this from gEDA-help
                because I never saw my posts come through.</div>
              <div class="gmail_extra">
                <div class="gmail_extra"><br>
                </div>
                <div class="gmail_extra">Thanks,</div>
                <div class="gmail_extra">~Joshua</div>
              </div>
            </div>
          </div>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    Good move Joshua!<br>
    <br>
    I hope this is rolled into the source by someone who can.<br>
    <br>
    :-)<br>
    <br>
  </body>
</html>

--------------000007080105090406080801--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019