Author Topic: Rii mini i8 wifi multimedia keyboard template: getting multimedia keys working  (Read 1751 times)

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
can you post the output of the dmesg?

The system drops core dump files in /usr/pluto/coredump, which are time stamped. These can be used to diagnose where the problem might be.

To use them, notice they're named for the program that failed, core_blablabla, etc. in our case core_UpdateMedia_XXXXXXXX where XXXXX is a time stamp.

you can run gdb against them, and it will tell you where the program stopped, and you can get a backtrace, example (from the core, root shell):

Code: [Select]
dcerouter_1031482:/home# cd /usr/pluto/coredump
dcerouter_1031482:/usr/pluto/coredump# ls
core_Photo_Screen_Sa_1373691026_6  core_Slim_Server_Str_1373565907_11  core_UpdateMedia_1373319234_11
dcerouter_1031482:/usr/pluto/coredump# cd /usr/pluto/bin/
dcerouter_1031482:/usr/pluto/bin# gdb /usr/pluto/bin/UpdateMedia /usr/pluto/coredump/core_UpdateMedia_1373319234_11
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/pluto/bin/UpdateMedia...done.
[New Thread 10989]
[New Thread 11030]

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /usr/lib/libmysqlclient_r.so.16...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libmysqlclient_r.so.16
Reading symbols from /usr/pluto/lib/libpluto_media.so...(no debugging symbols found)...done.
Loaded symbols for /usr/pluto/lib/libpluto_media.so
Reading symbols from /usr/pluto/lib/libpluto_main.so...(no debugging symbols found)...done.
Loaded symbols for /usr/pluto/lib/libpluto_main.so
Reading symbols from /usr/pluto/lib/libDCECommon.so...done.
Loaded symbols for /usr/pluto/lib/libDCECommon.so
Reading symbols from /usr/pluto/lib/libSerializeClass.so...(no debugging symbols found)...done.
Loaded symbols for /usr/pluto/lib/libSerializeClass.so
Reading symbols from /usr/pluto/lib/libPlutoUtils.so...done.
Loaded symbols for /usr/pluto/lib/libPlutoUtils.so
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...Reading symbols from /usr/lib/debug/lib/tls/i686/cmov/libpthread-2.11.1.so...done.
done.
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /usr/lib/libid3-3.8.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libid3-3.8.so.3
Reading symbols from /usr/lib/libtag.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libtag.so.1
Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/tls/i686/cmov/libm.so.6...Reading symbols from /usr/lib/debug/lib/tls/i686/cmov/libm-2.11.1.so...done.
done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/tls/i686/cmov/libc.so.6...Reading symbols from /usr/lib/debug/lib/tls/i686/cmov/libc-2.11.1.so...done.
done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/tls/i686/cmov/libcrypt.so.1...Reading symbols from /usr/lib/debug/lib/tls/i686/cmov/libcrypt-2.11.1.so...done.
done.
Loaded symbols for /lib/tls/i686/cmov/libcrypt.so.1
Reading symbols from /lib/tls/i686/cmov/libnsl.so.1...Reading symbols from /usr/lib/debug/lib/tls/i686/cmov/libnsl-2.11.1.so...done.
done.
Loaded symbols for /lib/tls/i686/cmov/libnsl.so.1
Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/ld-linux.so.2...Reading symbols from /usr/lib/debug/lib/ld-2.11.1.so...done.
done.
Loaded symbols for /lib/ld-linux.so.2
Core was generated by `/usr/pluto/bin/UpdateMedia -d /home/public/data/videos/Main Disk [35]/TV Shows'.
Program terminated with signal 11, Segmentation fault.
#0  __strlen_sse2 () at ../sysdeps/i386/i686/multiarch/strlen.S:99
99 ../sysdeps/i386/i686/multiarch/strlen.S: No such file or directory.
in ../sysdeps/i386/i686/multiarch/strlen.S
(gdb) bt
#0  __strlen_sse2 () at ../sysdeps/i386/i686/multiarch/strlen.S:99
#1  0x00748332 in std::string::operator=(char const*) () from /usr/lib/libstdc++.so.6
#2  0x0805b02f in main (argc=6, argv=0xbf8b4b74) at Main.cpp:395
(gdb) quit


Can you do that against the process that failed, and give me the output?

-Thom

jamo

  • Guru
  • ****
  • Posts: 459
    • View Profile
    • LMCE user Page
Sweet, thanks. Will try to hit this tonight.

jamo

  • Guru
  • ****
  • Posts: 459
    • View Profile
    • LMCE user Page
dmesg output:

http://pastebin.com/SUq81gMt

And here's the gdb output
Code: [Select]
Core was generated by `/usr/pluto/bin/UpdateEntArea -h localhost -P 3306 -u root -D pluto_main'.
Program terminated with signal 11, Segmentation fault.
#0  Row_DeviceTemplate::FK_DeviceCategory_get (this=0x0) at Table_DeviceTemplate.cpp:248
248 Table_DeviceTemplate.cpp: No such file or directory.
in Table_DeviceTemplate.cpp

So it does seem to be to do with mucking about with the device templates....

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
in mySQL, do a SELECT * from DeviceTemplate WHERE FK_DeviceCategory=NULL;

-Thom

p.s. did you add a new device category?

« Last Edit: July 17, 2013, 10:52:08 pm by tschak909 »

jamo

  • Guru
  • ****
  • Posts: 459
    • View Profile
    • LMCE user Page
Thanks, checked for nulls on FK_DeviceCategory, then checked for non existant categories in the FK of DeviceTemplate... nothing.

But I *did* find my old Device with an FK_DeviceTemplate that didn't exist -> set to the old devicetemplate of the Rii before I sqlcvsed myself. Updated to the new template ID and...
voila...

we're back in business.

So, I'm guessing here, the issue was that I already had a Device in the Device table, which pointed to a non-existant template. Presumably, the code was trying to get the DeviceCategory of the non-existant template so it looked like a DeviceCategory issue. Red-herring.

All good, though, screen is back and I can pick up from there.

Thanks a stack, Thom...  useful info on the gdb and coredump stuff that I can use in future. I even found the offending line in TableDeviceTemplate.cpp:
Code: [Select]
long int Row_DeviceTemplate::FK_DeviceCategory_get(){PLUTO_SAFETY_LOCK_ERRORSONLY(sl,table->database->m_DBMutex);

return m_FK_DeviceCategory;}

but I haven't a cooking clue what it does... that's a battle for another day perhaps.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
Good, I'm glad that got sorted. Looks like we need to add additional checking in UpdateEntArea to actually check if we have a proper pointer to a database row, before trying to use its accessor.

Basically, the chunk of code you're looking at, is what we call an "accessor" in object oriented programming speak. It returns whatever value you're asking about, in this case, it returns the FK_DeviceCategory value that is present in the DeviceTemplate row that you're asking about. All the PLUTO_SAFETY_LOCK() macro is basically to ensure that only one interested party can access this method at a time (to avoid race conditions).

The issue you experienced is always a potential issue when trying to send stuff to sqlCVS and you didn't update your database BEFORE starting your template work.

You can remove the core dump files in /usr/pluto/coredump, as they are probably taking up a nice chunk of space.

-Thom

jamo

  • Guru
  • ****
  • Posts: 459
    • View Profile
    • LMCE user Page
Ok... did some digging through the code and I have a vague idea what you're talking about. I must say there were no obvious ways of making it idiot-proof to me so I think we should, at this point, just say make sure every device in your database has a valid device template associated to it and it's only likely to become a problem if you've either been mucking about in the db yourself *blush* or sqlcvsing without first updating and coming off a common solid base.

Ta, I'll remove the coredump files and soldier on.

Thom, can you carry on and check out my last sqlcvs submit? I added the "Rii" manufacturer but, as mentioned earlier, it may need a PK correction due to my having other devices in my system.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
ok, I'll do it today.

-Thom