RecordSave() crashes
Aldevinas Katkus
1-27-22
Operating system: Windows
version 8.5 2021-04-18 (build 85360453)


I cannot figure out why
NewContactCUDsmRemote() crashes in my import procedure, but it does not if I create subcontact manually.
I am using this in the Periodic Task.

I digged out to the CUVcRecordDefaults() which uses
wn = CurWindow;
if (wn!=5) then begin
CUr.CustCat = CSb.DefCustCat;
end;

I thought, CurWindow does not work in the background thread and If I use RecordClear(ContactCUr) instead of RecordNew(ContactCUr) in the NewContactCUDsmRemote() I would get rid of this crash, but it did not help. Export-import did not help either.


updating function Boolean NewContactCUDsmRemote(record CUVc CUr,var record CUVc ContactCUr)
...
lCUr.Code = ContactCUr.Code;
if (ReadFirstMain(lCUr,1,true)==false) then begin
LogText(0,"NewContactCUDsmRemote 3 will store ContactCUr.Code=" & ContactCUr.Code);
if (RecordStore(ContactCUr,false)) then begin
LogText(0,"NewContactCUDsmRemote store success");//never executes

end else begin
LogText(0,"NewContactCUDsmRemote fail");//never executes
end;

and the results in the log are:


2022-01-27 18:28:10 /THREAD(14) NewContactCUDsmRemote 3 will store ContactCUr.Code=AK5
2022-01-27 18:28:10 /THREAD(14) Damaged database: D4DiskStore dvp!=gp->MasterDVp
2022-01-27 18:28:10 /THREAD(14) D4DiskStore
2022-01-27 18:28:10 /THREAD(14) dump of call stack
2022-01-27 18:28:10 /THREAD(14) 0000000008769C90 + 2452 halpatch\CUVcWActionTool.hal: NEWCONTACTCUDSMREMOTE
2022-01-27 18:28:10 /THREAD(14) Damaged database: D4DiskStore failed
2022-01-27 18:28:10 /THREAD(14) fide = CUVc
2022-01-27 18:28:10 /THREAD(14) D4SegmentStore failed


same with 2021-12-28 version, except the last line in the log is
2022-01-27 18:48:13 /THREAD(13) holding wrong DV

Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Latest Posts
Reino Botha
Please check your version of android if it is the same as the server you are connecting too. ...
08:24 21 Nov 2024
Bror-Erik Kotiranta
In NC you hace operations>>ai chats. They are used for these Br, Bror-Erik...
05:12 21 Nov 2024