is this a glibmm/glib bug?
- From: Aleksandar Kanchev <kanchev in tum de>
- To: gtkmm-list gnome org
- Subject: is this a glibmm/glib bug?
- Date: Thu, 31 Jan 2008 12:56:17 +0100
Hello list,
I'm developing a bluetooth C++ library based on glibmm. I've stumbled
upon a problem which concerns Glib::IOChannel(s). The problem occurs in
the following scenario:
1) open an RFCOMM socket to a remote bluetooth device and
Glib::IOChannel::create_from_fd()
2) connect the socket's file descriptor to Glib::SignalIO and wait
for Glib:IO_OUT
3) when Glib::IO_OUT is set, then write some bytes to the
Glib::IOChannel
4) shut down the bluetooth device in order to terminate the
bluetooth connection, this also terminates the file descriptor
5) flush the Glib::IOChannel, this causes:
GLib-ERROR **: file giochannel.c: line 951 (g_io_channel_flush):
assertion failed: (this_time > 0)
aborting...
Program received signal SIGABRT, Aborted.
0x00110402 in __kernel_vsyscall ()
(gdb) bt
#0 0x00110402 in __kernel_vsyscall ()
#1 0x00b15690 in raise () from /lib/libc.so.6
#2 0x00b16f91 in abort () from /lib/libc.so.6
#3 0x00d0df7a in g_logv () from /lib/libglib-2.0.so.0
#4 0x00d0dfb9 in g_log () from /lib/libglib-2.0.so.0
#5 0x00d0e036 in g_assert_warning () from /lib/libglib-2.0.so.0
#6 0x00cfa7a1 in g_io_channel_flush () from /lib/libglib-2.0.so.0
#7 0x007f274e in Glib::IOChannel::flush () from /usr/lib/libglibmm-2.4.so.1
I came across this because my nokia phone was disconnecting immediately
after a connection was established. I was able to reproduce the error by
sleeping right after a Glib::IOChannel::write and shutting down the
bluetooth connection from my phone while the program was sleeping, then
flushing the Glib::IOChannel. If I ::close() (the syscall) the fd,
instead of shutting down the phone, then I get:
(process:19643): GLib-WARNING **: Invalid file descriptor.
which is ok.
What does the GLib-Error mean? Is it a glib, glibmm or bluez problem?
I was using:
gtkmm24-2.12.3-1.fc8
glibmm24-2.14.2-1.fc8
glib2-2.14.4-1.fc8
bluez-libs-3.20-1.fc8
Linux 2.6.23.14-107.fc8 #1 SMP Mon Jan 14 21:37:30 EST 2008 i686 i686
i386 GNU/Linux
on Fedora 8
best regards,
Aleksandar
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]