Property 'cthordispatcher' value is too long.

3 views
Skip to first unread message

mk sharma

unread,
Dec 22, 2012, 11:39:56 AM12/22/12
to FoxPr...@googlegroups.com
I am facing Error Message" Property 'cthordispatcher' value is too long. " when i "Quit"  from VFP after Completing "Thor->Check for Updates" ?

Warm regards,
mk.


Jim

unread,
Dec 22, 2012, 11:42:56 AM12/22/12
to FoxPr...@googlegroups.com
Mk -

When you report errors, could you please provide more information that just the error message? Do you know the program or method where the error occurs? The line of code?

Sent from my iPhone

mk mk

unread,
Dec 22, 2012, 12:08:36 PM12/22/12
to FoxPr...@googlegroups.com
I have just click on "Thor->Check for Updates"  and after completing this process, just typed quit + Enter and this error appears.

Warm regards,
mk.

Jim

unread,
Dec 22, 2012, 12:20:01 PM12/22/12
to FoxPr...@googlegroups.com, FoxPr...@googlegroups.com
No indication of where the error occurs at all?  If not, that's pretty odd. 

Ok, then, what is its length?

Sent from my iPhone

mk mk

unread,
Dec 22, 2012, 12:26:06 PM12/22/12
to FoxPr...@googlegroups.com
Start VFP9
* In Command Windows
Do thor
* "Thor->Check for Updates"
* After Completing this process In Command Windows
quit + Enter


How to check the length ?

Warm regards,
mk.

mk sharma

unread,
Dec 22, 2012, 12:35:08 PM12/22/12
to FoxPr...@googlegroups.com
Content of "  _screen.cThorDispatcher  "


* -----  Start ----

LParameters lcPRGName, lxP1, lxP2, lxP3, lxP4, lxP5, lxP6, lxP7, lxP8, lxP9, lxP10

Local loGetThor As 'GetThorRun'
Local lcFile, lcFolder, lcSys16, lcThorApp, lcThorFolder, llFirst, llThorInkey, lnI, lnInkey, lnPopUpID
Local lnWindowOnTop, loLink, loPEME_Tools, loResult, loThorEngine, loThorInfo, loThorRun

lcThorApp = 'C:\PROGRAM FILES\MICROSOFT VISUAL FOXPRO 9\Thor'
lcThorApp = 'C:\PROGRAM FILES\MICROSOFT VISUAL FOXPRO 9\Thor.APP'
lcThorFolder = 'C:\PROGRAM FILES\MICROSOFT VISUAL FOXPRO 9\Thor\'

llThorInkey = .F.
If Empty (lcPRGName)
llThorInkey = .T.
lcPRGName = ''
Do While Chrsaw()
lnInkey = Inkey()
If lnInkey = 13
Exit
Endif
lcPRGName = lcPRGName + Chr (lnInkey)
EndDo
Endif

Do Case
Case Atc('Thor_', lcPrgName) = 1 
Return ExecuteThorProc(lcPRGName, lcThorFolder, llThorInkey, .F., Pcount(), @lxP1, @lxP2, @lxP3, @lxP4, @lxP5, @lxP6, @lxP7, @lxP8, @lxP9, @lxP10)

* Return Full Path
Case Atc([Full Path=], lcPrgName) = 1
lcFile         = GetFullFileName (Alltrim (Substr (lcPRGName, At ('=', lcPRGName) + 1)), lcThorFolder)
Return lcFile

Case Atc([Class=], lcPrgName) = 1
Return ExecScript(_Screen.cThorDispatcherClasses, lcPRGName, lcThorAPP, Pcount(), lxP1, lxP2, lxP3, lxP4, lxP5)

Case Atc([PopupID=], lcPrgName) = 1
loGetThor = Createobject ('GetThorRun')
loThorRun = loGetThor.GetThorRun (lcThorApp, lcThorFolder)
lnPopUpID = Val (Substr (lcPRGName, 1 + At ('=', lcPRGName)))
loThorRun.ExecutePopup (lnPopUpID, lcThorFolder, Set ('DataSession'))

Case Atc([Result=], lcPrgName) = 1
_Screen.xThorResult = lxP1
Return lxP1

***************
Case Empty (lcPRGName)
Do (lcThorApp) With 'Edit'

Case Atc([FORMRUNTOOL], lcPrgName) = 1
Do (lcThorApp) With 'FORMRUNTOOL'

Case Atc([?], lcPrgName) = 1
Return ExecScript(_Screen.cThorDispatcherHelp)

Case Atc([Run], lcPrgName) = 1
loGetThor = Createobject ('GetThorRun')
loThorRun = loGetThor.GetThorRun (lcThorApp, lcThorFolder)
loThorRun.Run()

Case Atc([Tool Folder=], lcPrgName) = 1
Return lcThorFolder + 'Tools\'

Case Atc([Version=], lcPrgName) = 1
Return [Thor - 1.30.25 - December 16, 2012]

Case Atc([Thor Engine=], lcPrgName) = 1
loThorEngine = FetchThorEngine(lcThorApp, lcThorFolder)
Return loThorEngine

Case Atc([Thor Register=], lcPrgName) = 1
loGetThor  = Createobject ('Getthorinfo')
loThorInfo = loGetThor.Getthorinfo (lcThorApp)
Return loThorInfo

Case Atc([Get Option=], lcPrgName) = 1
loThorEngine = FetchThorEngine(lcThorApp, lcThorFolder)
Return loThorEngine.GetOption(lxP1, lxP2)

Case Atc([Set Option=], lcPrgName) = 1
loThorEngine = FetchThorEngine(lcThorApp, lcThorFolder)
Return loThorEngine.SetOption(lxP1, lxP2, lxP3)

Case Atc([Thor Template Code=], lcPrgName) = 1
loGetThor  = Createobject ('Getthorinfo')
loThorInfo = loGetThor.Getthorinfo (lcThorApp)
Return loThorInfo.GetSampleToolCode()

Case Atc([Clear HotKeys], lcPrgName) = 1
Do (lcThorApp) With 'Clear HotKeys'

Case Atc([Toggle Debug Mode], lcPrgName) = 1
_Screen.lThorDebugMode = not _Screen.lThorDebugMode
Set Mark of Bar 6 of Menu_3O91D8DCH to _Screen.lThorDebugMode
If _Screen.lThorDebugMode
Set Asserts on
EndIf 

* Modify Tool
Case Atc([Edit=], lcPrgName) = 1
lcFile         = GetFullFileName (Alltrim (Substr (lcPRGName, At ('=', lcPRGName) + 1)), lcThorFolder)
If Empty (lcFile)
Return .Null.
Endif

Return ExecuteThorProc('Thor_Proc_EditProc', lcThorFolder, llThorInkey, .F., 2, lcFile)

* Show home page for tool
Case Atc([Link=], lcPrgName) = 1
lcFile         = GetFullFileName (Alltrim (Substr (lcPRGName, At ('=', lcPRGName) + 1)), lcThorFolder)
If Empty (lcFile)
Return .Null.
Endif

loThorInfo = Newobject ('ThorInfo', 'Thor_Utils.vcx', lcThorApp)
Do (lcFile) With loThorInfo
loThorInfo.PrgName = Justfname (lcFile)
loThorInfo.FullFileName = lcFile
If Empty (loThorInfo.Link)
loThorEngine = FetchThorEngine(lcThorApp, lcThorFolder)
Messagebox (loThorEngine.GetToolDescription (loThorInfo))
Else
loLink = Newobject ('_ShellExecute', Home() + 'FFC\_Environ.vcx')
loLink.ShellExecute (loThorInfo.Link)
Endif

* Get ToolInfo for tool
Case Atc([ToolInfo=], lcPrgName) = 1
loResult = .Null.
If Empty (lxP1) Or 'C' # Vartype (lxP1)
Return loResult
Endif

lcFile         = GetFullFileName (lxP1, lcThorFolder)
If Empty (lcFile)
Return loResult
Endif

Try
loThorInfo = Newobject ('ThorInfo', 'Thor_Utils.vcx', lcThorApp)
Do (lcFile) With loThorInfo
loThorInfo.PrgName = Justfname (lcFile)
loThorInfo.FullFileName = lcFile
loResult = loThorInfo
Catch

Endtry
Return loResult

* DoDefault
Case Atc([DoDefault()], lcPrgName) = 1
lcPRGName = ''
llFirst  = .F.
For lnI = Program (-1) To 1 Step - 1
lcSys16 = Sys(16, lnI)
Do Case
Case Upper (Getwordnum (lcSys16, 1)) = 'PROCEDURE'
Case Not llFirst
llFirst = .T.
Otherwise
lcPRGName = JustStem (lcSys16)
Exit
Endcase
Endfor

Return ExecuteThorProc (lcPRGName, lcThorFolder, llThorInkey, .T., Pcount(), @lxP1, @lxP2, @lxP3, @lxP4, @lxP5, @lxP6, @lxP7, @lxP8, @lxP9, @lxP10)

Otherwise
Return ExecuteThorProc(lcPRGName, lcThorFolder, llThorInkey, .F., Pcount(), @lxP1, @lxP2, @lxP3, @lxP4, @lxP5, @lxP6, @lxP7, @lxP8, @lxP9, @lxP10)

Endcase

Return


Procedure ExecuteThorProc
Lparameters lcPRGName, lcThorFolder, llThorInkey, llDoDefault, lnPCount, lxP1, lxP2, lxP3, lxP4, lxP5, lxP6, lxP7, lxP8, lxP9, lxP10, lcFileText

Local lcFullPRGName, lcParams, lnI
lcFullPRGName = GetFullFileName(lcPRGName, lcThorFolder, llDoDefault)
If Empty(lcFullPRGName)
Return .Null.
Endif

_Screen.lThorInkey = _Screen.lThorInkey Or llThorInkey
_Screen.xThorResult = .T.
Execscript(_Screen.cThorSavelog, lcFullPRGName)
If lnPCount < 2
lcParams = ''
Else
lcParams = 'with lxP1'
For lnI = 2 To lnPCount - 1
lcParams = lcParams + ', lxP' + Transform(lnI)
Endfor
Endif

Assert Not _Screen.lThorDebugMode Message 'Debug:     ' + Juststem(lcFullPRGName)
Do(lcFullPRGName) &lcParams

_Screen.lThorInkey = _Screen.lThorInkey And Type('llThorInkey') = 'L' And Not llThorInkey
Return _Screen.xThorResult
Endproc


Function GetFullFileName (lcPRGName, lcThorFolder, llDoDefault)
Local lcFile, lcFullPRGName1, lcFullPRGName2

If Empty(JustExt(lcPRGName)) 
lcFile = Forceext (lcPRGName, 'prg')
Else
lcFile = lcPRGName
EndIf 
lcFullPRGName1 = Forcepath (lcFile, lcThorFolder + 'Tools\' + 'My Tools')
lcFullPRGName2 = Forcepath (lcFile, lcThorFolder + 'Tools\' + 'Procs')
lcFullPRGName3 = Forcepath (lcFile, lcThorFolder + 'Tools\')
Do Case
Case File (lcFile) and not llDoDefault
lcFile = Fullpath (lcFile)
Case File (lcFullPRGName1) and not llDoDefault
lcFile = lcFullPRGName1
Case File (lcFullPRGName2)
lcFile = lcFullPRGName2
Case File (lcFullPRGName3)
lcFile = lcFullPRGName3
Otherwise
lcFile = ''
Endcase
Return lcFile
EndFunc

Function FetchThorEngine(lcThorApp, lcThorFolder)
Local loGetThor As 'GetThorEngine'
Local loThorEngine
If PemStatus(_Screen, 'oThorEngine', 5) and Vartype(_Screen.oThorEngine) = 'O'
loThorEngine = _Screen.oThorEngine
Else
loGetThor = Createobject('GetThorEngine')
loThorEngine = loGetThor.GetThorEngine(lcThorApp, lcThorFolder)
_Screen.AddProperty('oThorEngine', loThorEngine)
EndIf 
Return loThorEngine
Endfunc

Define Class GetThorRun As Session

    Procedure GetThorRun (lcThorApp, lcThorFolder)
        Return Newobject ('Thor_Run', 'thor_run.vcx', lcThorApp, lcThorApp, lcThorFolder)
    Endproc

Enddefine

Define Class GetThorEngine As Session

    Procedure GetThorEngine (lcThorApp, lcThorFolder)
        Return Newobject ('Thor_Engine', 'Thor.vcx', lcThorApp, lcThorFolder)
    Endproc

Enddefine

Define Class GetThorInfo As Session

    Procedure GetThorInfo (lcThorApp)
        Return Newobject ('ThorInfo', 'Thor_Utils.vcx', lcThorApp)
    Endproc

Enddefine

* -----  End ----


Warm regards,
mk.

mk sharma

unread,
Dec 22, 2012, 12:38:27 PM12/22/12
to FoxPr...@googlegroups.com
If i do _screen.cThorDispatcher=" "  in command window before QUIT  then there is no error.

Warm regards,
mk.




On Saturday, December 22, 2012 10:50:01 PM UTC+5:30, Jim wrote:

Jim

unread,
Dec 22, 2012, 12:59:15 PM12/22/12
to FoxPr...@googlegroups.com, FoxPr...@googlegroups.com
What is its length?

Sent from my iPhone

mk mk

unread,
Dec 22, 2012, 1:03:32 PM12/22/12
to FoxPr...@googlegroups.com
How to check length ?

Warm regards,
mk.

mk mk

unread,
Dec 22, 2012, 1:07:23 PM12/22/12
to FoxPr...@googlegroups.com
?len(_screen.cThorDispatcher)
8199

Warm regards,
mk.


On Sat, Dec 22, 2012 at 11:29 PM, Jim <jimrn...@gmail.com> wrote:

mk sharma

unread,
Dec 22, 2012, 1:20:37 PM12/22/12
to FoxPr...@googlegroups.com
?txtwidth(_screen.cThorDispatcher)
9866.400

Warm regards,
mk.

Jim Nelson

unread,
Dec 22, 2012, 1:27:10 PM12/22/12
to FoxPr...@googlegroups.com
MK --

This is a clear indication that the problem is occurring someplace else other than in any Thor code, as you have effectively disabled Thor by clearing that property of _Screen.

It seems like you must have something that executes when you shut down FoxPro and it is, for some reason unknown to me, looking at the properties of _Screen.

Jim Nelson
(805) 498-9195 (voice + fax)
(720) 837-3536 (cell)

Jim Nelson

unread,
Dec 22, 2012, 1:32:37 PM12/22/12
to FoxPr...@googlegroups.com
What a difference a few bytes makes -- mine is only 8,181.

In any case, I am below the magic number if 8,192 and you are above it.  Quite a coincidence.

However, for me, regardless of its length, (even if I add 1,000,000 blanks to it), I do not get the error you are reporting. Yet another indication that some other code is executing on your end.

In any case, it should not be too hard to prune that so that it does not cause you (or anybody else) problems like this.





Jim Nelson
(805) 498-9195 (voice + fax)
(720) 837-3536 (cell)


mk mk

unread,
Dec 22, 2012, 1:44:55 PM12/22/12
to FoxPr...@googlegroups.com
Nothing is running.
Nothing in Startup.
Just startted vfp9
 * In Command Window
clear all
close all
do thor
*  "Thor-Check for Updates"  and closed the widow that showing list of products.
?len(_screen.cThorDispatcher)
8199
?txtwidth(_screen.cThorDispatcher)
9866.200

Quit + Enter    and error message appear.  vfp closed after pressing 'Ok'

See the Image 

Warm regards,
mk.
thor2.jpg

mk sharma

unread,
Dec 22, 2012, 1:49:08 PM12/22/12
to FoxPr...@googlegroups.com
Problem only Appears after  "Check for Updates"

* in Command Window
do thor
quit + Enter   &&  vfp close without Error


* in Command Window
do thor
"Thor->Check for Updates"
quit + Enter   &&  Error Appears


Warm regards,
mk.

Jim Nelson

unread,
Dec 22, 2012, 1:49:19 PM12/22/12
to FoxPr...@googlegroups.com
This error has nothing to do with what is running nor what is happening at startup.

Instead, it has to do with what executes when you close FoxPro.  (I assume that that you have control over this, although I have never done so).

When you quit FoxPro, something executes  ("On Shutdown" comes to mind). The problem is occurring there -- not in any code that Thor is running.



Jim Nelson
(805) 498-9195 (voice + fax)
(720) 837-3536 (cell)


mk sharma

unread,
Dec 22, 2012, 2:04:37 PM12/22/12
to FoxPr...@googlegroups.com
I do not know what is running at the time of quit,  but  this error happens only after "Thor->Check for Updates"

How to check what is running at the time of quit ?

Warm regards,
mk.

mk sharma

unread,
Dec 22, 2012, 2:19:58 PM12/22/12
to FoxPr...@googlegroups.com
 * In Command Window
* 1  No Error
do thor
quit  + Enter  &&   No error

* 2 No Error
do thor
"thor->Check for Updates"
_screen.cThorDispatcher = "  "
quit  + Enter  &&   No error

* 3 Error  Here
do thor
"thor->Check for Updates"
quit  + Enter  &&   Error Here


Warm regards,
mk.

Jim

unread,
Dec 22, 2012, 2:22:14 PM12/22/12
to FoxPr...@googlegroups.com, FoxPr...@googlegroups.com
Mk

I have already responded in an earlier message that I will reduce the size of that property below 8192. 

This will fix whatever is going wrong in the program that is causing the error. 

Sent from my iPhone

Jim Nelson

unread,
Dec 22, 2012, 6:39:46 PM12/22/12
to FoxPr...@googlegroups.com
MK --

Please try Check For Updates to get the latest version of Thor.

Let me know if it takes care of this problem.



Jim Nelson
(805) 498-9195 (voice + fax)
(720) 837-3536 (cell)


mk mk

unread,
Dec 22, 2012, 8:56:20 PM12/22/12
to FoxPr...@googlegroups.com
Thank you,
Working perfect!

?len(alltrim(_screen.cThorDispatcher))
7765

Warm regards,
mk.

Mike Potjer

unread,
Jan 8, 2013, 2:03:57 PM1/8/13
to FoxPr...@googlegroups.com
* in the Command Window
? on('shutdown')

Mike Potjer

Tracy Pearson

unread,
Feb 25, 2019, 12:53:46 PM2/25/19
to Thor, the Tool Manager for FoxPro
Old thread. Same problem.
Start a VFP just from the original icon. No config.fpw, no code run.
DO C:\Work\Tools\Thor\Thor\Thor\RunThor.prg
Menu -> Thor -> Check for Udpates
Cancel, or Install Updates it doesn't matter

Click on the _Screen background
I get the error

Microsoft Visual FoxPro
OK
Help
Property 'cthordispatcher' value is too long.

?LEN(ALLTRIM(_Screen.cThordispatcher)) && 8319

Display Memory shows 
0 variables defined, 0 bytes used
16 Popups Defined

I have the Document View, Properties, and Data Session windows docked on the right side of the screen in tabs.
I have the Command window docked on the bottom beneath those.

This happens on 2 different workstations.
Reply all
Reply to author
Forward
0 new messages