GNOME Bugzilla – Bug 575907
Ekiga doesn't recognize webcam with non-UTF chars
Last modified: 2009-05-03 20:15:04 UTC
Please describe the problem: 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. Steps to reproduce: 1. Plug in camera 2. Run ekiga 3. Select camera Actual results: Many errors and warnings are generated, unable to use camera. Expected results: No errors/warnings, camera works. Does this happen every time? Yes. Other information: Reported from downstream ubuntu bug: https://bugs.launchpad.net/bugs/345192
I need help for this bug: - Does the kernel gives to ptlib the camera name in locale or in utf-8? - If the string is given in utf-8 then I do not see where the error should be - If the string is given in locale, who should transform it in utf-8? Is ptlib or ekiga? - Does ekiga work only with utf-8 strings, or does it work with locale strings and transform them each time they are shown in GUI? How can I reproduce this bug without such a camera?
I have a patch, it compiles well and it fixes the issue. Snark, could you please look at the patch in order to put the file utils.h where it belongs to? toolbox-common.c cannot be used, because it is compiled with gcc, not g++...
Created attachment 132925 [details] [review] Fix bug Oups, forgot the patch, here it is.
Looks good to me... perhaps put the needed functions in the code itself, and not separately available?
What does it mean "in the code itself"? Write the two functions three times, in each .cpp file?
Oh sorry ; it's used in several files. Rename toolbox-common.c into toolbox-common.cpp (with "git mv") and you should be able to put C++ code in there.
Ok, I pushed the code into git ; notice that it lacks the usual starting comments about the licence and the copyright ; please add them.
Done, thanks!
For info, starting from 2.6.31 (normally) the usb sub-system will return device names in utf-8.