Setting Binsize to 0 on Map (Value Interval Advanced) freezes vvvv [beta27.2]

Nothing in Renderer (TTY) and no exceptions pop up.
The node seems to enter an endless loop.

… no text …

sry, known one. had no time to fix yet.
will do for upcoming

Hello again,
apart from the bug I also noticed that the output slice count does correspond to the mappings count (defined by the binsize) rather than the input slice count. This makes the node behave differently than the native Map (Value Interval). I made some changes and it seems to work now (at least for me).

Before:

public void Evaluate(int SpreadMax)
        {     	
        	if (FInput.PinIsChanged || FIBp.PinIsChanged || FOBp.PinIsChanged || FBinSize.PinIsChanged || FMapping.PinIsChanged)
        	{
        		bool mappingChanged = false;
        		if (FIBp.PinIsChanged || FOBp.PinIsChanged || FBinSize.PinIsChanged)
        		{
        			mappings.Clear();
        			mappingChanged = true;
        			
        			int incr = 0;
        			int maxPoints = Math.Max(FIBp.SliceCount, FOBp.SliceCount);
        			
        			double firstBin;
        			FBinSize.GetValue(0, out firstBin);
        			int total = 0;
        			if (FBinSize.SliceCount>=1 || firstBin!= 0)
        			{
        				int binIncr=0;
        				bool end = false;
        				while (!end)
        				{
        					double tmpBin;
        					FBinSize.GetValue(binIncr, out tmpBin);
        					int curBin = (int)Math.Round(tmpBin);
        					if (curBin<0)
        						curBin = maxPoints/Math.Abs(curBin);
        					
        					List<double> curIBp = new List<double>();
        					List<double> curOBp = new List<double>();
        					double curIB, curOB;
        					for (int i=0; i<curBin; i++)
        					{
        						FIBp.GetValue(incr, out curIB);
        						curIBp.Add(curIB);
        						FOBp.GetValue(incr, out curOB);
        						curOBp.Add(curOB);
        						incr++;
        					}
        					total+=curBin;
        					binIncr++;
        					mappings.Add(new MapInterval(curIBp, curOBp));
        				
        					
        					if (binIncr%FBinSize.SliceCount==0 && total>=maxPoints)
        						end=true;
        				}
        			}
        		}
        		
        		if (FInput.PinIsChanged || FMapping.PinIsChanged || mappingChanged)
        		{
        			FOutput.SliceCount=mappings.Count;
        			double curIn;
        			string curEnum;
        			for (int i=0; i<mappings.Count; i++)
        			{
        				FMapping.GetString(0, out curEnum);
        				MapInterval.TMapType en = (MapInterval.TMapType)Enum.Parse(typeof(MapInterval.TMapType), curEnum);
        				FInput.GetValue(i, out curIn);
        				FOutput.SetValue(i, mappings[i%mappings.Count](i%mappings.Count).DoMap(curIn, en));
        			}
        		}
        	}
        }

After:

public void Evaluate(int SpreadMax)
        {

            if (FIBp.PinIsChanged || FOBp.PinIsChanged || FBinSize.PinIsChanged)
            {
                FMappingChanged = true;
                mappings.Clear();
                
                int incr = 0;
                int maxPoints = Math.Max(FIBp.SliceCount, FOBp.SliceCount);

                double firstBin;
                FBinSize.GetValue(0, out firstBin);
                int total = 0;
                if (FBinSize.SliceCount >= 1 && firstBin != 0)
                {
                    int binIncr = 0;
                    bool end = false;
                    while (!end)
                    {
                        double tmpBin;
                        FBinSize.GetValue(binIncr, out tmpBin);
                        int curBin = (int)Math.Round(tmpBin);
                        if (curBin < 0)
                            curBin = maxPoints / Math.Abs(curBin);

                        List<double> curIBp = new List<double>();
                        List<double> curOBp = new List<double>();
                        double curIB, curOB;
                        for (int i = 0; i < curBin; i++)
                        {
                            FIBp.GetValue(incr, out curIB);
                            curIBp.Add(curIB);
                            FOBp.GetValue(incr, out curOB);
                            curOBp.Add(curOB);
                            incr++;
                        }
                        total += curBin;
                        binIncr++;
                        mappings.Add(new MapInterval(curIBp, curOBp));


                        if (binIncr % FBinSize.SliceCount == 0 && total >= maxPoints)
                            end = true;
                    }
                }
            }

            if ((FInput.PinIsChanged || FMapping.PinIsChanged || FMappingChanged) && mappings.Count > 0)
            {
                FMappingChanged = false;
                int outcount = Math.Max(FInput.SliceCount, mappings.Count);
                FOutput.SliceCount = outcount;
                double curIn;
                string curEnum;
                for (int i = 0; i < outcount; i++)
                {
                    FMapping.GetString(0, out curEnum);
                    MapInterval.TMapType en = (MapInterval.TMapType)Enum.Parse(typeof(MapInterval.TMapType), curEnum);
                    FInput.GetValue(i, out curIn);
                    FOutput.SetValue(i, mappings[i % mappings.Count](i % mappings.Count).DoMap(curIn, en));
                }
            }
            else if (mappings.Count == 0)
            {
                FOutput.SliceCount = 0;   
            }

        }

… no text …

did a major rewrite of the plugin.

crash with 0 as well as wrong binsizing fixxxed. and probably faster too