nick aschberger
15 years ago
Hi Folks,
Details are:
WX : 2.8.10
OS : Linux Centos-5 (Red hat 5)
COMPILER: gcc 4.1.2
I have a multithreaded application - there is the main thread, and a simple
wxthread whose job it is to block on a socket, and take data off the socket
and buffer it.
Periodically, the worker thread posts events (wxPostEvent) to the main
thread
to tell it what is going on, then waits on a condition variable to be
notified
it may again progress. All standard threading behaviour.
This works swimmingly well in my windows build of the application, and works
99% of the time on my linux build, however - on linux the main thread seems
to occasionally just get "lost".
I stop getting events - there is no updateUIevent, no refreshing, and when
the worker thread sends it's event to the main GUI thread, this is not
responded to either.
The application becomes unresponsive - the menu's are "blanked out" and
can't be clicked on, etc. The main thread is stuck!
Oddly, it a "CloseEvent" does fire (on "x" click), but the "exit - yes/no"
dialog I pop up is also locked up/blank.
Here is a backtrace of where the app is:
0x003da402 in __kernel_vsyscall ()
(gdb) bt
#0 0x003da402 in __kernel_vsyscall ()
#1 0x00e0ffeb in poll () from /lib/libc.so.6
#2 0x081486db in wxapp_poll_func (ufds=0x9cdc928, nfds=2, timeout=-1)
at ./src/gtk/app.cpp:259
#3 0x00a1b1c9 in ?? () from /lib/libglib-2.0.so.0
#4 0x00a1b557 in g_main_loop_run () from /lib/libglib-2.0.so.0
#5 0x02d9db84 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#6 0x08218127 in wxEventLoop::Run (this=0x9e19058) at
./src/gtk/evtloop.cpp:76
#7 0x08191fe6 in wxAppBase::MainLoop (this=0x9cb5f88)
at ./src/common/appcmn.cpp:312
#8 0x08191a23 in wxAppBase::OnRun (this=0x9cb5f88)
at ./src/common/appcmn.cpp:367
#9 0x082bc0a8 in wxEntry (argc=@0xbfcb2c00, argv=0xbfcb2c84)
at ./src/common/init.cpp:460
#10 0x08083380 in main (argc=Cannot access memory at address 0x2
) at ../../src/MyAppMain.cpp:42
If I step it, I can never get it to return from "g_main_loop_run()".
Has anyone got any suggestions at all for this? I'm stumped, and it's a a
showstopper for me.
cheers
Nick Aschberger
Details are:
WX : 2.8.10
OS : Linux Centos-5 (Red hat 5)
COMPILER: gcc 4.1.2
I have a multithreaded application - there is the main thread, and a simple
wxthread whose job it is to block on a socket, and take data off the socket
and buffer it.
Periodically, the worker thread posts events (wxPostEvent) to the main
thread
to tell it what is going on, then waits on a condition variable to be
notified
it may again progress. All standard threading behaviour.
This works swimmingly well in my windows build of the application, and works
99% of the time on my linux build, however - on linux the main thread seems
to occasionally just get "lost".
I stop getting events - there is no updateUIevent, no refreshing, and when
the worker thread sends it's event to the main GUI thread, this is not
responded to either.
The application becomes unresponsive - the menu's are "blanked out" and
can't be clicked on, etc. The main thread is stuck!
Oddly, it a "CloseEvent" does fire (on "x" click), but the "exit - yes/no"
dialog I pop up is also locked up/blank.
Here is a backtrace of where the app is:
0x003da402 in __kernel_vsyscall ()
(gdb) bt
#0 0x003da402 in __kernel_vsyscall ()
#1 0x00e0ffeb in poll () from /lib/libc.so.6
#2 0x081486db in wxapp_poll_func (ufds=0x9cdc928, nfds=2, timeout=-1)
at ./src/gtk/app.cpp:259
#3 0x00a1b1c9 in ?? () from /lib/libglib-2.0.so.0
#4 0x00a1b557 in g_main_loop_run () from /lib/libglib-2.0.so.0
#5 0x02d9db84 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#6 0x08218127 in wxEventLoop::Run (this=0x9e19058) at
./src/gtk/evtloop.cpp:76
#7 0x08191fe6 in wxAppBase::MainLoop (this=0x9cb5f88)
at ./src/common/appcmn.cpp:312
#8 0x08191a23 in wxAppBase::OnRun (this=0x9cb5f88)
at ./src/common/appcmn.cpp:367
#9 0x082bc0a8 in wxEntry (argc=@0xbfcb2c00, argv=0xbfcb2c84)
at ./src/common/init.cpp:460
#10 0x08083380 in main (argc=Cannot access memory at address 0x2
) at ../../src/MyAppMain.cpp:42
If I step it, I can never get it to return from "g_main_loop_run()".
Has anyone got any suggestions at all for this? I'm stumped, and it's a a
showstopper for me.
cheers
Nick Aschberger