[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[E-devel] Segfault in equate using scientific mode



I got it by a segfault testing equate. Backtrace attached (really).

I think it something ewl don't like. Not sure 100%.

Have fun tracking the bug.

Marc-André Landry
lma1980...gmail.com

$ gdb equate -directory /usr/portage/distfiles/cvs-src/misc/equate/src/ -directory /usr/portage/distfiles/cvs-src/e17/libs/ewl/src/lib/
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) set args -s
(gdb) run
Starting program: /usr/bin/equate -s
[Thread debugging using libthread_db enabled]
[New Thread -1217304912 (LWP 18637)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1217304912 (LWP 18637)]
0xb7ecdad3 in ewl_widget_type_is (widget=0x2, type=0xb7ee250b "widget") at ewl_widget.c:1592
1592            if (widget->inheritance) 
(gdb) bt
#0  0xb7ecdad3 in ewl_widget_type_is (widget=0x2, type=0xb7ee250b "widget") at ewl_widget.c:1592
#1  0xb7ed5710 in ewl_widget_show (w=0x2) at ewl_widget.c:327
#2  0x0804ac24 in draw_ewl (draw_mode=SCI) at gui.c:400
#3  0x0804adc0 in equate_init_gui (equate=0x804ff94, argc=2, argv=0xbf9b5214) at gui.c:252
#4  0x0804d4f2 in main (argc=2, argv=0xbf9b5214, env=Cannot access memory at address 0x8
) at main.c:107
(gdb) l
1587            DCHECK_PARAM_PTR_RET("widget", widget, FALSE);
1588            DCHECK_PARAM_PTR_RET("type", type, FALSE);
1589            /* we don't check the type of the widget in here or we'll get into
1590             * an infinate loop ... */
1591
1592            if (widget->inheritance) 
1593            {
1594                    char *match, *end;
1595
1596                    match = (char *)widget->inheritance;
(gdb) p match
No symbol "match" in current context.
(gdb) p widget
$1 = (Ewl_Widget *) 0x2
(gdb) p widget->inheritance
Cannot access memory at address 0x152
(gdb) p type
$2 = 0xb7ee250b "widget"
(gdb) p *widget->inheritance
Cannot access memory at address 0x152
(gdb) down
Bottom (innermost) frame selected; you cannot go down.
(gdb) up
#1  0xb7ed5710 in ewl_widget_show (w=0x2) at ewl_widget.c:327
327             DCHECK_TYPE("w", w, EWL_WIDGET_TYPE);
(gdb) l
322     void
323     ewl_widget_show(Ewl_Widget *w)
324     {
325             DENTER_FUNCTION(DLEVEL_STABLE);
326             DCHECK_PARAM_PTR("w", w);
327             DCHECK_TYPE("w", w, EWL_WIDGET_TYPE);
328
329             /*
330              * Nothing to do if already visible.
331              */
(gdb) p *w
Cannot access memory at address 0x2
(gdb) p w
$3 = (Ewl_Widget *) 0x2
(gdb) up
#2  0x0804ac24 in draw_ewl (draw_mode=SCI) at gui.c:400
400           ewl_widget_show(disp_cell[2]);
(gdb) l
395        ewl_container_child_append(EWL_CONTAINER(displaycell), disp_table);
396        ewl_widget_show(disp_cell[1]);
397        ewl_container_child_append(EWL_CONTAINER(disp_table), disp_cell[1]);
398        ewl_grid_child_position_set(EWL_GRID(disp_table), disp_cell[1], 0, 0, 0, 0);
399        if (calc_mode == SCI) {
400           ewl_widget_show(disp_cell[2]);
401           ewl_container_child_append(EWL_CONTAINER(disp_table), disp_cell[2]);
402           ewl_grid_child_position_set(EWL_GRID(disp_table), disp_cell[2], 0, 0, 1, 1);
403        }
404        ewl_widget_configure(disp_table);
(gdb) p calc_mode
$4 = SCI
(gdb) p disp_cell[2]
Can't take address of "disp_cell" which isn't an lvalue.
(gdb) p disp_cell
$5 = {0x0, 0x8066678}
(gdb) p &disp_cell[2]
Can't take address of "disp_cell" which isn't an lvalue.
(gdb) p *disp_cell[2]
Can't take address of "disp_cell" which isn't an lvalue.
(gdb) up
#3  0x0804adc0 in equate_init_gui (equate=0x804ff94, argc=2, argv=0xbf9b5214) at gui.c:252
252              draw_ewl(equate->conf.mode);
(gdb) l
247               * case SCI:
248               */
249           default:
250              inited = 1;
251              ewl_init(&argc, argv);
252              draw_ewl(equate->conf.mode);
253              ewl_main();
254              break;
255           }
256        }
(gdb) p equate
$6 = (Equate *) 0x804ff94
(gdb) p equate->conf.mode
$7 = SCI
(gdb) up
#4  0x0804d4f2 in main (argc=2, argv=0xbf9b5214, env=Cannot access memory at address 0x8
) at main.c:107
107        equate_init_gui(&equate, argc, argv);
(gdb) l
102
103        ecore_config_listen("gui_mode", "/settings/mode", gui_listener, 0, NULL);
104        ecore_config_listen("gui_theme", "/settings/theme", gui_listener, 1, NULL);
105
106        equate_init(&equate);
107        equate_init_gui(&equate, argc, argv);
108        return 0;
109     }
(gdb) p argc
$8 = 2
(gdb) p argv
$9 = (char **) 0xbf9b5214
(gdb) up
Initial frame selected; you cannot go up.
(gdb) exit