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
David Delač
Hi Piotr, The log entry:
2024-12-14 08:40:43 0.000 CallHal(IsHansaWorldCustomer) appears because the server is running with the verbosity=debug-detailed setting in its parameters.txt file. Thi...
09:43 16 Dec 2024
Brittany McGrath
Hi Vaughn, I can confirm this has been fixed now and is live in Standard ERP 2024-11-20 Version: 85556786. Thank you. ...
10:04 10 Dec 2024