Ekiga doesn't recognize webcam with non-UTF chars

Bug #345192 reported by Jon Arnold
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ekiga
Fix Released
Medium
ekiga (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: ekiga

Ekiga is not recognising my webcam (Microsoft NX-6000), and I believe it is caused by the "registered" symbol in the device name. I am attaching screenshots. In 'character.png' you can see the culprit character in the device name. When I run Ekiga in the terminal I get errors that refer to invalid UTF characters. The first comes up when I open the preferences dialog: I receive many instances of "(ekiga:6579): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
." Then I go to Video > Devices and select the camera as a video device. Each action generates more of the Pango warnings, but selecting the camera also generates a "(ekiga:6579): GConf-CRITICAL **: gconf_engine_set_string: assertion `g_utf8_validate (val, -1, NULL)' failed." Except for this terminal message I select the camera seemingly without failing, and I close the preferences dialog. However, when I try to display the camera on the call pane, the program tries to fall back to one another one of my video devices (a TV card), which fails and displays the moving logo.

Pressing "Detect Devices" in the video devices dialog makes the camera disappear from the device list as seen in 'devices.png.'

One individual reported having seemingly similar problems with the same camera model (http://ubuntuforums.org/showthread.php?t=1025676) on December 30, 2008, but has not responded yet to my recent attempt to confirm my specific errors.

So it seems like this specific character is the issue to me. So, in the meantime is there a way to rename the device so that it works in Ekiga until the bug is fixed? I also figure that this is probably an upstream issue. Please let me know if I can do anymore testing.

Revision history for this message
Jon Arnold (jonarnoldsemail) wrote :
Revision history for this message
Jon Arnold (jonarnoldsemail) wrote :
description: updated
description: updated
Revision history for this message
Michael Rooney (mrooney) wrote :

Thanks for your bug report Jon. What version of ekiga are you running? You can find this by running "apt-cache policy ekiga" in the terminal, or using the About dialog of ekiga. I don't personally know a work-around but I will send this upstream if you let me know your version number. Thanks!

Changed in ekiga (Ubuntu):
status: New → Incomplete
Revision history for this message
Jon Arnold (jonarnoldsemail) wrote :

jon@jaunty:~$ apt-cache policy ekiga
ekiga:
  Installed: 3.0.1-1ubuntu2
  Candidate: 3.0.1-1ubuntu2
  Version table:
 *** 3.0.1-1ubuntu2 0
        500 http://us.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

A good 'ol Google search yielded possibly renaming it with a udev rule, but I'm not exactly sure how to make udev single out the webcam. I'll fiddle with it.

Also, I forgot to mention that the camera worked under Windows on the most recent Windows beta archive.

Revision history for this message
Jon Arnold (jonarnoldsemail) wrote :

"Also, I forgot to mention that the camera worked under Windows on the most recent Windows beta archive."

Worked in Ekiga under Windows, that is.

Revision history for this message
Michael Rooney (mrooney) wrote :

I created a bug in Ekiga upstream and linked it!

Changed in ekiga (Ubuntu):
status: Incomplete → Triaged
importance: Undecided → Medium
Changed in ekiga:
status: Unknown → New
Revision history for this message
Eugen Dedu (eugen-dedu) wrote :

Does the kernel name the device in utf-8 or in other encoding (latin-1 for ex.)? If it encodes in other encoding, then it should be a kernel bug, isn't it?

Also, I have a patch for ekiga but I am not sure if it works. Can you check it? (do you use latin-1, aka iso-8859-1?)

Revision history for this message
Jon Arnold (jonarnoldsemail) wrote :

I'm having difficulty building after applying your patch because pbuilder is having trouble gathering the python libraries, and I can't use apt-get build-dep because it's complaining it can't find a certain package. I will recheck in a couple of days. If you can upload a deb with your patched version, I would be glad to test it.

I'm not sure how to find out what kind of encoding my system is using.

Revision history for this message
Eugen Dedu (eugen-dedu) wrote :

Please apply the new b.patch, it has additional information.

Revision history for this message
Eugen Dedu (eugen-dedu) wrote :

And send me what it prints in the terminal when you simply open preferences window...

Revision history for this message
Eugen Dedu (eugen-dedu) wrote :

Any news, Jon? I work in debian, not ubuntu...

Revision history for this message
Matt Mossholder (matt-mossholder) wrote :

I just tested it (same camera, same issues), and while the lovely (R) symbol is displayed correctly, it doesn't resolve the underlying issue. I suspect the issue is root in the fact that the NX-6000 pumps out a MJPEG stream, rather than MPEG or raw. Could this be the case?

  --Matt

Revision history for this message
Matt Mossholder (matt-mossholder) wrote :

Oh, another note, Ekiga doesn't seem to pick up the resolutions available on the webcam. I get the following choices:

176x144
352x288
704x576
320x240
640x480

Cheese (which works fine in Jaunty, might have worked in Intrepid, and definitely didn't before that) has these additional resolutions available:

160x120
800x600
1024x768
1280x1024
1600x1200

I am assuming this also points at some issue communicating with the camera. Probably worth opening a more accurate ticket asking for the camera to be supported.

Revision history for this message
Matt Mossholder (matt-mossholder) wrote :

Oops... silly me for not exiting the app before posting. The patched version core dumps on exit. The backtrace/memory map is attached.

Revision history for this message
Eugen Dedu (eugen-dedu) wrote :

Ekiga max resolution is limited by the video codec implementation, and for the moment is 640x480 (704x576).

As for MJPEG, I do not know, please open a new bug.

I will fix the issue with encoding.

Revision history for this message
Eugen Dedu (eugen-dedu) wrote :

Crash on exit is a known issue, it is being worked on.

Revision history for this message
Eugen Dedu (eugen-dedu) wrote :

The comment at 2009-03-19 says that the camera works under windows, so maybe there is another thing. Could you attach your -d 4 output please?

Revision history for this message
Matt Mossholder (matt-mossholder) wrote :

Here's the -d 4 output. (IPs stripped to protect the innocent :)

--Matt

Revision history for this message
Michael Rooney (mrooney) wrote :

Eugen, looks like Matt filed bug 360639 for the mjpeg issue; thought I'd link it here.

Revision history for this message
Eugen Dedu (eugen-dedu) wrote :

Could you try the following patch please and tell if it works and what it prints to terminal?

Revision history for this message
Matt Mossholder (matt-mossholder) wrote :

Here's the stdout from the toto patch. I've attached a 'ekiga -d4' patch s well.

=====
77 105 99 114 111 115 111 102 116 -62 -82 32 76 105 102 101 67 97 109 32 78 88 45 54 48 48 48
M i c r o s o f t � � L i f e C a m N X - 6 0 0 0
Return code: (nil)
77 105 99 114 111 115 111 102 116 -62 -82 32 76 105 102 101 67 97 109 32 78 88 45 54 48 48 48
M i c r o s o f t � � L i f e C a m N X - 6 0 0 0
Return code: (nil)
=====

--Matt

Revision history for this message
Eugen Dedu (eugen-dedu) wrote :

I saved the toto patch in latin-1 encoding on purpose, but I see that somehow it is in utf-8 in your file. Could you save your file in latin-1? I want that the 2nd time you have the original name (with (R) in latin-1). As you see, in both cases it is shown:
116 -62 -82 32 76
which means "...txy L...", so the registered char took 2 chars instead of one.

I don't know if I am clear here...

Revision history for this message
Matt Mossholder (matt-mossholder) wrote :

I totally understand. I made the mistake of cutting and pasting the patch from the browser, which converted it to UTF-8, instead of downloading it.

This seems to work, although the first three times I ran it, I would end up with a crash (dumped complaining of stack smashing), after that I have not been able to cause another crash. Might it be that the previous version left the camera in a whacky state that it took a few restarts to clear up?

I will reboot, and see how things go from a clean start.

Thanks!

Revision history for this message
Matt Mossholder (matt-mossholder) wrote :
Download full text (3.3 KiB)

After reboot, no more complaints about stack smashing.

Here's the output. Video in all cases, just some mjpeg related messages, that I would assume are normal...

M i c r o s o f t � L i f e C a m N X - 6 0 0 0
Return code: 0x207a360
libv4lconvert: Error decompressing JPEG: fill_nbits error: need 2 more bits
^CKilled
mattcm@mourneblade:~/src/ekiga-3.2.0$ debian/ekiga/usr/bin/ekiga
77 105 99 114 111 115 111 102 116 -62 -82 32 76 105 102 101 67 97 109 32 78 88 45 54 48 48 48
M i c r o s o f t � � L i f e C a m N X - 6 0 0 0
Return code: (nil)
77 105 99 114 111 115 111 102 116 -82 32 76 105 102 101 67 97 109 32 78 88 45 54 48 48 48
M i c r o s o f t � L i f e C a m N X - 6 0 0 0
Return code: 0x19a9a00
libv4l2: error converting / decoding frame data: v4l-convert: error parsing JPEG header: Not a JPG file ?

^CKilled
mattcm@mourneblade:~/src/ekiga-3.2.0$ debian/ekiga/usr/bin/ekiga
77 105 99 114 111 115 111 102 116 -62 -82 32 76 105 102 101 67 97 109 32 78 88 45 54 48 48 48
M i c r o s o f t � � L i f e C a m N X - 6 0 0 0
Return code: (nil)
77 105 99 114 111 115 111 102 116 -82 32 76 105 102 101 67 97 109 32 78 88 45 54 48 48 48
M i c r o s o f t � L i f e C a m N X - 6 0 0 0
Return code: 0x18e1ca0
libv4lconvert: Error decompressing JPEG: fill_nbits error: need 1 more bits
^CKilled
mattcm@mourneblade:~/src/ekiga-3.2.0$ debian/ekiga/usr/bin/ekiga
77 105 99 114 111 115 111 102 116 -62 -82 32 76 105 102 101 67 97 109 32 78 88 45 54 48 48 48
M i c r o s o f t � � L i f e C a m N X - 6 0 0 0
Return code: (nil)
77 105 99 114 111 115 111 102 116 -82 32 76 105 102 101 67 97 109 32 78 88 45 54 48 48 48
M i c r o s o f t � L i f e C a m N X - 6 0 0 0
Return code: 0x14d26a0
libv4l2: error converting / decoding frame data: v4l-convert: error parsing JPEG header: Not a JPG file ?

^CKilled
mattcm@mourneblade:~/src/ekiga-3.2.0$ debian/ekiga/usr/bin/ekiga
77 105 99 114 111 115 111 102 116 -62 -82 32 76 105 102 101 67 97 109 32 78 88 45 54 48 48 48
M i c r o s o f t � � L i f e C a m N X - 6 0 0 0
Return code: (nil)
77 105 99 114 111 115 111 102 116 -82 32 76 105 102 101 67 97 109 32 78 88 45 54 48 48 48
M i c r o s o f t � L i f e C a m N X - 6 0 0 0
Return code: 0x25fa380
libv4lconvert: Error decompressing JPEG: fill_nbits error: need 4 more bits
^CKilled
mattcm@mourneblade:~/src/ekiga-3.2.0$ debian/ekiga/usr/bin/ekiga
77 105 99 114 111 115 111 102 116 -62 -82 32 76 105 102 101 67 97 109 32 78 88 45 54 48 48 48
M i c r o s o f t � � L i f e C a m N X - 6 0 0 0
Return code: (nil)
77 105 99 114 111 115 111 102 116 -82 32 76 105 102 101 67 97 109 32 78 88 45 54 48 48 48
M i c r o s o f t � L i f e C a m N X - 6 0 0 0
Return code: 0x2b94400
libv4l2: error converting / decoding frame data: v4l-convert: error parsing JPEG header: Not a JPG file ?

CKilled
mattcm@mourneblade:~/src/ekiga-3.2.0$ debian/ekiga/usr/bin/ekiga
77 105 99 114 111 115 111 102 116 -62 -82 32 76 105 102 101 67 97 109 32 78 88 45 54 48 48 48
M i c r o s o f t � � L i f e C a m N X - 6 0 0 0
Return code: (nil)
77 105 99 114 111 115 111 102 116 -82 32 76 105 102 101 67 97 109 32 78 88 45 54 48 48 48
M i c r o s o f t � L i...

Read more...

Revision history for this message
Eugen Dedu (eugen-dedu) wrote :

"This seems to work, although the first three times I ran it, I would end up with a crash (dumped complaining of stack smashing), after that I have not been able to cause another crash. Might it be that the previous version left the camera in a whacky state that it took a few restarts to clear up?"

I do not know.

So, finally, with the patch, is the video shown or not? Does ekiga video work when calling <email address hidden> for example?

Revision history for this message
Matt Mossholder (matt-mossholder) wrote :

I get local video in all cases. I can't reach ekiga.net from here, so I will have to test between internal machines later today.

I also noticed that the camera now shows up twice in the video device settings... once with the (R), and once without. I'm still getting some pango complaints that may be related:

(ekiga:8592): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()

Revision history for this message
Eugen Dedu (eugen-dedu) wrote :

Thanks for the information. So I have to create a good patch, which does not show twice the camera in preferences. Once I finish, we will look at the other problem (converting warnings). Could you then close the other bug (360639)?

Revision history for this message
Matt Mossholder (matt-mossholder) wrote :

OK, I've now gotten to the point where doing an echo test works -sometimes-, to my local Asterisk server. I have no idea why it sometimes works, and sometimes doesn't. I've looked at the debugging info from Asterisk, and the video handshaking is occurring, h.261 is selected as a codec.

 Local video always seems to work now, which is a definite improvement.

Any thoughts?

Revision history for this message
Eugen Dedu (eugen-dedu) wrote :

The -d 4 output should be analysed. Maybe my patches are not so good either.

But for the moment, let's fix the utf issue properly. Afterwards, we will look into "sometimes video does not work" issue too.

Revision history for this message
Matt Mossholder (matt-mossholder) wrote :

Here's -d 4 output for an unsuccessful echo test. I did finally manage to get connected to Ekiga.net from here, once, and when I did, the echo test was successful. Now if I could only get it to register again....

Revision history for this message
Eugen Dedu (eugen-dedu) wrote :

This new patch is cleaner. Could you remove previous patches and use this one instead and tell:
- if video works
- if you still have the problem with the camera appearing twice?

Thanks,
Eugen

Revision history for this message
Matt Mossholder (matt-mossholder) wrote :

toto2 is a winner! A few notes:

1) The first few times I ran it, it crashed with stack smashing errors when I started an echo test. However, I haven't been able to replicate it since.
2) The first time I entered preferences, it gave two pango/utf8 errors, and hung. I killed it, and restarted, and the error has not reappeared since.

Maybe this is from the old setting still being saved in gconf? Either way, I have been running it for about a half hour now (starting, stopping, echo tests, etc.) and it seems to be working very consistently.

Revision history for this message
Eugen Dedu (eugen-dedu) wrote :

The pango errors might be indeed because the old names were stored in your gconf settings. I will check in the fix.

As for the crash, this should be another issue in my opinion. Could you check if it reproducible and send the gdb backtrace?

Revision history for this message
Matt Mossholder (matt-mossholder) wrote :

So far, I have been unable to reproduce the crashes. I do have another data point, however. It looks like the UTF-8 issue is present in the audio device selection as well. The NX-6000 has a Mic, and it is suffering from the same issues as the video did prior to the patch.

If I get a chance, I will try recompiling with the "b" patch again, and see if maybe the issue is specific to that patch.

Revision history for this message
Eugen Dedu (eugen-dedu) wrote :

The patch I sent you was only for video. I thought about audio too, and thanks to having confirmed that it needs to be done for audio too.

I will check in a complete fix very soon.

Revision history for this message
Eugen Dedu (eugen-dedu) wrote :

A fix has been checked in, see http://bugzilla.gnome.org/show_bug.cgi?id=575907 for the patch. Could you check for audio too?

Now, the only thing it remains is the sometimes unsuccessful registration, is that right?

Revision history for this message
Eugen Dedu (eugen-dedu) wrote :
Revision history for this message
Matt Mossholder (matt-mossholder) wrote :

All seems good. And by that, I mean all. With a clean rebuild, everything is working fine. I believe my problems with Ekiga were related to a bad NAT setting, so that can be discounted. I haven't experienced any crashes, and echo tests, both locally and vs. EKiga.net ware working as expected. No complaints from pango either, for audio or video.

The only thing I can think of that may still be an issue is old gconf settings that have the old camera name in them. I've done what I can to replicate it, but so far, I can't cause the crash again. Perhaps it is leftover settings from Ekiga 2 that were the issue. At one point I cleared out all of the Ekiga keys, and that may be the difference.

Revision history for this message
Eugen Dedu (eugen-dedu) wrote :

For info, starting from 2.6.31 (normally) the usb sub-system will return device names in utf-8, so this patch (integrated upstream) will not be needed anymore.

Changed in ekiga:
status: New → Fix Released
Revision history for this message
Yannick Defais (sevmek) wrote :

Hi,

Ekiga 3.2.6 was released yesterday. It fix numerous issues. Could you please give it a try to check if it solves your issue?

https://launchpad.net/~sevmek/+archive/ekiga-released
(instructions and packages)

Best regards,
Yannick

Revision history for this message
Matt Mossholder (matt-mossholder) wrote :

The version that is in Karmic (3.2.5-1ubuntu1) works correctly!

Revision history for this message
Yannick Defais (sevmek) wrote :

Tagged as fixed in Ubuntu. Feel free to reopen.

Best regards,
Yannick

Changed in ekiga (Ubuntu):
status: Triaged → Fix Released
Changed in ekiga:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.