Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault when creating offer with "audio: false" from CHROME #32

Closed
nschoe opened this issue Jun 24, 2014 · 8 comments
Closed

Segfault when creating offer with "audio: false" from CHROME #32

nschoe opened this issue Jun 24, 2014 · 8 comments

Comments

@nschoe
Copy link

nschoe commented Jun 24, 2014

How to reproduce the error :
In the attach success callback, use createOffer with media: { audio: false } and try with Chrome.

It works well with Firefox (30.0) but makes Janus segfaults with Chrome (35.0.xxxx), I am using Archlinux 64 bits.

It doesnt make Janus segfault when using media: {recvAudio: false, sendAudio: false}.

One can reproduce the bug easily by editing the echotest javascript file.

Last lines of console for info :

HTTP webserver started (port 8088, /janus path listener)...
[WARN] HTTPS webserver disabled
Creating new session: 1928089637
Creating new handle in session 1928089637: 4037210781
There's a message for JANUS EchoTest plugin
There's a message for JANUS EchoTest plugin
[4037210781] Creating ICE agent (controlled mode)
zsh: segmentation fault (core dumped)  ./janus

@lminiero
Copy link
Member

Thanks for the info: I was talking with another user of the fact that we hadn't tested the no-audio scenarios extensively, and your report confirms that there definitely is something that needs to be fixed there. The root cause of the issue is probably the bundling that happens in Chrome and not Firefox. By the way, have you checked with the latest version I committed a few minutes ago? There were changes to address bundling itself, and so something may have already been fixed in the process.

It's weird that audio:false fails, while recvAudio:false and sendAudio:false doesn't, though, as the former is a way to quick way to state the latter. I'll try and reproduce myself ASAP.

@lminiero
Copy link
Member

Just FYI, the right syntax for sendonly/recvonly audio is not sendAudio/recvAudio, but audioSend/audioRecv. If you used the incorrect one, you were indeed not disabling audio in any direction at all, which explains why it worked.

@nschoe
Copy link
Author

nschoe commented Jun 24, 2014

Ah ! This may explain why firefox still asks me for audio when I do that. I'll try that right now.
But the way I have tested with the version you uploaded a couple of days ago, not the last minute. I'll try the new syntax and I'll come back to you ASAP.

@nschoe
Copy link
Author

nschoe commented Jun 24, 2014

Indeed : Firefox doesn't ask me for audio anymore, and you were right : when using audioSend: false and audioRecv: false I still have Janus segfaults with Chrome.

@nschoe
Copy link
Author

nschoe commented Jun 24, 2014

(Sorry for multi post).
After severals tests, it seems this is the audioRecv: false which results in Janus' segfault, when used with Chrome.
Interestingly, audioRecv: true doesn't cause Janus to segfault.

I hope it helps you narrow down the code which causes that fault.

@lminiero
Copy link
Member

Yep, I just replicated the issue locally. From a quick look it's definitely a mistake in handling the bundling im that case, so I'll start working on that right now. It's quite silly of me that I never tried that myself, though :-)

The audioRecv:false shouldn't be an issue per se, as we use sendonly streams in the Video MCU for publishers and it works fine there, but I'll have to check that as well.

@lminiero
Copy link
Member

Just pushed a commit that should fix the issue (at least it does for me in the Echo Test). Let me know if it works for you as well, otherwise feel free to reopen the issue.

@nschoe
Copy link
Author

nschoe commented Jun 24, 2014

It's okay now, no segfault anymore.
Nice, good work !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants