|
SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Hauppauge HDPVR blaster / Linux
Under Linux, with the HDPVR blaster over i2c-0, I seem to be hitting a bug where whenever the blaster is closed I get a trap. Seems like it runs the first time then traps after this:
Stack: [0x00007f1412e11000,0x00007f1412f12000], sp=0x00007f1412f0fcb0, free space=1019kI traced it down to the bit of code in java/sage/SFIRTuner.java: public void playTuneString(String remoteName, String cmdString, boolean forceSynchronous)Seems like PVR150Tuner.so expects an argument to the closeDevice function. I suspect the first time it's called the contents of this non-existing argument is null, so the function simply returns, but later on the contents point to some garbage causing the trap. From native/so/PVR150Tuning/PVR150Tuner.c: void CloseDevice(int devHandle)The problem is, openDevice is called in SFIRTuner.java but the device handle is not saved. I'm a professional C coder, but Java's not my thing, yet. Not sure how this Java/native interface stuff works. |
#2
|
||||
|
||||
Interesting...but the arg isn't the problem....let me point you in the right direction and you'll see.
The closeDevice() function in Java will map to the Java_sage_SFIRTuner_closeDevice() function in C. That is defined in native/so/IVTVCapture/sage_SFIRTuner.c. In there you'll see that it dynamically looks up the symbol for the method; and then calls it by passing an argument which is cast to an integer....huh...interesting. There's a bunch of stuff in that file that looks like it's assuming a 32 bit environment...so if you're on 64-bit...then that sounds like a likely culprit. If that fixes it; please commit your change.
__________________
Jeffrey Kardatzke Founder of SageTV |
#3
|
|||
|
|||
Based on your stack trace, it looks like the issue may be somewhere in Java_sage_SFIRTuner_playCommand (in sage_SFIRTuner.c) or possibly in PlayCommand (in PVR150Tuner.c).
Code:
Stack: [0x00007f1412e11000,0x00007f1412f12000], sp=0x00007f1412f0fcb0, free space=1019k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [PVR150Tuner.so+0x1c53] PlayCommand+0x63 j sage.SFIRTuner.playCommand(Lsage/SFIRTuner$Remote;Ljava/lang/String;I)V+0 This is somewhat similar to an issue I fixed that was crashing the JVM whenever a tuner plugin was selected/opened. The issue ended up being inside Java_sage_SFIRTuner_init0 (in sage_SFIRTuner.c) where a pointer resulting from a dlopen() was cast to int. Take a look at the details here: http://github.com/google/sagetv/pull/75
__________________
Server: HP DL380 G6, VMware ESXi 5.0 with HW passthrough for USB and Firewire, 4 x HD-PVR, ZFS storage SageTV: Production: 7.1.9+Java 1.6.0_32 on XP, Test: 9.0.4.291+Java 1.8.0_72 on Linux 64-bit Clients: 2 x Sage HD200 Extender, 1 x Sage HD100 Extender Sources: 4 x Motorola DCH-3200 (firewire channel changing), HD Homerun Prime, OpenDCT 0.5.7 |
#4
|
|||
|
|||
Thanks Troll5501, the pointers Narflex gave were on the money and I saw your change in git. The stack dump I sent was actually from a run where I had commented out the closeDevice functio. I beleive I got the IR Blaster almost working now, but for some reason I'm still investigating, I'm not getting the correct codes coming out, but I'm close. I'll share my changes when it works.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bug in HDPVR Blaster Control | Diego Garcia | Hardware Support | 17 | 04-22-2010 12:30 PM |
IR blaster with HDPVR | bobsj2000 | Hardware Support | 6 | 11-20-2009 10:57 PM |
Defective Blaster or HDPVR? | ksed | Hardware Support | 2 | 06-23-2009 11:02 AM |
HDPVR ir blaster Wire | pat_smith1969 | Hardware Support | 0 | 07-14-2008 04:14 PM |
Linux SageTV and the Hauppauge IR Blaster??? | obrien.dan | SageTV Linux | 3 | 07-27-2006 02:01 PM |