Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
XBMC Driver
(07-02-2017, 11:04 AM)Dean Roddey Wrote: OK. There's not that many things it could be. I'll add checks for any Card4 fields related to metadata and make sure that they handle getting bogus info.

Dean, I found the line(s) that are causing this error. 

//If (strTemp2.ToCard4() >= 5)
                        //    c4Temp++;
                        //EndIf;

This is the statement and it's at line 1286

For now, I have just commented it out and that has fixed it, but of course, I don't know what the side affects might be. 

So far no crashes. 

Not sure if you want to have a look or if many people still use XBMC. I do.
Reply
its still my choice for a media player.

The errors are annoying so i have just ignored them - I dont see them they dont exist.
Mykel Koblenz
Illawarra Smart Home
Reply
(05-28-2018, 01:25 AM)znelbok Wrote: its still my choice for a media player.

The errors are annoying so i have just ignored them - I dont see them they dont exist.

Yeah, same here especially with Madvr upscaling for my 4k projector. May be annoying to look, but never do. Still works fine.

(05-28-2018, 01:25 AM)znelbok Wrote: its still my choice for a media player.

The errors are annoying so i have just ignored them - I dont see them they dont exist.

Yeah, same here especially with Madvr upscaling for my 4k projector. May be annoying to look, but never do. Still works fine.
Reply
(05-28-2018, 02:57 AM)Bugman Wrote:
(05-28-2018, 01:25 AM)znelbok Wrote: its still my choice for a media player.

The errors are annoying so i have just ignored them - I dont see them they dont exist.

Yeah, same here especially with Madvr upscaling for my 4k projector. May be annoying to look, but never do. Still works fine.

(05-28-2018, 01:25 AM)znelbok Wrote: its still my choice for a media player.

The errors are annoying so i have just ignored them - I dont see them they dont exist.

Yeah, same here especially with Madvr upscaling for my 4k projector. May be annoying to look, but never do. Still works fine.

(05-18-2017, 04:04 PM)Dean Roddey Wrote: Are you noticing it while editing anything else? If you edit a global action or event and save it, do this happen? I'm assuming here you mean when you save it.

Or do you mean just when you make some kind of change to the interface? If so, is when you do something via the attribute editor, or when you directly drag a widget or something like? Or is it just any sort of change?

When this is going on, are you seeing high CPU usage for the admin interface in the task list? If so, does it just last while you are doing the changes, or does it just start as soon as you bring up an interface?

Definitely this is the kind of thing to report. You can be pretty sure if it was happening to others someone would have complained about it, so best to do make it known.
Good news,  boys.

I'm pretty sure I fixed it.  I went back, not being satified with just commenting out the line, and addresssed the code issue. Perhaps Dean can double check my work, but I think I have it. 

Dean here is the code:

 //---- Get Percentage --------------------------------------------------------------
                If (m_JSON.GetPathValue("/result/percentage", strTemp))
                    If (strTemp.Split(strTemp2, '.', False))
                        c4Temp := strTemp.ToCard4();
                        strTemp2.CapAt(1);
                        If (strTemp2.ToCard4() >= 5)
                            c4Temp++;
                        EndIf;
                    Else
                        c4Temp := strTemp.ToCard4();
                    EndIf;

                    m_Logger.Log(LogLev.Low, 
                        "EvalJSON: Found %(1)=%(2)",2, "percentage", c4Temp, "");
                    WriteCardFldByName(CQCPLMgr.kMediaFld_PBPercent, c4Temp);
                Else
                    m_Logger.Log(LogLev.Low, 
                        "EvalJSON: %(1) Not Found",1, "percentage","","");
                EndIf;

In this line:

strTemp2.CapAt(1);

CatAt was previously set to index 0

strTemp2.CapAt(0);

That was causing the floating point component that Weunch was trying to separate out and then round up or down to becomes a null string. The next line would type cast it to a card4 and generate an exception. 

I simply moved the index to 1 and that seems to have fixed it. 

If you agree, lets get this fix published.
Reply
Maybe he really actually wanted it to be a cut of one character or something? Maybe he thought that the split on the period left the period on the 2nd half? If so, that's not the case. I'm guessing maybe you can remove that cap command altogether. Most likely what you are doing now is only getting the first digit of the percentage so that it would never be higher than 9.
Dean Roddey
Software Geek Extraordinaire
Reply
(05-28-2018, 10:58 AM)Dean Roddey Wrote: Maybe he really actually wanted it to be a cut of one character or something? Maybe he thought that the split on the period left the period on the 2nd half? If so, that's not the case. I'm guessing maybe you can remove that cap command altogether. Most likely what you are doing now is only getting the first digit of the percentage so that it would never be higher than 9.

Gotcha. I agree there won't be a value higher than 9, but perhaps there's a bigger picture I'm not seeing. 

In any case, I think it would make a few people happy to fix it. It's such an annoying error since just logs continuously, flooding the log viewer.
Reply
Oh, looking at it, maybe it's always two digits but all he cares about is if it is 50 or larger to bump the value, i.e. round up. If it's always two digits, then the first digit will be 0 to 9 representing 0 to 90 percent in jumps of 10. The first digit would represent the 10s.

That assumes it's 0 to 99, and not 0 to 100, in which case if it's 100, it would treat it as 10. But if it's always 2 digits but never 100, then that would be a reasonable means to round up.
Dean Roddey
Software Geek Extraordinaire
Reply
If your digging around in the driver, can you find the logging and change it so it does not dump entries into the log file when logging is off. It should never really have been written this way - it should only log when logging is turned on.
Mykel Koblenz
Illawarra Smart Home
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Sony Bravia TV Driver znelbok 12 776 06-11-2018, 09:19 AM
Last Post: Dean Roddey
  OpenHAB Driver whozeawhat 5 265 05-28-2018, 08:50 AM
Last Post: whozeawhat
  Pushbullet Driver whozeawhat 1 192 05-13-2018, 07:27 AM
Last Post: whozeawhat
  Monoprice Blackbird 4x4 HDMI Switcher - Driver request batwater 14 6,931 02-10-2018, 02:29 PM
Last Post: batwater
  LIFX Driver bobskie708 9 900 01-30-2018, 12:34 PM
Last Post: jkmonroe
  SNMP Driver wuench 115 262,537 01-01-2018, 05:18 PM
Last Post: Dean Roddey
  CBUS CGate Driver martinmcc 46 16,602 12-18-2017, 01:19 AM
Last Post: znelbok
  Samsung SmartTV driver? sic0048 3 648 12-17-2017, 11:51 AM
Last Post: Dean Roddey
  Vantage Controls Driver for Infusion System KenC 3 1,500 10-23-2017, 12:10 PM
Last Post: Dean Roddey
  Another SMS Driver - SMS Global, one for everyone else znelbok 21 7,417 10-21-2017, 07:19 PM
Last Post: znelbok

Forum Jump:


Users browsing this thread: 1 Guest(s)