Hi Michael and Peter,

Apparently the problem is (actually was) something to do with blowing
the limit of a stack. The developer I spoke to couldn't remember when
the fix had gone in - it might have been in 2006GB, but if not then it
should be in an FME 2007 beta.

If you try the 2007 beta version and the problem still exists then
definitely send the info to [EMAIL PROTECTED] and we'll look into it.

Regards,

Mark

Mark Ireland, Senior Product Specialist
Safe Software Inc. Surrey, BC, CANADA
[EMAIL PROTECTED] http://www.safe.com
Solutions for Spatial Data Translation, Distribution and Access


--- In [email protected], "peter laulund" <[EMAIL PROTECTED]> wrote:
>
> Hi
> 
> ..the more you use, the more you get ..
> 
> I did some testing off looping ( BranchingFactory ) some time ago,
and ran 
> into the problem that there is a limited number off times a feature
can pass 
> a BranchingFactory, i think the number was around 3281 ??
> 
> NB Looping in mapping files is just so cool, I have attatched a few
exampels 
> on how it workes, You can also experiment with thees loops to see if
there 
> is a max number
> 
> 
> Peter
> 
> 
> >From: "mhabarta" <[EMAIL PROTECTED]>
> >Reply-To: [email protected]
> >To: [email protected]
> >Subject: [fme] Endless Loop Detection, where is the limit ?
> >Date: Mon, 28 Aug 2006 09:31:52 -0000
> >
> >Hallo
> >
> >The more I use looping in CUSTOM Transformers, the more I get
> >error messages about "too many nested Evaluations", and a "Endless
> >Loop Warning" ...
> >
> > > @Evaluate -- failed to evaluate expression `expr 154-1' -- too many
> >nested evaluations (infinite loop?)
> > > Program Terminating
> > >
> > > Translation FAILED.
> >
> >
> >Anybody has an idea where there is a limit ? If it's a bug, or what
> >I'm doing wrong ?
> >
> >Thanks Michael
> >
> >
> >
> >
> >
> >
> >
> >Join us at the FME Worldwide User Conference Sept. 21-22, 2006
Vancouver BC 
> >Canada. For more information, visit www.safe.com/2006uc.
> >Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> 
> _________________________________________________________________
> Opret en personlig blog og del dine billeder på MSN Spaces:  
> http://spaces.msn.dk
> 
> /* 
>
============================================================================
> 
>    Navn          : Peter Laulund, KMS
> 
>    Oprettet dato : 9 februar 2006
> 
>    Beskrivelse   :
> 
>    Problemer     :
> 
>
============================================================================*/
> 
> # INIT - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> -
> MAPPING_FILE_ID "Version 1.0, 9 februar 2006"
> 
> #FME_DEBUG MAPPING_FILE
> 
> # MACRO- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> -
> DEFAULT_MACRO SourceFormat    NULL
> DEFAULT_MACRO DestFormat      NULL
> 
> DEFAULT_MACRO SourceDataset   null
> DEFAULT_MACRO DestDataset     null
> 
> DEFAULT_MACRO x0              100
> DEFAULT_MACRO y0              100
> DEFAULT_MACRO x1              500
> DEFAULT_MACRO y1              200
> DEFAULT_MACRO dxy              10
> 
> DEFAULT_MACRO SourceCoordSys  LL-WGS84
> DEFAULT_MACRO DestCoordSys    $(SourceCoordSys)
> 
> DEFAULT_MACRO Dim             2D
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> - -
> READER_TYPE               $(SourceFormat)
> READER_KEYWORD            INPUT
> INPUT_DATASET            "$(SourceDataset)"
> 
> WRITER_TYPE               $(SourceFormat)
> WRITER_KEYWORD            OUTPUT
> OUTPUT_DATASET            "$(SourceDataset)"
> 
> # 
>
=============================================================================
> FACTORY_DEF * CreationFactory                                      
         
>   \
>   FACTORY_NAME "CREATE GRID: Init Feature"                         
         
>   \
>   COORDINATE_SYSTEM $(SourceCoordSys)                              
         
>   \
>   NUMBER_TO_CREATE 1                                               
         
>   \
>   OUTPUT FEATURE_TYPE toYLoop                                      
         
>   \
>     @XValue( $(x0), Reset)                                         
         
>   \
>     @YValue( $(y0) )                                               
         
>   \
>     @SupplyAttributes(x, @XValue())                                
         
>   \
>     @Log(dhmFeature, 1, 1)
> 
> # 
>
-----------------------------------------------------------------------------
> FACTORY_DEF * TeeFactory                                           
         
>   \
>   FACTORY_NAME "CREATE GRID: Y Loop Start"                         
         
>   \
>   INPUT  FEATURE_TYPE toYLoop                                      
         
>   \
>   OUTPUT FEATURE_TYPE toXLoop                                      
         
>   \
>   OUTPUT FEATURE_TYPE toYLoop                                      
         
>   \
>     @Offset(0, $(dxy))
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> - -
> FACTORY_DEF * BranchingFactory                                     
         
>   \
>   FACTORY_NAME "CREATE GRID: Y Loop"                               
         
>   \
>   INPUT FEATURE_TYPE toYLoop                                       
         
>   \
>   TARGET_FACTORY "CREATE GRID: Y Loop Start"                       
         
>   \
>   TEST @YValue() <= $(y1)
> 
> # 
>
-----------------------------------------------------------------------------
> FACTORY_DEF * TeeFactory                                           
         
>   \
>   FACTORY_NAME "CREATE GRID: X Loop Start"                         
         
>   \
>   INPUT  FEATURE_TYPE toXLoop                                      
         
>   \
>   OUTPUT FEATURE_TYPE gridPoint                                    
         
>   \
>   OUTPUT FEATURE_TYPE toXLoop                                      
         
>   \
>     @Offset($(dxy), 0 )
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> - -
> FACTORY_DEF * BranchingFactory                                     
         
>   \
>   FACTORY_NAME "CREATE GRID: X Loop"                               
         
>   \
>   INPUT FEATURE_TYPE toXLoop                                       
         
>   \
>   TARGET_FACTORY "CREATE GRID: X Loop Start"                       
         
>   \
>   TEST @XValue() <= $(x1)
> 
> # 
>
-----------------------------------------------------------------------------
> INCLUDE $(FME_MF_DIR)VisData.FMI
> 
> # 
>
=============================================================================
> INPUT *
> 
> OUTPUT *
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> - -
> # 
>
=============================================================================
> 
> set comment {
>
===============================================================================
> 
>    Navn          : Peter Laulund, KMS
> 
>    Oprettet dato : 03 februar 2005 - 09:56
> 
>    Beskrivelse   :
> 
>
=============================================================================}
> 
> # 
>
=============================================================================
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> - -
> set tcl_precision 17
> set pi      [expr atan2( 1,0) * 2] ;# puts $pi
> set rad2deg [expr 180 / $pi ]
> set deg2rad [expr $pi / 180 ]
> 
> proc run {} {
>      set x0 ""; set y0 ""; set x1 ""; set y1 ""
>      set lst [ getGeom ]
>      puts "----->$lst"
>      set i 3
> 
>      while { [incr i -1] } {
>         set retVal [list]
>         foreach {x0 y0} $lst {
>           if { [ string equal $x1 "" ] } {set x1 $x0 ; set y1 $y0 ;
continue 
> }
>           puts "=======> $x1 $y1 $x0 $y0"
>           lappend retVal [getFr $x1 $y1 $x0 $y0]
>           set x1 $x0 ; set y1 $y0; set x0 "" ; set y0 ""
>         }
>         puts "=-=-=-> $retVal"
>         set $lst $retVal
>      }
>      setGeom $retVal
> }
> 
> proc getFr {x0 y0 x1 y1} {
>      global pi deg2rad rad2deg ;# puts "$pi $deg2rad $rad2deg "
>      #getGeom
>      set da [expr $deg2rad * 60 ]
>      #foreach {x0 y0 x1 y1} $coorLst {}
> 
>      puts [set len [expr sqrt( pow(($x1 -$x0),2) + pow(( $y1 -$y0
),2)) / 
> 3.0 ]]
>      puts [set a [expr atan2(($y1- $y0), ($x1- $x0)) ]]
>      set xa [expr $x0 + ($len * cos($a)) ]
>      set ya [expr $y0 + ($len * sin($a)) ]
>      set xb [expr $xa + ($len * cos(($a + $da))) ]
>      set yb [expr $ya + ($len * sin(($a + $da))) ]
>      set xc [expr $x0 + (2 * $len * cos($a)) ]
>      set yc [expr $y0 + (2 * $len * sin($a)) ]
> # $x0 $y0
>      set retVal [list $xa $ya $xb $yb $xc $yc $x1 $y1 ]
>      return $retVal
> }
> 
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> - -
> proc getGeom {} {
> 
>      set retVal [list]
>      set n [FME_Coordinates numCoords ]
>      for {set i 0 } {$i < $n} { incr i } {
>         lappend retVal [FME_Coordinates getCoord x $i ]
[FME_Coordinates 
> getCoord y $i ]
>      }
>      return $retVal
> }
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> - -
> proc setGeom { coorLst } {
> 
>      #puts "-->[join $coorLst]<"
>      FME_Coordinates resetCoords
>      foreach {x y} [join $coorLst] {
>         FME_Coordinates addCoord $x $y
>      }
> }
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> - -
> proc test {} {
>      set lst {a b c d e f g h i j k l}
>      set x0 ""; set y0 ""; set x1 ""; set y1 ""
>      foreach {x0 y0} $lst {
>         if { [ string equal $x1 "" ] } {set x1 $x0 ; set y1 $y0 ;
continue }
>         puts "$x1 $y1 $x0 $y0"
>         set x1 $x0 ; set y1 $y0; set x0 "" ; set y0 ""
>      }
> }
> 
> #test
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> - -
> # 
>
=============================================================================
> proc getFr1 {} {
>      global pi deg2rad rad2deg ;# puts "$pi $deg2rad $rad2deg "
> 
>      #getGeom
>      set da [expr $deg2rad * 60 ]
>      set x0 [FME_Coordinates getCoord x 0 ]
>      set y0 [FME_Coordinates getCoord y 0 ]
>      set x1 [FME_Coordinates getCoord x 1 ]
>      set y1 [FME_Coordinates getCoord y 1 ]
> 
>      set len [expr sqrt( pow(($x1 -$x0),2) + pow(( $y1 -$y0 ),2)) /
3.0 ]
>      set a [expr atan2(($y1- $y0), ($x1- $x0)) ]
>      set xa [expr $x0 + ($len * cos($a)) ]
>      set ya [expr $y0 + ($len * sin($a)) ]
>      set xb [expr $xa + ($len * cos(($a + $da))) ]
>      set yb [expr $ya + ($len * sin(($a + $da))) ]
>      set xc [expr $x0 + (2 * $len * cos($a)) ]
>      set yc [expr $y0 + (2 * $len * sin($a)) ]
> 
>      FME_SetAttribute ID [ expr [ FME_GetAttribute ID ] + 1 ]
>      set retVal [list $x0 $y0 $xa $ya $xb $yb $xc $yc $x1 $y1 ]
>      setGeom $retVal
>      #getGeom
> 
> }
> 
> 
> /* 
>
============================================================================
> 
>    Navn          : Peter Laulund, KMS
> 
>    Oprettet dato : 2 februar 2005
> 
>    Beskrivelse   :
> 
>
============================================================================*/
> 
> # 
>
=============================================================================
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> - -
> # FME_DEBUG MAPPING_FILE
> 
> READER_TYPE NULL
> READER_KEYWORD INPUT
> INPUT_DATASET nullin
> 
> WRITER_TYPE NULL
> WRITER_KEYWORD OUTPUT
> OUTPUT_DATASET nullout
> 
> Tcl2 source {$(FME_MF_DIR)frac.tcl} ;
> 
> DEFAULT_MACRO antal 3
> 
> # 
>
=============================================================================
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> - -
> FACTORY_DEF * CreationFactory                                      
         
>   \
>    FACTORY_NAME "Create Init Features"                             
         
>   \
>    2D_GEOMETRY 100 100 200 200 300 100 200 0 100 100               
         
>   \
>    NUMBER_TO_CREATE 1                                              
         
>   \
>    OUTPUT FEATURE_TYPE someFeature                                 
         
>   \
>       @SupplyAttributes(ID, 1)                                     
         
>   \
>       @Log("start", 1, 1)
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> - -
> FACTORY_DEF * ChoppingFactory                                      
         
>   \
>    FACTORY_NAME "Split til linjer"                                 
         
>   \
>    INPUT FEATURE_TYPE *                                            
         
>   \
>    MAX_VERTICES 2                                                  
         
>   \
>    CHOP_POLYGONS                                                   
         
>   \
>    OUTPUT CHOPPED FEATURE_TYPE arcFeature                          
         
>   \
>       @Tcl2( getFr1 )
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> - -
> FACTORY_DEF * BranchingFactory                                     
         
>   \
>    FACTORY_NAME "Loop"                                             
         
>   \
>    INPUT FEATURE_TYPE arcFeature                                   
         
>   \
>    TARGET_FACTORY "Split til linjer"                               
         
>   \
>    TEST @Value(ID) <= $(antal)                                     
         
>   \
>    OUTPUT FAILED FEATURE_TYPE *
> 
> # 
>
-----------------------------------------------------------------------------
> INCLUDE $(FME_MF_DIR)VisData.FMI
> 
> # 
>
=============================================================================
> INPUT *
> 
> OUTPUT *
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> - -
> # 
>
=============================================================================
> 
> /* 
>
============================================================================
> 
>    Navn          : Peter Laulund, KMS
> 
>    Oprettet dato : 13 oktober 2004 - 14:43
> 
>    Beskrivelse   :
> 
>
============================================================================*/
> 
> # 
>
=============================================================================
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> - -
> DEFAULT_MACRO toViewFile      VisData
> 
> # 
>
-----------------------------------------------------------------------------
> FACTORY_DEF * RecorderFactory                                      
         
>   \
>   FACTORY_NAME "KMS VisData: Gem til FFS"                          
         
>   \
>   INPUT FEATURE_TYPE *                                             
         
>   \
>   FEATURE_FILE "$(FME_MF_DIR_UNIX)/$(toViewFile).ffs"              
         
>   \
>   MODE RECORD_PASS_THROUGH
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> - -
> FACTORY_DEF * CreationFactory                                      
         
>   \
>   FACTORY_NAME "KMS VisData: Start FMEVIEW"                        
         
>   \
>   CREATE_AT_END                                                    
         
>   \
>   OUTPUT FEATURE_TYPE DropMig                                      
         
>   \
>      @TCL("eval exec fmeview /ownffs
$(FME_MF_DIR_UNIX)/$(toViewFile).ffs 
> &")
> 
> FACTORY_DEF * TeeFactory                                           
         
>   \
>   FACTORY_NAME "KMS VisData: Drop startup dummy"                   
         
>   \
>   INPUT FEATURE_TYPE DropMig
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 
> - -
> # 
>
=============================================================================
>







Join us at the FME Worldwide User Conference Sept. 21-22, 2006 Vancouver BC 
Canada. For more information, visit www.safe.com/2006uc.   
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/fme/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to