I've experience that this error occured because of the process is not found.
Ex: I declar a parameter name "remain_time4" and assign it to a property. If I stop the app at "Delay(3000)" manually, TestComplete will not recognize the "remain_time4" and show the error and stop my scripts.
if(Mobile["Device"](device)["Process"]("com.sling")["Exists"]==true)
{
var pSlingTV1 = Mobile["Device"](device)["Process"]("com.sling")
pSlingTV1["Refresh"]()
//Check the video is playing or not
var remain_time3 = aqString["Trim"](pSlingTV1["RootLayout"]("")["View"]("drawer_layout")["Layout"]("player_controls")["Layout"]("NO_ID")["Layout"]("seekbar")["TextView"]("seekbar_time_remaining_bottom")["ControlText"])
Delay(3000)
var remain_time4 = aqString["Trim"](pSlingTV1["RootLayout"]("")["View"]("drawer_layout")["Layout"]("player_controls")["Layout"]("NO_ID")["Layout"]("seekbar")["TextView"]("seekbar_time_remaining_bottom")["ControlText"])
if(remain_time3 == remain_time4)
{
Log["Error"](" THE VIDEO IS NOT PLAYING. RESTART THE VIDEO.")
GeneralFunction["stopAppwithADBShell"](device,"com.sling")
GeneralFunction["openAppwithADBShell"](device,"com.sling","com.movenetworks.StartupActivity")
view_1st_Video_with_Sling_TV(device)
}
else
{
Log["Message"]("THE VIDEO IS STILL PLAYING!")
}
}