internal data structures corrupted issue

This forum is for general support of Xbase++
Post Reply
Message
Author
BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

internal data structures corrupted issue

#1 Post by BruceN »

One customer is getting sporatic errors. They have had this happen about twice a month or so (doing several hundred to a thousand or so invoices a month).

Sell_Items is the main invoicing routine (quite long with numerous functions called within it). Normally with an error i can get a clue from the call stack, but here it is garbage (same with other times).

I can see that error 41 is the internal data structures... but cant find info on subcode 5 and i dont have a clue how to find the issue.

thanks

-------------------------
Error writing sell_itemsfor invoice 10425274
Date: 10/27/11 Time: 08:30:35
------------------------------------------------------------------------------
oError:args :
-> VALTYPE: N VALUE: 2
-> VALTYPE: C VALUE:
-> VALTYPE: C VALUE:
-> VALTYPE: C VALUE:
oError:canDefault : N
oError:canRetry : N
oError:canSubstitute: Y
oError:cargo : NIL
oError:description : Internal data structures corrupted
oError:filename :
oError:genCode : 41
oError:operation : SELL_ITEMS
oError:osCode : 0
oError:severity : 2
oError:subCode : 5
oError:subSystem : BASE
oError:thread : 1
oError:tries : 0
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
À…¾0(1237116)
There are only 10 kinds of people - those who understand binary and those who don't :)

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: internal data structures corrupted issue

#2 Post by rdonnay »

Do you use any SET RELATIONs in your code?
The eXpress train is coming - and it has more cars.

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: internal data structures corrupted issue

#3 Post by BruceN »

yes, i have a few dc_setrelations... is that a problem?
There are only 10 kinds of people - those who understand binary and those who don't :)

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: internal data structures corrupted issue

#4 Post by Auge_Ohr »

BruceN wrote:I can see that error 41 is the internal data structures... but cant find info on subcode 5 and i dont have a clue how to find the issue.
0005 - [BASE] - ???
Associated with: "41:Internal data structures corrupted"
Caused by: Various things, including: "Memory(0)", ":UpdateBuffer()",
"AppEvent()", "ValType()", etc.
Remarks: Also in Fatal Error Logs: "EH: 5"/"OS: 0"/"XPP: 41",
"Function: atmStartGCThread(void*)", "Module: ATM"
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: internal data structures corrupted issue

#5 Post by rdonnay »

One of the more common IDSC problems I have seen over the years is caused by closing a database that has a relation set to it.
The eXpress train is coming - and it has more cars.

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: internal data structures corrupted issue

#6 Post by BruceN »

Thanks... I'll check to see if we close the related database when we close the primary one (and close the related one first, I assume).
There are only 10 kinds of people - those who understand binary and those who don't :)

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: internal data structures corrupted issue

#7 Post by rdonnay »

Yes, always close the related databases first.
The eXpress train is coming - and it has more cars.

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: internal data structures corrupted issue

#8 Post by skiman »

Hi,

You can replace your close command or function with the preprocessor to a new function. I have an AboCLoseArea() which replace dbclosearea().

Code: Select all

Function ABOCloseArea(cAlias)
*****************************
LOCAL bErrorHandler
   if empty(cAlias)
      cAlias := Alias()
   endif
   if !empty(cAlias) .And. Select(cAlias) # 0
      bErrorHandler := ErrorBlock({|e| Break(e)})
      BEGIN SEQUENCE
         (cAlias)->(DbClearRelation())
         (cAlias)->(DbCloseArea())
      END SEQUENCE
      ErrorBlock(bErrorHandler)
   endif
return nil
This way it is modified after recompiling your code.
Best regards,

Chris.
www.aboservice.be

Post Reply