Code looks fine to me. Is it possible $1 or $2 is accidentally the wrong type (aka, not text). I’ve had fun crashes by accidentally passing an array that should have been just text…
Or maybe you are testing that already, just not in the code below. Sannyasin Siddhanathaswami On Jul 21, 2017, 6:59 PM -1000, Kirk Brooks via 4D_Tech <[email protected]>, wrote: I need some ideas on a problem. I'm getting a crash when a method runs. The method itself isn't the issue, I think, because it gets called literally hundreds of times in a given session. Here it is: C_TEXT($1;$2;$dir;$key) $key:=$1 $dir:="" If (Count parameters=2) $dir:=$2 End if ASSERT($key#"";"No key for a KVP find.") If ($key#"") QUERY([KVP];[KVP]key=$key;*) QUERY([KVP]; & ;[KVP]dir=$dir;*) QUERY([KVP]) End if ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

