I could not repeat it in a separate hal.
I am not sure what I did so it does not crash anymore. It could be I made a queued function call like this:
external updating procedure IVImportIn();
global
procedure DoIVImportTask(string args)
begin
queued.IVImportIn; //call a function which has some qupdating function calls
return;
end;
global
procedure InitIVImportTask()
begin
//used to crash in NewContactCUDsmRemote() when used as Periodic Task: Damaged database: D4DiskStore dvp!=gp->MasterDVp D4DiskStore
NewPeriodicTask2("IVImportTask","IVImportTask","DoIVImportTask","",60,"");
return;
end;