moveRide is a Event of Agenda.
Thanks for your attention, Greg.
var agdOK as boolean = true
var move as integer = m_agenda.index - m_agenda.selected
if m_agenda.selectedRide <> m_agenda.selected then return
if move = 0 then return
for i as integer = m_agenda.selectedFirst + move to m_agenda.selectedLast + move
if m_agenda.frame(i,2) <> 0 and m_agenda.frame(i,4) <> m_agenda.selected then agdOK = false
next
if agdOK = false then return
My guess from your code is that the exception is a NilObjectException and that it’s caused by one of m_agenda or m_ride being nil when this code runs.
If it’s a reproducible crash, run it in the debugger and it’ll show you exactly where the problem is.
Otherwise, you’ll need to use Introspection to find out what kind of exception it is (see the docs for introspection, there should be an example for App.unhandledException in there) and then add some guards and spammy logging to your code to see what could be wrong.