← Back to team overview

kicad-developers team mailing list archive

Re: KIWAY milestone A)

 

Hi Dick,


I committed milestone A) this evening.
> I will watch my email tomorrow for problem reports and calls for help.



On building revision 4761 on Ubuntu 13.04 (GCC 4.7.3) I got the following
error:

[ 31%] Building CXX object common/CMakeFiles/common.dir/kiway_holder.cpp.o
/home/blair/sources/kicad/product/common/kiway_holder.cpp: In member
function ‘void KIWAY_HOLDER::SetKiway(wxWindow*, KIWAY*)’:
/home/blair/sources/kicad/product/common/kiway_holder.cpp:18:25: error:
must #include <typeinfo> before using typeid

I did as it says and added #include <typeinfo> to common/kiway_holder.cpp
and then the compilation succeeds.

If I run it with an existing project, then eeschema opens and seems to work
normally, except when I close it the following message is output in the
terminal I ran kicad from:

    Error in `/usr/local/bin/eeschema': corrupted double-linked list

And the process is left running, even after I have closed the main KiCad
window. Pcbnew works and there are no error messages. Cvpcb and gerbview do
not open; I just get the opened and closed messages in the terminal I ran
KiCad from:

    gerbview opened [pid=22596]
    gerbview closed [pid=22596]
    cvpcb opened [pid=22607]
    cvpcb closed [pid=22607]

There are no error messages printed to the controlling terminal.


On running KiCad with a blank project, none of eeschema, pcbnew, cvpcb, or
gerbview will open -- just the same opened and closed messages as before,
and no stderr messages printed to the terminal.The other tools
(Bitmap2Component, PL editor, and PCB calculator) all appear to be OK in
both cases.

If I run eeschema directly from the command line, it opens fine with a
blank new schematic.

To debug, I used strace to see what was happening:

    $ strace -f -e trace=signal -e trace=file kicad

When I tried to open eeschema, the end of the output was:

[pid 22855] stat("/tmp/kicad-test-pro/foo.sch", 0x7fffc5db9090) = -1 ENOENT
(No such file or directory)
[pid 22855] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
Process 22855 detached

which suggests it doesn't handle missing files (as happens with a blank new
project). So I ran eeschema standalone, saved an empty schematic as the
/tmp/kicad-test-pro/foo.sch file it was trying to open, and it worked from
within the KiCas manager. It was the same thing with pcbnew -- save an
empty PCB using standalone pcbnew and then it will work from within the
KiCad manager.

Using strace on cvpcb didn't show anything useful -- the previous calls
were open()-ing fonts etc successfully, and then it just segfaulted.
Running it standalone, I got it to dump a core. I have attached the
backtrace; the core file itself is 30MB but I can upload it somewhere if
that is usable on your system (and if it is of any use).

I also attached GDB to the eeschema process left open after the "corrupted
double-linked list" error I mentioned above, and have attached the
backtrace from where it has frozen.

Let me know if there are any other tests or anything you would like me to
run.

Blair
#0  0x00007f52956ea696 in wxWindowBase::SetSizer(wxSizer*, bool) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#1  0x00007f5283144a9e in wxAuiManager::Update() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_aui-2.8.so.0
#2  0x00007f52838a8e4c in CVPCB_MAINFRAME::OnSelectComponent (this=0x23bbea0, event=...) at /home/blair/sources/kicad/product/cvpcb/cvframe.cpp:604
#3  0x00007f52838a677f in LIBRARY_LISTBOX::OnSelectLibrary (this=0x24bbef0, event=...) at /home/blair/sources/kicad/product/cvpcb/class_library_listbox.cpp:220
#4  0x00007f52951a6a46 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#5  0x00007f52951a6bb4 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#6  0x00007f52951a6ed7 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#7  0x00007f5295631385 in wxListMainWindow::SendNotify(unsigned long, int, wxPoint const&) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#8  0x00007f5295631550 in wxListMainWindow::HighlightLine(unsigned long, bool) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#9  0x00007f5295636c57 in wxListMainWindow::SetItemState(long, long, long) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#10 0x00007f5295638660 in wxGenericListCtrl::SetItemState(long, long, long) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#11 0x00007f52838a0630 in wxListView::Select (this=0x24bbef0, n=0, on=true) at /usr/include/wx-2.8/wx/listctrl.h:64
#12 0x00007f52838a6372 in LIBRARY_LISTBOX::SetSelection (this=0x24bbef0, index=0, State=true) at /home/blair/sources/kicad/product/cvpcb/class_library_listbox.cpp:106
#13 0x00007f52838a6436 in LIBRARY_LISTBOX::SetLibraryList (this=0x24bbef0, aList=...) at /home/blair/sources/kicad/product/cvpcb/class_library_listbox.cpp:125
#14 0x00007f52838ab1a0 in CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX (this=0x23bbea0) at /home/blair/sources/kicad/product/cvpcb/cvframe.cpp:1038
#15 0x00007f52838a6ef7 in CVPCB_MAINFRAME::CVPCB_MAINFRAME (this=0x23bbea0, aKiway=0x66bfa0 <kiway>, aParent=0x0)
       at /home/blair/sources/kicad/product/cvpcb/cvframe.cpp:166
#16 0x00007f528389229c in CV::IFACE::CreateWindow (this=0x7f5283ffaaa0 <CV::kiface>, aParent=0x0, aClassId=8, aKiway=0x66bfa0 <kiway>, aCtlBits=1)
	       at /home/blair/sources/kicad/product/cvpcb/cvpcb.cpp:113
#17 0x000000000042e7f8 in PGM_SINGLE_TOP::OnPgmInit (this=0x66c100 <program>, aWxApp=0x22da300) at /home/blair/sources/kicad/product/common/single_top.cpp:346
#18 0x000000000042fd0f in APP_SINGLE_TOP::OnInit (this=0x22da300) at /home/blair/sources/kicad/product/common/single_top.cpp:224
#19 0x000000000042f3ff in wxAppConsole::CallOnInit (this=0x22da300) at /usr/include/wx-2.8/wx/app.h:76
#20 0x00007f5295158644 in wxEntry(int&, wchar_t**) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#21 0x000000000042e5f0 in main (argc=1, argv=0x7fff818b8da8) at /home/blair/sources/kicad/product/common/single_top.cpp:245
#0  __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:95
#1  0x00007ffa01da1fcc in _L_lock_11850 () at malloc.c:5151
#2  0x00007ffa01d9f575 in __GI___libc_malloc (bytes=56) at malloc.c:2856
#3  0x00007ffa03724680 in _dl_map_object_deps (map=map@entry=0x7ffa03914000, preloads=preloads@entry=0x0, npreloads=npreloads@entry=0, trace_mode=trace_mode@entry=0, 
    open_mode=open_mode@entry=-2147483648) at dl-deps.c:515
#4  0x00007ffa0372adaf in dl_open_worker (a=a@entry=0x7fffbf31dbc8) at dl-open.c:265
#5  0x00007ffa03726706 in _dl_catch_error (objname=objname@entry=0x7fffbf31dbb8, errstring=errstring@entry=0x7fffbf31dbc0, mallocedp=mallocedp@entry=0x7fffbf31dbb0, 
	    operate=operate@entry=0x7ffa0372ac00 <dl_open_worker>, args=args@entry=0x7fffbf31dbc8) at dl-error.c:177
#6  0x00007ffa0372a809 in _dl_open (file=0x7ffa01e9ed26 "libgcc_s.so.1", mode=-2147483647, caller_dlopen=<optimized out>, nsid=-2, argc=2, argv=0x7fffbf31eab8, 
		    env=0x23cf810) at dl-open.c:656
#7  0x00007ffa01e53fb2 in do_dlopen (ptr=ptr@entry=0x7fffbf31ddd0) at dl-libc.c:87
#8  0x00007ffa03726706 in _dl_catch_error (objname=0x7fffbf31ddb0, errstring=0x7fffbf31ddc0, mallocedp=0x7fffbf31dda0, operate=0x7ffa01e53f70 <do_dlopen>, 
			    args=0x7fffbf31ddd0) at dl-error.c:177
#9  0x00007ffa01e54072 in dlerror_run (args=0x7fffbf31ddd0, operate=0x7ffa01e53f70 <do_dlopen>) at dl-libc.c:46
#10 __GI___libc_dlopen_mode (name=name@entry=0x7ffa01e9ed26 "libgcc_s.so.1", mode=mode@entry=-2147483647) at dl-libc.c:163
#11 0x00007ffa01e2e2a5 in init () at ../sysdeps/x86_64/backtrace.c:52
#12 0x00007ffa020f2390 in pthread_once () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S:103
#13 0x00007ffa01e2e3c4 in __GI___backtrace (array=array@entry=0x7fffbf31e090, size=size@entry=64) at ../sysdeps/x86_64/backtrace.c:103
#14 0x00007ffa01d905c5 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7ffa01ea4440 "*** Error in `%s': %s: 0x%s ***\n")
				    at ../sysdeps/unix/sysv/linux/libc_fatal.c:178
#15 0x00007ffa01d9bfe1 in malloc_printerr (ptr=0x233f4c0, str=0x7ffa01ea03e8 "corrupted double-linked list", action=3) at malloc.c:4923
#16 malloc_consolidate (av=av@entry=0x7ffa020de740 <main_arena>) at malloc.c:4102
#17 0x00007ffa01d9c898 in _int_free (av=0x7ffa020de740 <main_arena>, p=0x25a75a0, have_lock=0) at malloc.c:3994
#18 0x00007ffa02bd324b in wxArrayString::Free() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#19 0x00007ffa02bd32b9 in wxArrayString::~wxArrayString() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#20 0x000000000042fcbe in wxPathList::~wxPathList (this=0x66c030 <kiway+144>, __in_chrg=<optimized out>) at /usr/include/wx-2.8/wx/filefn.h:740
#21 0x00000000004348ee in SEARCH_STACK::~SEARCH_STACK (this=0x66c030 <kiway+144>, __in_chrg=<optimized out>)
					    at /home/blair/sources/kicad/product/include/search_stack.h:15
#22 0x000000000043e4f4 in PROJECT::~PROJECT (this=0x66c028 <kiway+136>, __in_chrg=<optimized out>) at /home/blair/sources/kicad/product/common/project.cpp:43
#23 0x0000000000430e7b in KIWAY::~KIWAY (this=0x66bfa0 <kiway>, __in_chrg=<optimized out>) at /home/blair/sources/kicad/product/include/kiway.h:248
#24 0x00007ffa01d58121 in __run_exit_handlers (status=0, listp=0x7ffa020de6a8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:77
#25 0x00007ffa01d581a5 in __GI_exit (status=<optimized out>) at exit.c:99
#26 0x00007ffa01d3deac in __libc_start_main (main=0x42e5ce <main(int, char**)>, argc=2, ubp_av=0x7fffbf31eab8, init=<optimized out>, fini=<optimized out>, 
						    rtld_fini=<optimized out>, stack_end=0x7fffbf31eaa8) at libc-start.c:294
#27 0x000000000042deb9 in _start ()

Follow ups

References