Author Topic: Crash upon hitting PLAY  (Read 36108 times)

Offline jamills6377

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: Crash upon hitting PLAY
« Reply #105 on: October 09, 2018, 02:27:49 PM »
No problem - I"ll run it and see what happens!
********************
*      Jeffrey A. Mills      *
********************

Offline jamills6377

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: Crash upon hitting PLAY
« Reply #106 on: October 09, 2018, 02:50:32 PM »
Crash appeared to be in the same place watching the matrix - but it was a different bit of code - same variable involved...

CALL STACK:
xlights.exe!LOROptimizedOutput::SetManyChannels(long channel, unsigned char * data, longs size) Line 177

175 wxabyte lsb = lorBankData[bank].bits & 0xF;
176 wxabyte msb = lorBankData[bank].bits >> 8;
177 d[idx++]=0;

in 175 and 176 - bank=0, i=2
in 177 idx++ is 1046
hover on 175 on lorBankData[bank] shows {value=0 '\0\ bits=22308}

********************
*      Jeffrey A. Mills      *
********************

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Crash upon hitting PLAY
« Reply #107 on: October 09, 2018, 03:16:37 PM »
Ok that looks like the problem is the data buffer size.  Can you change the number inside line 103 from 1024 to something larger like 2048 and try again?  That value where is blew up had the index set to 1047 so it blew past the 1024 size.  I thought I had calculated that a packet couldn't go larger than 1024 but I obviously messed up.

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Crash upon hitting PLAY
« Reply #108 on: October 09, 2018, 03:32:23 PM »
One other thing to change.  I believe I designed it only expecting 512 channels per unit id but a Pixie can have up to 300 nodes?  That's could mean 900 channels per unit ID.  With 16 channels per bank that means I need at least 56 banks but I only allocated 32.

For LOROptimisedOutput.h and .cpp:
Change line 22 in the header from 32 to 64.
And lines 32 and 109 in the cpp file from 32 to 64.

Offline jamills6377

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: Crash upon hitting PLAY
« Reply #109 on: October 09, 2018, 03:56:06 PM »
Ran it before seeing your second post --- here's what happened...
the entire sequence played completely without crashing - it was VERY jumpy. the singing face never showed up at all, pictures showed up when they were supposed to, the marquee border looked like blinking lights - not a marquee, many of the effects (like shapes>circles acting as bubbles in the scientist's lab only appeared sporadically.

BUT at least it didn't crash!

So here's a question - and maybe the processing of this would be so time consuming it would negate any benefit it would produce...but is it possible to know from frame to frame only those pixels which have changed from the previous frame and only output those specific pixels?

I'll go make those other changes and run it again.
********************
*      Jeffrey A. Mills      *
********************

Offline jamills6377

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: Crash upon hitting PLAY
« Reply #110 on: October 09, 2018, 03:59:50 PM »
OK - made those few changes - it ran again to completion - no  crash - BUT still pretty much unusable output - but moving in the right direction!

I also noticed that the Face doesn't show up on the house preview screen either --- so it's not displaying --- yet near the end of the song I do use one of the face images in a Picture effect and it shows up - so the pictures are there.

Another thing I noted in watching it - as things appear on the matrix you can visibly see the matrix redraw from left to right - I mean the image or effect actually is visible appearing column by column in a sweep across the matrix.

********************
*      Jeffrey A. Mills      *
********************

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Crash upon hitting PLAY
« Reply #111 on: October 09, 2018, 04:07:23 PM »
It should already be skipping channels that don't change but it does it in banks of 16 so if any channel in each block of 16 changes it sends the command for all 16.  See line 135 for where it looks at what was sent out the previous frame to detect changes.

Offline jamills6377

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: Crash upon hitting PLAY
« Reply #112 on: October 09, 2018, 04:11:58 PM »
Can you define "bank of 16"? Is that 16 pixels, 16 channels as defined in xLights channel counts (ie: 300 per string of 100 pixels), or 16 what???

Sounds like you mean bank of 16 channels (as in 300 per 100 pixel string) from the way you say it so that would imply that in a string of 100 pixels there would be 18.75 banks of channels--- is that right?

And they go lowest to highest channel so that accounts or the slow paint of the images/effects from left to right across the matrix.
********************
*      Jeffrey A. Mills      *
********************

Offline jamills6377

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: Crash upon hitting PLAY
« Reply #113 on: October 09, 2018, 04:16:41 PM »
I know this RS8485 protocol is not speedy by any stretch o the imagination - but even before adding the Enhanced Protocol this year I was able to send this kind of data out across the LOR networks last year and previous years - so somehow it is being done. I just wish we could figure out what the trick to enhanced protocol is so that we could get the output up to a higher speed.

I mean really - seeing what you guys have done with xLights compared to what I see in LOR S5 - I know you have the programming talent --- there is just some little tweak that needs to be done to get the data moving faster.
********************
*      Jeffrey A. Mills      *
********************

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Crash upon hitting PLAY
« Reply #114 on: October 09, 2018, 04:29:09 PM »
Well it is probably running slow because you are in the debugger so it could improve once we put the increased values into a release build.  By bank of 16 I mean channels not pixels.  All of LOR's stuff originally used to be 16 channel AC controllers so their protocol is heavily geared towards setting banks of 16 channels.  They use 2 bytes as a 16 channel bitfield to indicate which channels in that bank are going to receive the value of that command.

Offline jamills6377

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: Crash upon hitting PLAY
« Reply #115 on: October 09, 2018, 04:45:26 PM »
Good point about it bogging down in the debugger.
I understand about the 16 channel banks now, too.

So any thoughts why the singing face isn't showing up at all???
********************
*      Jeffrey A. Mills      *
********************

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Crash upon hitting PLAY
« Reply #116 on: October 09, 2018, 05:39:22 PM »
Well the fact that I'm dropping frames when the output buffer is not empty combined with only sending changes might not go together.  If you comment out lines 135 and 138 it would force it to send all channels every frame.  Then at least when it drops frames it would at least set all channels for the frames it does send.

So you are saying you ran the same amount of data last year using LOR even without their Enhanced Protocol? 

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Crash upon hitting PLAY
« Reply #117 on: October 09, 2018, 06:24:41 PM »
Well actually looking at the code it won't update the last sent buffer if it skips the frame so it should still work fine looking to only send differences.

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Crash upon hitting PLAY
« Reply #118 on: October 09, 2018, 06:25:32 PM »
So look at the log and see how big are the packets averaging or what max value are they hitting.

Offline jamills6377

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: Crash upon hitting PLAY
« Reply #119 on: October 09, 2018, 07:33:43 PM »
I'll do more testing in the morning - but, to answer your question - yes - I had a very similarly sized display using CCRs (50-pixel ribbons) instead of the CCBs (pixel bulbs). I did run it on 7 LOR networks to spread the load - but here in this test I'm only running the matrix connected - and it's on 2 networks so the load is spread across two. I, of course, have no idea what the data rate was in previous years...but if you want to see some of my show it's on Youtube in my account there as "706 Lights" - you can see it had a pretty active matrix and lots of lighting effects going on.

Those videos did not have anything running in the enhanced protocol as I only needed that when I upped to 100-pixel strings.
********************
*      Jeffrey A. Mills      *
********************