Page 1 of 1

GPF in ALLOC_TEXT

Posted: Wed Jan 04, 2006 2:01 pm
by kronos911
Hello to all. I’m getting a GPF from one of my apps. The GPF accurse while indexing the main DBF for the first time. When I delete the CDX file and restart the app there is no GPF. From the MAP file the GPF address is somewhere in ALLOC_TEXT (0010:412F)

Code: Select all

0010:3E04 00692H     ALLOC_TEXT             CODE
This is strange because I use the same technique in all my apps when indexing. The code I use if as follows

Code: Select all

STATIC cId1:="$Id: ADI_OPEN.PRG,v 1.1 2006/01/03 22:07:16 ΧΡΟΝΗΣ Exp $"

#include "SIXCDX2.CH"
#include "FiveWin.ch"

#command INDEX ON <key> TAG <(tag)> [OF <(cdx)>]                        ;
         [FOR <for>]                                                    ;
         [ALL]                                                          ;
         [ASCENDING]                                                    ;
         [<dec:  DESCENDING>]                                           ;
         [<u:    UNIQUE>]                                               ;
         [<cur:   USECURRENT>]                                          ;
         [<cur:   SUBINDEX>]                                            ;
         [EVAL    <opt> [EVERY <step>]]                                 ;
         [OPTION <opt> [STEP <step>]]                                   ;
         [<add:   ADDITIVE>]                                            ;
         [<filt:  FILTERON>]                                            ;
 =>                                                                     ;
         m6_ordCondSet(<"for">, <{for}>, NIL, NIL, <{opt}>,             ;
                       <step>, RECNO(), NIL, NIL, NIL, [<.dec.>],       ;
                       .T., <(cdx)>, <.cur.>, .F., NIL, <.add.>, NIL,   ;
                       <.filt.> )                                       ;
       ; m6_ordCreate( <(cdx)>, <(tag)>, <"key">, <{key}>, [<.u.>] )

FUNCTION OpenDbfs()
  PRIVATE oDlg1,;
        oMeter1,;
        nMeter1 := 0,;
        oMeter2,;
        nMeter2 := 0,;
        lRetVal := .F.,;
        oOpenIco,;
        lDlgKill

  lDlgKill := .F.

  DEFINE DIALOG oDlg1 NAME "FLS_OPEN";
    FONT oMainFont OF oMainWin;
    COLOR CLR_BLACK, CLR_HGRAY
  
    REDEFINE BITMAP ID 101 NAME "FILES04" OF oDlg1 
    REDEFINE METER oMeter1 VAR nMeter1 ID 102 TOTAL 7 OF oDlg1 COLOR CLR_WHITE, CLR_BLACK BARCOLOR CLR_BLUE, CLR_WHITE
    REDEFINE METER oMeter2 VAR nMeter2 ID 103 TOTAL 7 OF oDlg1 COLOR CLR_WHITE, CLR_BLACK BARCOLOR CLR_BLUE, CLR_WHITE
    oDlg1:bStart := {|| FileOpn()}

  ACTIVATE DIALOG oDlg1 VALID lDlgKill CENTER
  CursorArrow()
RETURN lRetVal

STATIC FUNCTION FileOpn()

  CursorWait()
  SELECT 1
  IF !FILE("ADIBOOK.DBF")
    MSGStop(OemToAnsi("’¦ &#152;¨®&#156;ε¦ «ΰ¤ &#152;›&#156; ι¤ ƒ„&#140; ™¨β&#159;&#158;΅&#156;!!!" +CRLF+;
                      "륦›¦ &#152;§ζ «¦ §¨ζ&#154;¨&#152;££&#152;"), OemToAnsi("

Posted: Thu Jan 05, 2006 12:35 pm
by Antonio Linares
You should use Comix instead of Six RDD, as Six has troubles with Clipper 5.2. Clipper 5.3 provides built-in Comix RDD.

Posted: Fri Jan 06, 2006 7:29 am
by Antonio Linares
Besides that, what stacksize and heapsize are you using in your LNK file ?

Posted: Fri Jan 06, 2006 2:36 pm
by kronos911
My stack size is 9500 and heap is 2048. My lnk file is

Code: Select all

BLINKER INCREMENTAL OFF 
BLINKER EXECUTABLE CLIPPER E:4096;F:255;SWAPPATH:'c:\windows\temp\';TEMPPATH:'c:\windows\temp\' 
BLINKER EXECUTABLE COMPRESS 1 
//BLINKER EXECUTABLE EXTENDED 
VERBOSE 2 
OUTPUT .\wADI.EXE
MAP= .\WADI1.MAP S,A
PACKCODE
PACKDATA

DEFBEGIN
   name        WADI
   description 'ADI for Windows'
   exetype     Windows 3.1
   code        moveable discardable
   data        preload moveable
   stacksize   9500
   heapsize    2048
   segment     'PLANKTON_TEXT' nondiscardable
   segment     'EXTEND_TEXT'   nondiscardable
   segment     'OM_TEXT'       nondiscardable
   segment     'OSMEM_TEXT'    nondiscardable
   segment     'SORTOF_TEXT'   nondiscardable
   segment     'STACK_TEXT'    nondiscardable
DEFEND

NOBELL
 
FILE ADI_MAIN
FILE ADI_OPEN
FILE ADI_MENU
FILE ADI_FRMS
FILE ADI_BRWS
FILE ADI_VIEW
//FILE ADI_FIND
//FILE ADI_FILT
FILE ADI_RL
FILE ADI_MISC
FILE ADI_BACK
FILE SIXCDX
FILE MSGGR437
LIB HLIBW
SEARCH  Five, FiveC, Objects
LIB WinApi, Clipper, Extend, six3, Terminal


Posted: Fri Jan 06, 2006 9:10 pm
by Antonio Linares
I suggest you to use Comix instead of Six. 5.2 and Six had many memory troubles.

Also, you may seriously consider to move to 32 bits using harbour/xharbour and FWH.