abom / linux-whiteboard

Automatically exported from code.google.com/p/linux-whiteboard
GNU General Public License v2.0
1 stars 0 forks source link

crash when i calibre #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. them calibrate crash the program on debian lenny
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
Linux debian Lenny

Please provide any additional information below.
this is the dump of the error

System: Linux 2.6.25-2-686 #1 SMP Fri Jul 18 17:46:56 UTC 2008 i686
X Vendor: The X.Org Foundation
X Vendor Release: 10402000
Selinux: No
Accessibility: Disabled
GTK+ Theme: Clearlooks
Icon Theme: gnome

Memory status: size: 61616128 vsize: 61616128 resident: 18415616 share:
13549568 rss: 18415616 rss_rlim: 4294967295
CPU usage: start_time: 1218932275 rtime: 2710 utime: 601 stime: 2109
cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 100

Backtrace was generated from '/usr/local/bin/whiteboard'

[Thread debugging using libthread_db enabled]
[New Thread 0xb6e09af0 (LWP 17841)]
[New Thread 0xb6148b90 (LWP 18078)]
[New Thread 0xb6949b90 (LWP 17858)]
[New Thread 0xb57feb90 (LWP 17851)]
[New Thread 0xb5fffb90 (LWP 17850)]
0xb7f69424 in __kernel_vsyscall ()
#0  0xb7f69424 in __kernel_vsyscall ()
#1  0xb7272ca9 in __lll_lock_wait () from /lib/i686/cmov/libpthread.so.0
#2  0xb726e0c4 in _L_lock_89 () from /lib/i686/cmov/libpthread.so.0
#3  0xb726d9f2 in pthread_mutex_lock () from /lib/i686/cmov/libpthread.so.0
#4  0xb75cf4d6 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#5  0x08ae60c0 in ?? ()
#6  0xb7640d28 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#7  0xbfa82d68 in ?? ()
#8  0xb75fde97 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#9  0x00000001 in ?? ()
#10 0x00000000 in ?? ()

Thread 5 (Thread 0xb5fffb90 (LWP 17850)):
#0  0xb7f69424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb72730bb in read () from /lib/i686/cmov/libpthread.so.0
No symbol table info available.
#2  0xb73a478a in router_thread () from /usr/lib/libcwiid.so.1
No symbol table info available.
#3  0xb726c4c0 in start_thread () from /lib/i686/cmov/libpthread.so.0
No symbol table info available.
#4  0xb71eb55e in clone () from /lib/i686/cmov/libc.so.6
No symbol table info available.

Thread 4 (Thread 0xb57feb90 (LWP 17851)):
#0  0xb7f69424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb72730bb in read () from /lib/i686/cmov/libpthread.so.0
No symbol table info available.
#2  0xb73a54e7 in full_read () from /usr/lib/libcwiid.so.1
No symbol table info available.
#3  0xb73a4e24 in status_thread () from /usr/lib/libcwiid.so.1
No symbol table info available.
#4  0xb726c4c0 in start_thread () from /lib/i686/cmov/libpthread.so.0
No symbol table info available.
#5  0xb71eb55e in clone () from /lib/i686/cmov/libc.so.6
No symbol table info available.

Thread 3 (Thread 0xb6949b90 (LWP 17858)):
#0  0xb7f69424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7273ffb in waitpid () from /lib/i686/cmov/libpthread.so.0
No symbol table info available.
#2  0xb7419ae3 in g_spawn_sync () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#3  0xb7419dec in g_spawn_command_line_sync () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#4  0xb6c54198 in ?? () from /usr/lib/gtk-2.0/modules/libgnomebreakpad.so
No symbol table info available.
#5  <signal handler called>
No symbol table info available.
#6  0xb73a34ec in cwiid_disable () from /usr/lib/libcwiid.so.1
No symbol table info available.
#7  0x0805df99 in wiicursor_thread_func (ptr=0xbfa81d24) at wiicursor.cpp:36
    wc = {m_thread_data = {ir = {x = 1, y = 0}, ir_on_mouse_down = {x = 341, y
= 197}, waited = 1001, moved = 1, thread_running = false, 
    this_thread = 0xb6088b60, move_tolerance = 2, wait_tolerance =
@0x806d948, running = 0xbfa81d6c, events = {
      left_clicked = {<sigc::slot1<void, const WiiEventData&>> =
{<sigc::slot_base> = {<sigc::functor_base> = {<No data fields>}, rep_ = 0x0, 
            blocked_ = false}, <No data fields>}, <No data fields>}, 
      right_button_down = {<sigc::slot1<void, const WiiEventData&>> =
{<sigc::slot_base> = {<sigc::functor_base> = {<No data fields>}, rep_ =
0x8b7bc90, 
            blocked_ = false}, <No data fields>}, <No data fields>}, 
      right_button_up = {<sigc::slot1<void, const WiiEventData&>> =
{<sigc::slot_base> = {<sigc::functor_base> = {<No data fields>}, rep_ = 0x0, 
            blocked_ = false}, <No data fields>}, <No data fields>}, 
      begin_click_and_drag = {<sigc::slot1<void, const WiiEventData&>> =
{<sigc::slot_base> = {<sigc::functor_base> = {<No data fields>}, rep_ =
0x8d2eb08, 
            blocked_ = false}, <No data fields>}, <No data fields>}, 
      end_click_and_drag = {<sigc::slot1<void, const WiiEventData&>> =
{<sigc::slot_base> = {<sigc::functor_base> = {<No data fields>}, rep_ = 0x0, 
            blocked_ = false}, <No data fields>}, <No data fields>}, 
      mouse_down = {<sigc::slot1<void, const WiiEventData&>> =
{<sigc::slot_base> = {<sigc::functor_base> = {<No data fields>}, rep_ =
0x8dac2d8, 
            blocked_ = false}, <No data fields>}, <No data fields>}, 
      mouse_up = {<sigc::slot1<void, const WiiEventData&>> =
{<sigc::slot_base> = {<sigc::functor_base> = {<No data fields>}, rep_ =
0x8c7f848, 
            blocked_ = false}, <No data fields>}, <No data fields>}, 
      mouse_moved = {<sigc::slot1<void, const WiiEventData&>> =
{<sigc::slot_base> = {<sigc::functor_base> = {<No data fields>}, rep_ =
0x8c7f878, 
            blocked_ = false}, <No data fields>}, <No data fields>}},
event_data = {ir_pos = @0xb69492c4, ir_on_mouse_down = @0xb69492cc,
cursor_pos = {
        x = 0, y = 0}, waited = @0xb69492d4, move_tolerance =
@0xb69492e8}}, m_ir_filter = {m_pos_current = @0xb69492c4, m_move_tolerance
= @0xb69492e8, 
    m_old_positions = {<std::_List_base<Point<int>,
std::allocator<Point<int> > >> = {
        _M_impl = {<std::allocator<std::_List_node<Point<int> > >> =
{<__gnu_cxx::new_allocator<std::_List_node<Point<int> > >> = {<No data
fields>}, <No data fields>}, _M_node = {_M_next = 0xb6949354, _M_prev =
0xb6949354}}}, <No data fields>}, m_last_time = 1218932462192,
m_disappearing = 0, 
    static MAX_NUMBER_OF_POSITIONS = <optimized out>, static
DISAPPEARANCE_TOLERANCE = <optimized out>}}
    __FUNCTION__ = "wiicursor_thread_func"
#8  0xb726c4c0 in start_thread () from /lib/i686/cmov/libpthread.so.0
No symbol table info available.
#9  0xb71eb55e in clone () from /lib/i686/cmov/libc.so.6
No symbol table info available.

Thread 2 (Thread 0xb6148b90 (LWP 18078)):
#0  0xb7f69424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb71e0ce7 in poll () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#2  0xb73e4812 in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#3  0x08ddc6e8 in ?? ()
No symbol table info available.
#4  0x00000004 in ?? ()
No symbol table info available.
#5  0xb73e4ea2 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#6  0xb6aefb50 in ?? () from /usr/lib/libORBit-2.so.0
No symbol table info available.
#7  0xb6020ad0 in ?? ()
No symbol table info available.
#8  0xb745c4e8 in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#9  0xb6148378 in ?? ()
No symbol table info available.
#10 0xb740b2bf in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#11 0x00000000 in ?? ()
No symbol table info available.

Thread 1 (Thread 0xb6e09af0 (LWP 17841)):
#0  0xb7f69424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7272ca9 in __lll_lock_wait () from /lib/i686/cmov/libpthread.so.0
No symbol table info available.
#2  0xb726e0c4 in _L_lock_89 () from /lib/i686/cmov/libpthread.so.0
No symbol table info available.
#3  0xb726d9f2 in pthread_mutex_lock () from /lib/i686/cmov/libpthread.so.0
No symbol table info available.
#4  0xb75cf4d6 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
No symbol table info available.
#5  0x08ae60c0 in ?? ()
No symbol table info available.
#6  0xb7640d28 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
No symbol table info available.
#7  0xbfa82d68 in ?? ()
No symbol table info available.
#8  0xb75fde97 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
No symbol table info available.
#9  0x00000001 in ?? ()
No symbol table info available.
#10 0x00000000 in ?? ()
No symbol table info available.
#0  0xb7f69424 in __kernel_vsyscall ()
The program is running.  Quit anyway (and detach it)? (y or n) [answered Y;
input not from terminal]

and on 

Original issue reported on code.google.com by chrand...@gmail.com on 17 Aug 2008 at 12:28

GoogleCodeExporter commented 9 years ago
I had the same problem, but after changing the priority for the process it 
worked
fine... 

Original comment by walther....@gmail.com on 12 Feb 2009 at 11:48

GoogleCodeExporter commented 9 years ago
This will be misplaced, sorry... I'd like to join the project and have a lot of 
ideas
and suggestions. 

Original comment by walther....@gmail.com on 13 Feb 2009 at 12:36

GoogleCodeExporter commented 9 years ago
I have the same problem about the crash after the calibration on ubuntu.
Sorry what do you mean with change the priority of the process.
This means give with the nice command a better priority or what?
Walther can you explain me the workaround and the entity of the problem well?
Thanks

Original comment by al...@paranoici.org on 28 Mar 2009 at 2:53

GoogleCodeExporter commented 9 years ago
Change the priority for the whiteboard process to, let's say +3, using nice or 
the
kde system guard, before connecting to the wiimote. The connect and calibrate. 
It
worked fine for me.
I don't know what causes the problem. But I had a similar problem with a 
digitizing
tablet, and a friend of mine told me to do so. After trying many times to run
whiteboard, I remembered this tip and tried, and voilá!
I hope someone will find out what causes the crash and present a better 
solution. ;)

Original comment by walther....@gmail.com on 28 Mar 2009 at 3:16

GoogleCodeExporter commented 9 years ago
By the way, I hope it works for you too... Try it out and tell me if it worked.

Original comment by walther....@gmail.com on 28 Mar 2009 at 3:20

GoogleCodeExporter commented 9 years ago
>> I have the same problem about the crash after the calibration on ubuntu.

What version of whiteboard are you using?. The 'automated' version was I quick 
hack I
did per a user's wish. It is, as stated, not recommended for everyday use.

Original comment by vanhtu1...@gmail.com on 3 Apr 2009 at 10:57

GoogleCodeExporter commented 9 years ago
>> This will be misplaced, sorry... I'd like to join the project and have a lot 
of 
>>ideas and suggestions. 

Thanks for the offer, whiteboard has reached a state where it is usable and 
simple,
but more features are always welcome. Although the codebase works, I've moved 
to a
similar project using one or more tracking devices (now only has supports for
Wiimote) that can do 3D tracking. The library is written in C++ and is 
practically
done (my intention would be moving it over to Python for better compatilibity 
though).

If you're interested in the new library, or would like to improve whiteboard. 
I'd try
to document how it works internally.

Original comment by vanhtu1...@gmail.com on 3 Apr 2009 at 11:08

GoogleCodeExporter commented 9 years ago
It would be great, I'm not a good C++ programmer but I'm really interested in 
see how
things work, yes, I'm a geek!

Original comment by walther....@gmail.com on 4 Apr 2009 at 1:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The basic idea in whiteboard is the mapping from the Wiimote camera's IR 
position to
the screen. I reused the algorithm written by another developer but wrote a 
simpler
(and more flexible) algorithm in the 3D tracking library. You can see the code 
for
whiteboard's algorithm, but here is the explanation for the new one:

In 2D:
 - Have user specifies the origin, X and Y axis unit vectors. That makes 3 points,
usually in the top left, top right and bottom left corners, respectively. They 
can be
any values as far as the Wiimote is concerned. They are stored as (x0, y0), 
(x1, y1)
and (x2, y2) .
 - When running, we'll get the IR coordinates (say (x, y) ) from the Wiimote then do
a dot product with each unit vector. (x, y) * (x1-x0, y1-y0) for the X 
coordinate,
(x, y) * (x2-x0, y2-y0) for the Y coordinate.
 - If we get (1.0, 1.0), that means the cursor is in the bottom right
corner. If we get (0.5, 0.5), that means the cursor is exactly in the middle of 
the
screen. Those will be multiplied by the screen dimension to get the cursor's
coordinates in the screen.

The only source of confusion may be the dot product part: It tells us how much
longer/shorter (with 1.0 being equal) a vector is when mapped to another 
vector. To
make it work in 3D, it is just a matter of calibrating the Z axis unit vector.

You may want to start by building the above algorithm with some test values. 
The rest
(building the GUI, working with the Wiimote), I believe, is not relevant to the
problem being discussed here. You can build a program that works in the 
terminal and
with another tracking device (like a IR camera).

Original comment by vanhtu1...@gmail.com on 4 Apr 2009 at 8:07

GoogleCodeExporter commented 9 years ago
i also have this issue.
changing the priority of the program does nothing for me, except once i set the 
nice
to 19, and the program became unresponsive instead of crashing.

Original comment by nikolard...@gmail.com on 11 Apr 2009 at 11:39

GoogleCodeExporter commented 9 years ago
The crash is not reproducible in my system (Ubuntu 9.04 and earlier). From the
backtrace above, it looks like a GDK/GTK+ bug with threading. Can you try 
whiteboard
with another distro (assuming you haven't got Ubuntu in the first place)?.

Original comment by vanhtu1...@gmail.com on 16 Apr 2009 at 2:52

GoogleCodeExporter commented 9 years ago
I continue to have the same crash.
If I put nice +19 the software go in deadlock.
I ask you if is possible to solve this bug by the root
splitting the application in twice one for the calibration
that save the info in a file and an other
that read the configuration file and start 
to track the pointer.
I think that this can be even a good architecture
in the case of a fix installation we will
calibrate once and run every time.

Original comment by al...@paranoici.org on 12 Jul 2009 at 7:58

GoogleCodeExporter commented 9 years ago
I continue to have this bug 
I'm using ubuntu 9.10

I hope you will can help me and
the ubuntu staff to fix the code to create a stable
package to be published in the next week stable release (koala karmic).

I have seen that creating a new user that use the default desktop and the 
default
configuration the error does not occur.
Is it possible that depends on the used theme or on the running processes
for some concurrency thread problems?
Anyway I think that it is a good idea to separate the calibration code
from the mouse management.

I hope that anyone can put me in the condition to works this fun program fine
because I'm currently using this program to demonstrate the use
of the wiimote such as a whiteboard but I have a lot of problem.

To achieve this goal I have also developed I little program called "ardesia"
that is a naif whiteboard software that allow to draw on the the desktop screen
using any input device.
This is the uri http://code.google.com/p/ardesia/

The idea is using linux-whiteboard plus ardesia as starting point to create a 
cheap
educational platform based on wiimote such as free solution alternative to the
expensive commercial solution. 

I think that this can be a good point to start to distribute free software 
inside the
school
If anyone is interested to try it or to join to the development

Best regards, Bye

Original comment by al...@paranoici.org on 25 Oct 2009 at 1:35