crash on updating record
Aldevinas Katkus
7-19-19
My code crashes on updating customer's record. Why it happens. When I remove the pricelist from the customer in Standard ERP manually (not in HAL) it does not crash. Any ideas why it crashes?
...
2019-07-19 16:26:01 AD delete pricelist AAA from PBESEAGR
2019-07-19 16:26:01 AD delete... pricelist from PBESEAGR
2019-07-19 16:26:01 AD CopyDVP with some KeyMasterArrType touchedf!=false
2019-07-19 16:26:01 AD
2019-07-19 16:26:01 AD dump of call stack
2019-07-19 16:26:01 AD Exiting to protect the database

Code:
ResetLoop(CUr);

CUr.Code=custcode;
if (ReadFirstMain(CUr,1, true)) then begin
RecordCopy(oldCUr, CUr);
end else begin
end;
if (action=="DEL") then begin
LogText(0, "delete pricelist "& CUr.PLCode & " from " & oldCUr.Code);
CUr.PLCode="";
LogText(0, "delete... pricelist from " & CUr.Code);
err=RecordUpdate(oldCUr, CUr,true);//crash here

if (err==0) then begin
...
Aldevinas Katkus
7-22-19
update: after adding --verbosity=debug-detailed to paramers.txt I get 2 extra lines with EInvoiceingEnabled in the log (version 8.4 2017-10-12 (build 84190509)):

2019-07-22 10:06:37 (1) AD importing row 31
2019-07-22 10:06:37 (1) AD delete pricelist AAA from PBESEAGR
2019-07-22 10:06:37 (1) AD delete... pricelist from PBESEAGR
2019-07-22 10:06:37 (1) AD EInvoiceingEnabled err1 res=1
2019-07-22 10:06:37 (1) AD EInvoiceingEnabled err3 res=1
2019-07-22 10:06:37 (1) AD CopyDVP with some KeyMasterArrType touchedf!=false
2019-07-22 10:06:37 (1) AD
2019-07-22 10:06:37 (1) AD dump of call stack
2019-07-22 10:06:37 (1) AD Exiting to protect the database

then I tried to do the same with the same data in version 8.5 2019-06-12 (build 85310413) and it did not crash:
2019-07-22 10:13:27 (1) AD delete pricelist AAA from PBESEAGR
2019-07-22 10:13:27 (1) AD delete... pricelist from PBESEAGR
2019-07-22 10:13:27 (1) AD EInvoiceForCustomer SystemMode=0
2019-07-22 10:13:27 (1) AD EInvoices for customer are turned off
2019-07-22 10:13:27 (1) AD importing row 32

As I understand it has something to do with EInvoicing or am I wrong?
Aldevinas Katkus
8-16-19
update:
with 8.5 2019-06-12 (build 85310413) import crashes when I try to run the the same import a few times in a row. Third time I run it, it crashes the application with "hal call stack dumped" with the next message "stack is empty".
Application always crashes on the third import attempt.
Our client also complained about the crash.
Any ideas?
Aldevinas Katkus
8-16-19
Created byAldevinas Katkus09:29 16 Aug 2019
update: with 8.5 2019-06-12 (build 85310413) import crashes when I try to run the the same import a few times in a row. Third time I run it, it crashes the application with "hal call stack dumped" with the next message "stack is empty". Application always
If I exit SERP between imports it not crash. What this could mean?
Aldevinas Katkus
8-16-19
Created byAldevinas Katkus09:43 16 Aug 2019
If I exit SERP between imports it not crash. What this could mean?
version (at the client) 8.4 2017-10-12 (build 84190509) crashes on first import attempt, which sets customer pricelist field to blank value
Aldevinas Katkus
8-16-19
Created byAldevinas Katkus10:01 16 Aug 2019
version (at the client) 8.4 2017-10-12 (build 84190509) crashes on first import attempt, which sets customer pricelist field to blank value
version 8.4 2018-07-26 (build 84192014) behaves the same (crashes on the third import) as 8.5 2019-07-15 (build 85320313). Interesting is the fact that TB.TXT import also counts, I mean if I create a new DB by importing TB.TXT in single user mode, then crash happens after second run of my import (because the first import was TB.TXT)
Paul Timms
8-19-19
I've also had issues when doing a second import in the same "session". But I get a continuous "M4USleep called on main thread" message appearing a few times per second in the server's hansa.log. I have to kill it, start back up, log back in and do the second import again, which works fine. Maybe something needs to be cleared? In the old days there was DBFlush but we were told this was no longer needed.
David Delač
8-22-19
Hi Aldevinas,

Can you please provide me with the whole HAL code that handles importing in this situation?

Best Regards,
David D.
Aldevinas Katkus
8-22-19
I have already reported a bug and Tomas (our PM) has verified it.
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Back to the list
Latest Posts
Hello, Kindly please report the bug so that we can further investigate and resolve it. Thank you. Best regards, Benjamin...
11:31 3 May 2024
Hi, No changes should have been made that would increase client's HDB file. Please try to delete HANSA.HDB from client folder and reconnect to server and check if it will grow to 30MB again. ...
10:14 30 Apr 2024