Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error Record Out of Range
Message
 
 
To
14/08/2018 09:28:13
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01661541
Message ID:
01661593
Views:
44
>>>>>>>If it were in the one of the other methods, that's what you'd see. That's why I suggested it's in code that isn't in a method. Are you capturing the whole call stack in your error log?
>>>>>>>
>>>>>>>Tamar
>>>>>>
>>>>>>Yes, the error log captures the entire call stack.
>>>>>
>>>>>And the offending line is...?
>>>>
>>>>The error log does not have line numbers. The program is compiled without the source.
>>>
>>>Actually wrong... you don't have the lines themselves, but the line numbers remain for VFP's internal reference. So start logging the lineno() - and then you can find the content of the line in the source from which you built.
>>
>>I just checked the actually error log on the customer server and all values of lineno() are 0 (zero). Here is the code that logs the call stack:
>>
>>
>>	ASTACKINFO(aStackArray)
>>	FOR i = ALEN(m.aStackArray, 1) - 1 To 1 Step - 1
>>		cStackArray = cStackArray + "<br>"
>>		cStackArray4Log = cStackArray4Log + CHR(13) + CHR(10) 
>>		cStackArray = cStackArray + CHR(13) + "Stack Level: " + ALLTRIM(STR(i)) + "<br>"
>>		cStackArray4Log = cStackArray4Log + CHR(13) + CHR(10) + "Stack Level: " + ALLTRIM(STR(i)) 
>>		cStackArray = cStackArray + CHR(13) + "Program: " + m.aStackArray(m.i, 2) + "<br>"
>>		cStackArray4Log = cStackArray4Log + CHR(13) + CHR(10) + "Program: " + m.aStackArray(m.i, 2) 
>>		cStackArray = cStackArray + CHR(13) + "Module : " + m.aStackArray(m.i, 3) + "<br>"
>>		cStackArray4Log = cStackArray4Log + CHR(13) + CHR(10) + "Module : " + m.aStackArray(m.i, 3) 
>>		cStackArray = cStackArray + CHR(13) + "Source : " + m.aStackArray(m.i, 4) + "<br>"
>>		cStackArray4Log = cStackArray4Log + CHR(13) + CHR(10) + "Source : " + m.aStackArray(m.i, 4) 
>>		cStackArray = cStackArray + CHR(13) + "Line   : " + TRANSFORM(m.aStackArray(m.i, 5)) + "<br>"
>>		cStackArray4Log = cStackArray4Log + CHR(13) + CHR(10) + "Line   : " + TRANSFORM(m.aStackArray(m.i, 5))
>>		cStackArray = cStackArray + CHR(13) + "Source : " + m.aStackArray(m.i, 6) + "<br>"
>>		cStackArray4Log = cStackArray4Log + CHR(13) + CHR(10) + "Source : " + m.aStackArray(m.i, 6) 
>>	NEXT 
>>
>>
>>Do you see what is wrong with the line above that stores the Line number?
>
>Probably nothing (except the space in "Line :" and other such places... ahem). I guess we stopped stripping the code out of our app long ago, exactly for debugging purposes and given that the size of the app and that it's vfp is pretty good deterrent against theft of code. Anyone who'd want to do that would have to spend at least a year to understand what's inside, and by that time he'd be broke :).
>
>BTW, what you're doing here is rather vebose... I prefer this:
>
>
		N=ASTACKINFO(aStk)
>
>		lcStk=""
>		lcStk = lcStk + TEXTMERGE("Call Stack at <<DTOS(DATE())>>.<<SECONDS()>>")+0h0d
>		FOR i=1 TO N-1
>			lcStk = lcStk + TEXTMERGE("<<aStk[i,1]>> <<aStk[i,3]>> in <<aStk[i,2]>>")+0h0d
>			lcStk = lcStk + TEXTMERGE("	<<TRANSFORM(aStk[i,5], [99999])>> <<aStk[i,6]>>")+0h0d
>		ENDFOR
>		lcStk = lcStk + 0h0d
>
Thus, it does come down to the fact that if the project does not have Debug Info checked, the line numbers are not included. And this is what I thought at the top of the thread.

I don't include the Debug info not because I am concerned about someone getting the source. I don't care. But the size of the EXE will be much greater. Currently (without the debug info) the exe is about 13.5 MB (13,5 for euro). I think I tested once including the debug info and the size almost doubled. Many of my users keep the exe on the server and load it from the desktop shortcut. Therefore, their load time will be doubled. Many ppl won't be happy.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform