Run time error base/1449

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Paramvir
Posts: 44
Joined: Sun Mar 27, 2016 9:46 am
Location: India
Contact:

Run time error base/1449

Post by Paramvir »

I defined a modal window in a function which is invoked from other procedure. When I invoke this modal window to display text message in an editbox, the function runs fine for some time, then after a minute or two, out of nowhere, a run time error occurs. Please see the image file attached. Error code sometimes changes like argument error, conditional error etc. Sometimes, no error comes up for sometime. In this instance, I opened the HMG source file h_EventCB.prg and, as indicated by the runtime error window, I find in line 159 (where the cursor is in the image) the error. I fail to understand what causes this and how to rectify this. I request the experts here to help in this regard. Thank you all.
Attachments
error1449.jpg
error1449.jpg (149.1 KiB) Viewed 2217 times
User avatar
dragancesu
Posts: 921
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: Run time error base/1449

Post by dragancesu »

Paramvir
Posts: 44
Joined: Sun Mar 27, 2016 9:46 am
Location: India
Contact:

Re: Run time error base/1449

Post by Paramvir »

Thank you Dragancesu for your prompt attention and reply. I would like to go through this guide. There is one thing that the error as indicated by the system, belongs to a file which is HMG source file. I have gone through my own prg files and could not locate this syntax error (&). Thank you once again.
User avatar
mol
Posts: 3723
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Run time error base/1449

Post by mol »

Try to investigate sources of hmg. Sometimes it helps
User avatar
dragancesu
Posts: 921
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: Run time error base/1449

Post by dragancesu »

use &varvar

monitors the value via a debugger the value of the varvar variable

maybe it's empty, maybe it's pointing to a variable / function that doesn't exist, mostly an incorrect value

see the value of the variable that occurs in line 2722

without insight into the source we can only look at the crystal ball
User avatar
AUGE_OHR
Posts: 2064
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Run time error base/1449

Post by AUGE_OHR »

hi,
Paramvir wrote: Thu Jun 04, 2020 3:50 pm ... I find in line 159 (where the cursor is in the image) the error.
it does not help to show "System-Error" produce by "your Code" ...

you have to go back Error-List until you reach "your Code" and 1 Step back.
between there both Points you get a Error where you can use

Code: Select all

   bError := ERRORBLOCK( { | oErr | BREAK( oErr ) } )
   BEGIN SEQUENCE
      // Code
   RECOVER USING oError
      ERRORBLOCK( bError )
      MsgStop( "Operation: " + oError:Operation + " - Description: " + oError:Description, "Error" )
      RETURN
   END SEQUENCE
   ERRORBLOCK( bError )
show us "your Code" where it begin and we can help more
have fun
Jimmy
Paramvir
Posts: 44
Joined: Sun Mar 27, 2016 9:46 am
Location: India
Contact:

Re: Run time error base/1449

Post by Paramvir »

Thank you Auge_Ohr, Mol and Dragancesu for all the help.

I give below the code of the function DISP_WIN1_MODAL. Line 2722 refers to the line ACTIVATE WINDOW Form_1 and this function is invoked from the procedure readmem and line 2272 is where the function is invoked. The run time error comes after a few seconds or even minutes when the modal window is active. Sometimes it does not come even after a long time. So something in the background happens.

Code: Select all

FUNCTION DISP_WIN1_MODAL          

PARAMETER CCCATEXT

CCCSTRING=CCCATEXT                  

CCTXT2=" "
TXT3=" "
CCTXT2:=ALLTRIM(NAM)+" BORN: "+PDATEX1
TXT3:="NUMEROLOGY FORECAST REPORT"+ "   ALPHABET SYSTEM: "+ MALPHAX



DEFINE WINDOW Form_1               ;    
      AT 90,90                        ;
      WIDTH 930                       ;
      HEIGHT 650                      ;
      TITLE "HEAD NUMEROLOGIST"    ;
      WINDOWTYPE MODAL ;
      BACKCOLOR {255,255,255} ;
      SIZABLE .F.   ;
   

@ 04, 30 LABEL ALabel1 PARENT Form_1     ;  
      WIDTH 860                             ;
      HEIGHT 28                             ;
      FONT "Lucida Console" SIZE 14 BOLD   ;
      BACKCOLOR { 204, 0, 170}      ;    // DEEP MAGENTA
      FONTCOLOR { 255,255,255}        ;
      VALUE  txt3 ;
      CENTERALIGN

@ 25, 30 LABEL BLabel1 PARENT Form_1     ;
      WIDTH 860                             ;
      HEIGHT 26                             ;
      FONT "Lucida Console" SIZE 14  BOLD  ;
      BACKCOLOR { 192, 0, 128}     ;    // PURPLE
      FONTCOLOR { 0,255,255}       ;    // cyan    
      VALUE  cctxt2 ;
      CENTERALIGN


   @ 45,30 EDITBOX editor     ;
      PARENT Form_1           ;
      WIDTH 860               ;
      HEIGHT 545              ;
      FONTCOLOR {0,0,0}     ;
      BACKCOLOR {255,255,255} ; 
      DISABLEDBACKCOLOR {255,255,240} ;
      DISABLEDFONTCOLOR {40,40,40} ;
      FONT "Lucida Console" SIZE 14  ;
      VALUE CCCSTRING ;
      READONLY;
      NOHSCROLL


 ON KEY ESCAPE ACTION Form_1.Release
 
    END WINDOW

CENTER WINDOW Form_1

ACTIVATE WINDOW Form_1   // line 2722

RETURN NIL




PROCEDURE READMEM

SAVE SCREEN TO SCR_MEM

CCATEXT=" "
CCATEXT:=FINAL_DATA

DISP_WIN1_MODAL(CCATEXT)    // line 2272

......


Thank you all.
User avatar
AUGE_OHR
Posts: 2064
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Run time error base/1449

Post by AUGE_OHR »

hi,

Code: Select all

SAVE SCREEN TO SCR_MEM
are you mix Console and GUI :?:
have fun
Jimmy
Paramvir
Posts: 44
Joined: Sun Mar 27, 2016 9:46 am
Location: India
Contact:

Re: Run time error base/1449

Post by Paramvir »

AUGE_OHR wrote: Fri Jun 05, 2020 2:46 am hi,

Code: Select all

SAVE SCREEN TO SCR_MEM
are you mix Console and GUI :?:
Yes, I use
REQUEST HB_GT_WVT_DEFAULT
User avatar
dragancesu
Posts: 921
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: Run time error base/1449

Post by dragancesu »

The program cannot display the window because some variable has no good value

maybe CCTXT2: = ALLTRIM (NAM) + "BORN:" + PDATEX1

if NAM is string and PDATEX1 is a date field then ... NAM + DTOC(pdatex1), all variables must be string
Last edited by dragancesu on Fri Jun 05, 2020 9:51 am, edited 1 time in total.
Post Reply