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
Bror-Erik Kotiranta
Clients have their own cache, and then the server has the shared cache, if you want it kind of black and white. Presense should be there as far as i know...
10:55 7 July 2025
Yavuz Yigiterhan
Hello Paul, That is something only HansaWorld can do. But that would help to understand is that causing the problem and - if so - we fix the issue. Additional information is appreciated. Yavuz...
10:45 7 July 2025