Ethereal-dev: Re: [ethereal-dev] Re: [ethereal-users] A problem when I use it.

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Kim, Yong-Woon" <qkim@xxxxxxxxxxxxxx>
Date: Mon, 17 Jan 2000 10:47:34 +0900
> > 1. OS: SunOS 5.7
> > 2. GTK+: 1.2.6
> > 3. Ethereal: 0.8.1, with GTK+ 1.2.3, with libpcap 0.4, with libz 1.1.3
> 
> 0. Processor: SPARC
> 
> (Right?)
> 
> > Program terminated with signal 10, Bus Error.
> 
> ...
> 
> > #0  dissect_bgp_update (pd=0x1d10f8 "", offset=94, fd=0x1d1169, tree=0x1c3f3c) at packet-bgp.c:324
> > 324         len = ntohs(*(guint16 *)p);
> 
> Yup, it's another unaligned-pointer dereference.
> 
> Apply the attached patch to "packet-bgp.c", recompile, and try again
> with that capture file.  (I'm at home, so I only have a PC on which to
> try this, and x86 processors, by default, don't fault on unaligned
> references.)
> 
> Developers: if you're going to cast pointers into the packet buffer into
> pointers to anything larger than a byte, *PLEASE* do not then
> dereference those pointers directly - use "pntohs()" and "pntohl()"
> instead.  Otherwise, you'll run the risk of causing crashes such as this
> on most non-x86 systems.
> 

Thank you for fixing it!

Now it works. But I'll tell you some other bugs.

- OS: Sun SPARC 5.7
- GTK+: 1.2.6
- Ethereal: 0.8.1, with GTK+ 1.2.6 now, with libpcap 0.4, with libz 1.1.3

After patching that, 

1. In the menu box of 'Capture and Start', Any character doesn't display at the 
   Interface and Count boxes, but I can see default names such as hme0 and 
   0 (infinite) when I click the pop up point rightmost .

2. When I set infinite, real-time update, name resolution with a file log, 
   the ethereal doesn't work with the file size of '0 byte'.

3. At the above 2, I reset the name resolution checkbox and clicked 'OK'
   I got "core dumped" with some error messages as follows. 

-----------
** ERROR **: file capture.c: line 148 (do_capture): assertion failed: (cf.save_file == NULL)
aborting...

Gdk-WARNING **: GdkWindow 0xc001fe unexpectedly destroyed
Gdk-WARNING **: GdkWindow 0xc001fd unexpectedly destroyed
Gdk-WARNING **: GdkWindow 0xc001fb unexpectedly destroyed
Gdk-ERROR **: called gdk_window_destroy on a pixmap (use gdk_pixmap_unref)
aborting...
-----------

I'll attach the stack trace file.


[ root@host : /tmp 56 ] gdb ethereal core
GNU gdb 4.18
Copyright 1998 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 "sparc-sun-solaris2.7"...
Core was generated by `./ethereal'.
Program terminated with signal 6, Abort.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/local/lib/libgtk-1.2.so.0...done.
Reading symbols from /usr/local/lib/libgdk-1.2.so.0...done.
Reading symbols from /usr/local/lib/libgmodule-1.2.so.0...done.
Reading symbols from /usr/local/lib/libglib-1.2.so.0...done.
Reading symbols from /usr/openwin/lib/libXext.so.0...done.
Reading symbols from /usr/openwin/lib/libX11.so.4...done.
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /opt/SUNWspro/lib/libm.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/lib/libmp.so.2...done.
Reading symbols from /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1...done.
Reading symbols from /usr/local/lib/ethereal/plugins/0.8/gryphon.so...done.
Reading symbols from /usr/lib/nss_nisplus.so.1...done.
Reading symbols from /usr/lib/libdoor.so.1...done.
#0  0xfef16870 in _libc_kill () from /usr/lib/libc.so.1
(gdb) backtrace
#0  0xfef16870 in _libc_kill () from /usr/lib/libc.so.1
#1  0xfeeb92e0 in abort () from /usr/lib/libc.so.1
#2  0xff0fa540 in g_logv (log_domain=0xff168130 "Gdk", log_level=G_LOG_LEVEL_ERROR, format=0x0, 
    args1=0x6) at gmessages.c:389
#3  0xff0fa5d8 in g_log (log_domain=0xff168130 "Gdk", log_level=G_LOG_LEVEL_ERROR, 
    format=0xff168288 "called gdk_window_destroy on a pixmap (use gdk_pixmap_unref)")
    at gmessages.c:406
#4  0xff15d65c in gdk_window_internal_destroy (window=0x387650, xdestroy=0, our_destroy=0)
    at gdkwindow.c:674
#5  0xff15d748 in gdk_window_destroy_notify (window=0x387650) at gdkwindow.c:705
#6  0xff14ca50 in gdk_event_translate (event=0x1ccd88, xevent=0xffbeed80) at gdkevents.c:1640
#7  0xff14cfcc in gdk_events_queue () at gdkevents.c:2045
#8  0xff14d294 in gdk_event_dispatch (source_data=0x0, current_time=0xffbeef40, user_data=0x0)
    at gdkevents.c:2123
#9  0xff0f705c in g_main_dispatch (current_time=0xffbeef40) at gmain.c:656
#10 0xff0f7874 in g_main_iterate (block=1568120, dispatch=1) at gmain.c:874
#11 0xff0f7a94 in g_main_run (loop=0x1bcaf8) at gmain.c:932
#12 0xff24ad3c in gtk_main () at gtkmain.c:476
#13 0xc2000 in main (argc=1, argv=0xffbef164) at main.c:1544
(gdb) quit
[ root@host : /tmp 57 ] exit
[ root@host : /tmp 58 ]