Sean Meighan

Software => Bugs in xLights/Nutcracker => Topic started by: gerry on June 15, 2015, 06:56:40 PM

Title: 4.1.5 / 4.1.6 - Crash when attempting to Undo a pasted effect
Post by: gerry on June 15, 2015, 06:56:40 PM
I copied a section of cells and pasted it.
As it did not quite paste as expected (see below) , I highligted ONE cell (see arrow in attached screen print) and right clicked to Undo the pasted effects when it crashed after the undo command .
Note: Toggle is on to display and work with nodes.

Also , (not sure if this is as per design) , but it appears that if you highlight a group of cells to copy , if the top left cell has no effect in it , then when you copy and paste , u don't get exactly the identical result - it appears to start with the first cell that it finds that has an effect in it and pastes from there onwards in the destination.

Therefore if u are copying something like a chequered layout (see my example which is a singing face), then u cant exactly copy and paste what is required ?
My workaround is to add an on effect in the first cell being copied, copy and paste and then delete the added on effect after the paste.

 
Title: Re: 4.1.5 - Crash when attempting to Undo a pasted effect
Post by: Gilrock on June 15, 2015, 07:01:57 PM
Were you pasting near one of the edges like the first or last column?  Cause I just tried what you said in the middle of my sequence and it worked as expected.
Title: Re: 4.1.5 - Crash when attempting to Undo a pasted effect
Post by: gerry on June 15, 2015, 07:28:21 PM
Hello Gil,

It may have been because this is an imported timing and I cant see to get the source and destination cells to be exactly the same size in the sequencer grid. So when I copy and paste - it may be going to the wrong cells.

If I use the zoom in / zoom out functions , only the screen section that I am on zooms in / out and the rest remains as is. So then when I shift , I have to zoom that (destination) section as well, before pasting and I cant get it to be the same size as the copied from - so it then does not align.

I guess that there is no 'paste by time' or 'align to grid' paste option ?

Oh well , I'll try something else.



Title: Re: 4.1.5 - Crash when attempting to Undo a pasted effect
Post by: logandc99 on June 15, 2015, 07:38:08 PM
I have had several crashes whilst attempting undo also, but other times it works. I try not to use it because of the crashes.
Also had two crashes last night, one while switching from sequencer tab to the models tab and one that seemed to occur while I was putting in an effect into the grid. Those seemed quite random. I am running the Mac version of 4.1.5.
Title: Re: 4.1.5 - Crash when attempting to Undo a pasted effect
Post by: Gilrock on June 15, 2015, 07:50:12 PM
The copy/paste really doesn't care about the cells except for determining the offset to the first effect.  What it does is captures the offset from the first effect selected to the start of the top left cell.  Then when you select a paste location it calculates the relative offset for the first effect.  All the other effects are pasted based on their original offset from that first effect.  So yes they are pasted by time so it doesn't matter which cells they fall in.  I've never seen a paste or undo crash but I tend to have a way of doing things that I know is correct and sometimes others find ways to do things that I wouldn't think to do so its a matter of me seeing how you are doing it.

I'm not sure what you mean about not being able to get it to be the same size as what is copied from.  It is pasted at exactly the same size.  Now I might believe you don't have your cells aligned but the paste doesn't care.  In fact you could turn off the grid and click somewhere and do the paste.  If you have the cells turned on you have to click in a single cell to define the target location. The first effect you select should position itself at exactly the same offset inside your target cell as it was positioned in the originally selected cell.

Now I did most of my testing with uniform 50ms cell boundaries so maybe there is something weird I haven't run into if you are copying and pasting into odd cell boundaries.  A screenshot or video would be worth a thousand words.
Title: Re: 4.1.5 - Crash when attempting to Undo a pasted effect
Post by: gerry on June 16, 2015, 02:50:47 AM
Hello Gil,

I will add a new timing with relatively fixed gaps eg beats or bars to the seq and then try again

Perhaps I am confused because of the variable timings that the papagayo import brought in and it just appears to be not correct visually.

Title: Re: 4.1.5 - Crash when attempting to Undo a pasted effect
Post by: gerry on June 16, 2015, 02:58:15 AM
hello Gil,

Attached are two more debug reports of crashes during the undo process today. I am not sure exactly what the previous operation was that I was attempting to Undo.
I will however pay more attention in future as the crashes on Undo are not uncommon.
In most cases , I have been working with toggle nodes on ie the nodes exposed. I have copied a group of cells, but then to undo simply right clicked a single cell and attempted to Undo.

I don't normally use the undo if I have just dropped an effect - in which case I highlight and delete. Similarly if it is only a single cell that has been copied - mostly when I am trying to undo a group.

Please let me know when you no longer need these debugs posted for this issue (ie if and when a change is identified and under developement) ...
Title: Re: 4.1.5 - Crash when attempting to Undo a pasted effect
Post by: gerry on June 16, 2015, 04:25:43 AM
I have had several crashes whilst attempting undo also, but other times it works. I try not to use it because of the crashes.
Also had two crashes last night, one while switching from sequencer tab to the models tab and one that seemed to occur while I was putting in an effect into the grid. Those seemed quite random. I am running the Mac version of 4.1.5.

hello logan,

If you do have the debug files (they are created in the show directory) , do attach them.
It could be that there is something in the way you have setup models etc that is the cause and would require coding against (or require redoing) , so the debug zip files will help Gil and Dan to analyse.
Title: Re: 4.1.5 - Crash when attempting to Undo a pasted effect
Post by: gerry on June 16, 2015, 04:48:56 AM
Hello Gil,

Managed to capture a sequence (please see attached word document and screen prints).
the second page , shows the effects I highlighted  , to copy and paste.
the third page , shows where I have placed the cursor (ie to the right of the pasted effects) and then I have right clicked (dialogue box is open).
the last page is the crash as soon as I have attempted the undo.

Debug zip file attached.

Title: Re: 4.1.5 - Crash when attempting to Undo a pasted effect
Post by: Gilrock on June 16, 2015, 07:20:13 AM
Unfortunately the crash report only tells me what function it died in.  It doesn't tell me anything about what was fed to the function.  To find something like this it usually take finding a way to consistently cause it to happen.  By the way the Undo doesn't use any of the current selection information so the cells you have selected aren't involved.  What I see is it crashed when you were trying to Undo an added effect.  So it was trying to go back and delete that effect and something went wrong.  I delete them by grabbing an effect id for that layer.  What I need to know is if any other steps were done after you added the effect other than just cell selections.  Not everything is tied to Undo yet so if you did a step like add or delete a layer on that model it can cause the Undo to crash because we aren't keeping track of those steps yet so it may try to delete the effect from the wrong layer.  So I do know of a few ways that it can be crashed but I can't fix them until I add that functionality into the Undo.  I'm trying to figure out if you are doing any of those steps that haven't been tracked in Undo yet.
Title: Re: 4.1.5 - Crash when attempting to Undo a pasted effect
Post by: gerry on June 16, 2015, 04:32:02 PM
Hello Gil,

I don't believe I did special anything in between , as I created the above scenario just for the bug report , but , having said that I will be extra vigilant. (about the only thing I can think off , was that I did a screen print and paste into word at each step) - would that have mattered ?

Would saving before doing the undo matter ? I tend to press save very often , especially if I suspect it may crash before I try something.

Note - in all cases , I have the toggle nodes on and am working at the node level - if that makes any difference
At the next release would adding the effect id to the backtrace be feasible and help or is it too late at that point to determine ?
Title: Re: 4.1.5 - Crash when attempting to Undo a pasted effect
Post by: gerry on June 16, 2015, 06:23:41 PM
Hello Gil,
using 4.1.16 on Windows .
Please see attached screen prints and debug reports.
Copy and Paste issue that I previously described
- Toggle on to work at node level.
- Highlighted a group of cells. Highlight starts one cell row above effects ie on blank row. Control C to copy
- Copied and pasted at the same row position two columns right.
- The effects shifted one row up - (see screen print) and therefore did not align with the previous row

Undo crash
-Right click and selected the Undo option
-xl  crashed

Did not do anything in between the paste and undo, not even screen prints
Recreated the same thing step by step with screen prints

Added : Note: The model has been defined twice ie Spinner 1 and Spinner 1 custom pointing to the same channels

Regards

Title: Re: 4.1.5 / 4.1.6 - Crash when attempting to Undo a pasted effect
Post by: Gilrock on June 16, 2015, 06:50:30 PM
I'll look into the crash but regarding the copy and paste alignment I can see there are some misconceptions on how it works right now in xLight versus how you think it works.  Remember that we work as a grid and non-grid based editor so when you drag a group of cells to select the effects it does not matter how many cells above the effect you started on in regards to where the paste will happen.  The start point is defined by the location of the first selected effect.  When you click a target location you are defining where you want that first effect to be located.  Remember you don't even need a grid to copy or paste.  I had to design it where you could copy with the grid off and paste with the grid on and vice versa.
Title: Re: 4.1.5 / 4.1.6 - Crash when attempting to Undo a pasted effect
Post by: Gilrock on June 16, 2015, 07:04:48 PM
Well the good news is I can reproduce the crash.  Its because it's at the Node level.  It looks like Undo is not currently working for anything at the Node level.  Apparently the layer index value I capture to know the layer number an effect came from isn't populated for Node layers so I need investigate why and fix it.
Title: Re: 4.1.5 / 4.1.6 - Crash when attempting to Undo a pasted effect
Post by: gerry on June 16, 2015, 07:17:30 PM
Well the good news is I can reproduce the crash.  Its because it's at the Node level.  It looks like Undo is not currently working for anything at the Node level.  Apparently the layer index value I capture to know the layer number an effect came from isn't populated for Node layers so I need investigate why and fix it.
Great !
Title: Re: 4.1.5 / 4.1.6 - Crash when attempting to Undo a pasted effect
Post by: gerry on June 16, 2015, 07:26:43 PM
I'll look into the crash but regarding the copy and paste alignment I can see there are some misconceptions on how it works right now in xLight versus how you think it works.  Remember that we work as a grid and non-grid based editor so when you drag a group of cells to select the effects it does not matter how many cells above the effect you started on in regards to where the paste will happen.  The start point is defined by the location of the first selected effect.  When you click a target location you are defining where you want that first effect to be located.  Remember you don't even need a grid to copy or paste.  I had to design it where you could copy with the grid off and paste with the grid on and vice versa.
Hi,
I thought that this was exactly what I did and showed in the screen prints
The start location (as highlighted) is one cell above the effect (ie blue /white on cell).
The target location  (as highlighted) is exactly the same place - two rows over. But the result is skewed.
It looks (to me ) that when the copy is done that the 'empty' cell that I highlighted is not used as a start , but the start is taken as the nearest cell that is populated (ie in this example one cell down).
*** It could be because this is being done at the node level ***
Same thing for the singing faces (custom effect) copy and paste that I posted about above yesterday (also at "node" level) . My work around is to populate the cell that I am going to copy from (ie ensure that it is not blank), copy and paste and then delete the unwanted cell.

In this example , if I highlight the area starting from the blue cell, I cant easily 'grab' and paste a bunch of cells - it seems to mostly grab and paste one cell only - hence why I start one cell above.

   
 
Title: Re: 4.1.5 / 4.1.6 - Crash when attempting to Undo a pasted effect
Post by: Gilrock on June 16, 2015, 09:54:37 PM
That's exactly what I was trying to describe.  The empty cells don't count.  When you click the destination you are selecting where the first selected effect is going to land...not where the first selected cell is going to land.  Selection using the grid is just a means of grabbing the effects...once you select the effects it does not matter which cells were highlighted to select them reason being that you can control select additional cells and you can turn off the grid and add more effects to the selection.  So the selection has nothing to do with the cells.
Title: Re: 4.1.5 / 4.1.6 - Crash when attempting to Undo a pasted effect
Post by: gerry on June 16, 2015, 10:21:12 PM
Hi Gil,

I am beginning to understand ....(sorry that it has taken this long :) ).

you are right - this is not the same as what we are currently used to in copying and pasting stuff from Excel , Word tables , LSP , where one selects the content of the grid that is highlighted.

So accordingly, I will adjust my thinking when pasting...

What should happen in the scenario where you have effects at a node level , but when collapsed nothing can be seen at the model level. If you copy at the model level (when collapsed) and paste (when collapsed), should it copy all the underlying node data ?

In my example, that you had today (with the blue and white squares), if you copied 4 secs at the model level and pasted it (at the model level) 10 secs away - should the entire underlying check effects be copied and pasted ?

I can send some screen shots if my question is not clear.


 
Title: Re: 4.1.5 / 4.1.6 - Crash when attempting to Undo a pasted effect
Post by: Gilrock on June 16, 2015, 11:06:54 PM
We only copy what is on visible rows.
Title: Re: 4.1.5 / 4.1.6 - Crash when attempting to Undo a pasted effect
Post by: Gilrock on June 17, 2015, 09:54:10 AM
I checked in some changes last night that appear to fix the crashing when doing an Undo on Strand or Node layers.  So you'll have to wait for the next release to try it out.
Title: Re: 4.1.5 / 4.1.6 - Crash when attempting to Undo a pasted effect
Post by: gerry on June 17, 2015, 04:52:12 PM
I checked in some changes last night that appear to fix the crashing when doing an Undo on Strand or Node layers.  So you'll have to wait for the next release to try it out.

Thank you Gil,

I had previously posted (about 3-4 versions ago)  a couple of other issues ** when working at the node level ** that also caused crashes before an Undo - eg highlight a range of cells (downwards) and use the on/ramp down key etc.

I'll have a look later today to see if they still exist in case they are related