[Gridflow-cvs] [svn] commit: r6616 - /trunk/src/grid.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Thu Feb 17 16:25:22 EST 2011


Author: matju
Date: Thu Feb 17 16:25:21 2011
New Revision: 6616

Log:
add debug info for really weird problem

Modified:
    trunk/src/grid.cxx

Modified: trunk/src/grid.cxx
==============================================================================
--- trunk/src/grid.cxx (original)
+++ trunk/src/grid.cxx Thu Feb 17 16:25:21 2011
@@ -201,6 +201,14 @@
 void GridOut::create_buf () {
 	int32 lcm_factor = 1;
 	for (uint32 i=0; i<inlets.size(); i++) lcm_factor = lcm(lcm_factor,inlets[i]->factor());
+	if (!lcm_factor) {
+		int32 lcm_factor = 1;
+		for (uint32 i=0; i<inlets.size(); i++) {
+			lcm_factor = lcm(lcm_factor,inlets[i]->factor());
+			post("inlets[%d]->factor():%d, lcm_factor:%d",i,inlets[i]->factor(),lcm_factor);
+		}
+		RAISE("big trouble !");
+	}
 	//size_t ntsz = number_type_table[nt].size;
 	// biggest packet size divisible by lcm_factor
 	int32 v = (MAX_PACKET_SIZE/lcm_factor)*lcm_factor;



More information about the Gridflow-cvs mailing list