As documented here:
https://dynamorio.org/dr__defines_8h.html#af1b1bc23c42ffb7452568176b09b1212 DR_CLEANCALL_READS_APP_CONTEXT and DR_CLEANCALL_WRITES_APP_CONTEXT are passed to callbacks registered with dr_register_clean_call_insertion_event(), which "
Registers a callback function that is invoked whenever a clean call is inserted in instrumentation, such as by dr_insert_clean_call() [...]" (
https://dynamorio.org/dr__events_8h.html#abfbfebb6df4c756bb9e4c2a9cac82ce9).
You are probably using drreg_init(), which registers drreg_event_clean_call_insertion() (where you get the error) using dr_register_clean_call_insertion_event().
Clean calls should generally be in drmgr_register_bb_instrumentation_event().
drmgr_register_bb_app2app_event() is for modifying application code (i.e., non-meta instructions except for labels), while drmgr_register_bb_instru2instru_event() is for optimizing previously inserted instrumentation (though you can have clean calls here).
From the original message is unclear which of the many dr_insert_clean_call() in your client is causing the issue.