[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gEDA: New code for component library
Hi Patrick and Stuart,
[snip]
>Please test and let me know of any problem. Of course, Ales, if you do
>not like feel free to delete it.
>
I like the changes quite a bit. I sat down and reviewed them and
they all look fine.
However, there seems to be an interaction between Stuart's per
directory rc file loading and the new clib mechanism. I got a core dump
after doing the following:
1) run gschem from some random directory
2) File/Open... and open examples/gTAG/gTAG.sch
3) witness seg fault :(
The above works great if you tried to open a schematic in a directory
which has local symbols and has a gafrc, however, gTAG does not have a gafrc
but rather the old style gschemrc, gnetlistrc, etc...
So, the bug is two fold:
1) Patrick, in libgeda/noweb/o_complex_basic.nw:
<<o_complex_read() : add a complex from library>>=
GList *clibs = s_clib_search_basename (basename);
if (g_slist_next (clibs)) {
s_log_message ("More than one component found with name [%s]\n",
basename);
/* PB: for now, use the first directory in clibs */
/* PB: maybe open a dialog to select the right one? */
}
clib = (gchar*)clibs->data;
^^^^^
clibs is NULL in this particular case, which causes the seg fault.
Patrick, what's the right way of handling this error condition?
2) Stuart, your code that reads in the gafrc should also probably
read in the gschemrc (or other program specific rc file),
when a user opens up a schematic in a different directory.
The user may have program specific settings in the new project
directory which should also be read in and acted upon.
-Ales