Closed Bug 932881 Opened 12 years ago Closed 12 years ago

Explicit cast currentSipccState for log in PeerConnectionCtx.cpp

Categories

(Firefox OS Graveyard :: General, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kk1fff, Assigned: kk1fff)

References

Details

Attachments

(1 file, 2 obsolete files)

Test in b2g emulator failure because content process crashes when trying to log value of currentSipccState in PeerConnectionCtx.cpp
Comment on attachment 824752 [details] [diff] [review] Patch: Explicitly cast currentSipccState to uint32_t Review of attachment 824752 [details] [diff] [review]: ----------------------------------------------------------------- Adam, patrick says with this we get a crash... Can you take a quick look?
Attachment #824752 - Flags: review?(ekr) → review?(adam)
Comment on attachment 824752 [details] [diff] [review] Patch: Explicitly cast currentSipccState to uint32_t Review of attachment 824752 [details] [diff] [review]: ----------------------------------------------------------------- I don't understand the nature of the crash or why this fixes it, but if a cast makes it happy, I don't see any possible harm. r- for using the wrong kind of cast. Should be an easy fix, though. ::: media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp @@ +325,5 @@ > > switch (aDeviceEvent) { > case CCAPI_DEVICE_EV_STATE: > + CSFLogDebug(logTag, "%s - %d : %d", __FUNCTION__, state, > + (uint32_t)currentSipccState); This is C++ code, so we need to use C++ style casts rather than C style casts. The final parameter should be: static_cast<uint32_t>(currentSipccStates)
Attachment #824752 - Flags: review?(adam) → review-
Patrick: For my own understanding, can you attach a backtrace of the crash to this bug?
backtrace: #0 abort () at /home/patrick/w/hgpool/emu2/mcgit/memory/mozalloc/mozalloc_abort.cpp:39 #1 0x4106d1ee in sipcc::PeerConnectionCtx::onDeviceEvent (this=<value optimized out>, aDeviceEvent=CCAPI_DEVICE_EV_STATE, aDevice=<value optimized out>, aInfo=<value optimized out>) at /home/patrick/w/hgpool/emu2/mcgit/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp:328 #2 0x41060b50 in CSF::CallControlManagerImpl::notifyDeviceEventObservers ( this=0x439a1e00, deviceEvent=CCAPI_DEVICE_EV_STATE, devicePtr=..., info=...) at /home/patrick/w/hgpool/emu2/mcgit/media/webrtc/signaling/src/callcontrol/CallControlManagerImpl.cpp:467 #3 0x41060bae in CSF::CallControlManagerImpl::onDeviceEvent (this=0x439a1e00, deviceEvent=CCAPI_DEVICE_EV_STATE, devicePtr=<value optimized out>, info=<value optimized out>) at /home/patrick/w/hgpool/emu2/mcgit/media/webrtc/signaling/src/callcontrol/CallControlManagerImpl.cpp:445 #4 0x4106b44e in CSF::CC_SIPCCService::notifyDeviceEventObservers ( this=<value optimized out>, eventType=CCAPI_DEVICE_EV_STATE, devicePtr=..., info=...) at /home/patrick/w/hgpool/emu2/mcgit/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCService.cpp:765 #5 0x4106c1ae in CSF::CC_SIPCCService::onDeviceEvent (type=CCAPI_DEVICE_EV_STATE, handle=<value optimized out>, info=<value optimized out>) at /home/patrick/w/hgpool/emu2/mcgit/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCService.cpp:629 #6 0x4106c216 in CCAPI_DeviceListener_onDeviceEvent (type=1141780272, hDevice=1141780192, dev_info=0x43fc9d38) at /home/patrick/w/hgpool/emu2/mcgit/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCService.cpp:284 #7 0x4107dd3a in ccsnap_gen_deviceEvent (event=CCAPI_DEVICE_EV_STATE, handle=0) at /home/patrick/w/hgpool/emu2/mcgit/media/webrtc/signaling/src/sipcc/core/ccapp/ccapi_snapshot.c:409 #8 0x4107eb5c in ccapp_hlapi_update_device_reg_state () at /home/patrick/w/hgpool/emu2/mcgit/media/webrtc/signaling/src/sipcc/core/ccapp/ccprovider.c:221 #9 0x41081598 in ccp_handler (msg=0x44103140, type=<value optimized out>) at /home/patrick/w/hgpool/emu2/mcgit/media/webrtc/signaling/src/sipcc/core/ccapp/ccprovider.c:2066 #10 0x4107e5c0 in CCApp_task (arg=<value optimized out>) at /home/patrick/w/hgpool/emu2/mcgit/media/webrtc/signaling/src/sipcc/core/ccapp/ccapp_task.c:184 #11 0x4005de4c in __thread_entry (func=0x4107e4fd <CCApp_task>, arg=0x43b01980, tls=<value optimized out>) at bionic/libc/bionic/pthread.c:217 #12 0x4005d99c in pthread_create (thread_out=<value optimized out>, attr=0xbeeb4e14, start_routine=0x4107e4fd <CCApp_task>, arg=0x43b01980) at bionic/libc/bionic/pthread.c:357 This happens in b2g emulator with patch of bug 881761, the test case is dom/bindings/test/test_exceptions_from_jsimplemented.html.
Attachment #824752 - Attachment is obsolete: true
Attachment #826318 - Flags: review?(adam)
Comment on attachment 826318 [details] [diff] [review] Patch: Explicitly cast currentSipccState to uint32_t Review of attachment 826318 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me.
Attachment #826318 - Flags: review?(adam) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: