Nickx27 / libjingle

Automatically exported from code.google.com/p/libjingle
0 stars 0 forks source link

call doesn't quit correctly on mac #92

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run call on mac
2. login then quit

What is the expected output? What do you see instead?
On linux, call quits correctly, On mac, "bus error" happens, application 
doesn't return correctly

What version of the product are you using? On what operating system?
The same problems happens with 0.5 and 0.5.1. On mac 10.6.

Please provide any additional information below.
I would assume application doesn't shutdown all threads correctly, call stack 
attached below. I can provide more info if needed.
quit
(call)
logged out...
(call) Cleanup 

(Here, I pressed return key because application doesn't return)

Program received signal SIGUSR1, User defined signal 1.
[Switching to process 1464]
0x92a25142 in semaphore_wait_signal_trap ()
(gdb) bt
#0  0x92a25142 in semaphore_wait_signal_trap ()
#1  0x92a2ac46 in pthread_mutex_lock ()
#2  0x92a59ae7 in flockfile ()
#3  0x92a4fc29 in fgets ()
#4  0x00030a5f in Console::RunConsole (this=0xf1d7a0) at 
examples/call/console.cc:139
#5  0x00030bc3 in Console::OnMessage (this=0xf1d7a0, msg=0xb0080f18) at 
examples/call/console.cc:159
#6  0x004b0dd9 in talk_base::MessageQueue::Dispatch (this=0xf1d7c0, 
pmsg=0xb0080f18) at base/messagequeue.cc:372
#7  0x004d8a4b in talk_base::Thread::ProcessMessages (this=0xf1d7c0, 
cmsLoop=-1) at base/thread.cc:492
#8  0x004d8a8f in talk_base::Thread::Run (this=0xf1d7c0) at base/thread.cc:359
#9  0x004d9712 in talk_base::Thread::PreRun (pv=0xf0e830) at base/thread.cc:352
#10 0x92a5285d in _pthread_start ()
#11 0x92a526e2 in thread_start ()
(gdb) 

Original issue reported on code.google.com by ciwav...@gmail.com on 12 Nov 2010 at 6:36

GoogleCodeExporter commented 9 years ago
I'm able to repro this issue, will be looking into this one soon.

Original comment by jun...@google.com on 17 Nov 2010 at 5:45

GoogleCodeExporter commented 9 years ago
I think the problem is close(stdin) is not able to force fgets to quit on mac, 
need to find a different way to exit from fgets. 

Original comment by ciwav...@gmail.com on 18 Nov 2010 at 8:42

GoogleCodeExporter commented 9 years ago
I'm no longer be able to repro this again. What I did was that after type in 
"quit", give it few sec then press "Enter" key. The app will exit normally.

Original comment by jun...@google.com on 1 Jan 2011 at 11:24