FPT bug or not
FPT bug or not
Hello
I am using dbAdministrator Lite 3.27 to work with dbf's and in the last months i allways had trouble to make modify structure with this tool on 2 files i allways use. When i tried to change the structure the Administaror crashed and said the FPT file is corrupt.
While the dbf was used all the time , there was no missing data and all works normal.
Now i found out why the tool is crashing.
I am recycling the records in this dbf and i write SELF:FIELDPUT (nCnt,"") into the Memofield to make it empty.
After that my dbf tool cant modify the structure of the dbf anymore.
I tried the same with VO2.7 and i can still use my dbf tool.
So there is a different between X# and VO and i dont know the side effects so i am a little bit scared.
Horst
btw
DO CASE
CASE SELF:FieldInfo(DBS_TYPE, nCnt) = "C" ; SELF:FIELDPUT (nCnt," ")
CASE SELF:FieldInfo(DBS_TYPE, nCnt) = "L" ; SELF:FIELDPUT (nCnt,FALSE)
CASE SELF:FieldInfo(DBS_TYPE, nCnt) = "M" ; SELF:FIELDPUT (nCnt,Space (10)) // Test geändert von "" auf space (10)
CASE SELF:FieldInfo(DBS_TYPE, nCnt) = "N" ; SELF:FIELDPUT (nCnt,0)
CASE SELF:FieldInfo(DBS_TYPE, nCnt) = "D" ; SELF:FIELDPUT (nCnt,CToD (""))
ENDCASE
Here is a switch the better solution right ???
I am using dbAdministrator Lite 3.27 to work with dbf's and in the last months i allways had trouble to make modify structure with this tool on 2 files i allways use. When i tried to change the structure the Administaror crashed and said the FPT file is corrupt.
While the dbf was used all the time , there was no missing data and all works normal.
Now i found out why the tool is crashing.
I am recycling the records in this dbf and i write SELF:FIELDPUT (nCnt,"") into the Memofield to make it empty.
After that my dbf tool cant modify the structure of the dbf anymore.
I tried the same with VO2.7 and i can still use my dbf tool.
So there is a different between X# and VO and i dont know the side effects so i am a little bit scared.
Horst
btw
DO CASE
CASE SELF:FieldInfo(DBS_TYPE, nCnt) = "C" ; SELF:FIELDPUT (nCnt," ")
CASE SELF:FieldInfo(DBS_TYPE, nCnt) = "L" ; SELF:FIELDPUT (nCnt,FALSE)
CASE SELF:FieldInfo(DBS_TYPE, nCnt) = "M" ; SELF:FIELDPUT (nCnt,Space (10)) // Test geändert von "" auf space (10)
CASE SELF:FieldInfo(DBS_TYPE, nCnt) = "N" ; SELF:FIELDPUT (nCnt,0)
CASE SELF:FieldInfo(DBS_TYPE, nCnt) = "D" ; SELF:FIELDPUT (nCnt,CToD (""))
ENDCASE
Here is a switch the better solution right ???
- Attachments
-
- tmp.zip
- (173.23 KiB) Downloaded 72 times
FPT bug or not
Horst,
first: i hope this is play-data - you are aware, that there quite a lot of address data you put here in the wild?
second: does your sample run for you? Here i get a crash with a "X#-Error", unless i comment the "close databases" command.
third: yes, also my cmVODBx32 sees corruption, that's for the wise to find out...
fourth: why bother with recycling? I'd call a Pack() every now and then![Smile :)](https://dt9qzg9h465rt.cloudfront.net/phpBB3/images/smilies/icon_e_smile.gif)
BTW, @Chris: found by chance: if i add a "wait" in front of the other code, i get a simple "Compilation failed" from Xide![Wink ;)](https://dt9qzg9h465rt.cloudfront.net/phpBB3/images/smilies/icon_e_wink.gif)
first: i hope this is play-data - you are aware, that there quite a lot of address data you put here in the wild?
second: does your sample run for you? Here i get a crash with a "X#-Error", unless i comment the "close databases" command.
third: yes, also my cmVODBx32 sees corruption, that's for the wise to find out...
fourth: why bother with recycling? I'd call a Pack() every now and then
![Smile :)](https://dt9qzg9h465rt.cloudfront.net/phpBB3/images/smilies/icon_e_smile.gif)
BTW, @Chris: found by chance: if i add a "wait" in front of the other code, i get a simple "Compilation failed" from Xide
![Wink ;)](https://dt9qzg9h465rt.cloudfront.net/phpBB3/images/smilies/icon_e_wink.gif)
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
FPT bug or not
Hi Horst,
Thanks, I see the problem, will log this for Robert to look into it. In the meantime, please put a space, instead of an empty string to the memo field.
Karl, not sure what you mean, where did you pit the wait?
.
Thanks, I see the problem, will log this for Robert to look into it. In the meantime, please put a space, instead of an empty string to the memo field.
Karl, not sure what you mean, where did you pit the wait?
.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
FPT bug or not
I used Horst's "descend" sample app, pasted the new start, and commented the old code a bit sloppy, so the "wait" stayed active...
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
FPT bug or not
Hi Karl,
Can you send me the new prg as it is now, caused this compiler error?
.
Can you send me the new prg as it is now, caused this compiler error?
.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
FPT bug or not
Hi Karl,
Got it, thanks!![Smile :)](https://dt9qzg9h465rt.cloudfront.net/phpBB3/images/smilies/icon_e_smile.gif)
But I can't reproduce the problem, I get a normal parser error message for the WAIT outside of an entity here.
Maybe it's something to do with the new build, please give it a test again if you can when the new build gets released.
.
Got it, thanks!
![Smile :)](https://dt9qzg9h465rt.cloudfront.net/phpBB3/images/smilies/icon_e_smile.gif)
But I can't reproduce the problem, I get a normal parser error message for the WAIT outside of an entity here.
Maybe it's something to do with the new build, please give it a test again if you can when the new build gets released.
.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
FPT bug or not
Hi Chris,
- i don´t know how Karl´s sample exactly looks like, but i can still reproduce the "compilation failed" error with 2.11.0.1
when i use instead of WAIT another simple command like SKIP USE CLOSE QUIT PACK REINDEX RECALL or ZAP, the same "compilation failed" msg is thrown.
- This code produces an:
error XS0111: Type 'XSharpError2.Exe.Functions' already defines a member called 'Start' with the same parameter types
- Another ( strange ) problem: While deleting/adding code in a viaef i suddenly see the error:
XS5001: Program does not contain a static 'Start' function suitable for an entry point Compilation failed (1 error)
the only code in the viaef is:
i doesn´t matter if i choose the fox or VO dialect. Do you see the same error when you try to compile the attached viaef ?
regards
Karl-Heinz
- i don´t know how Karl´s sample exactly looks like, but i can still reproduce the "compilation failed" error with 2.11.0.1
Code: Select all
FUNCTION Start( ) AS VOID
? "Done"
RETURN
END FUNCTION
WAIT // <---- compilation failed
- This code produces an:
error XS0111: Type 'XSharpError2.Exe.Functions' already defines a member called 'Start' with the same parameter types
Code: Select all
WAIT
FUNCTION Start( ) AS VOID
? "Done"
RETURN
// END FUNCTION
XS5001: Program does not contain a static 'Start' function suitable for an entry point Compilation failed (1 error)
the only code in the viaef is:
Code: Select all
FUNCTION Start( ) AS VOID
? "Done"
RETURN
regards
Karl-Heinz
- Attachments
-
[The extension viaef has been deactivated and can no longer be displayed.]
FPT bug or not
Karl-Heinz,
i see your error, too.
The only difference, i get the error XS5001: Program does not contain a static 'Start' function suitable for an entry point in all cases you presented...
i see your error, too.
The only difference, i get the error XS5001: Program does not contain a static 'Start' function suitable for an entry point in all cases you presented...
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
FPT bug or not
Guys,
The problem with the Start() function is that the option "Response file only" in the app properties (General tab) is checked. This option does not pass any .prg files (neither compiler options like /lb /vo etc) to the compiler for compiling and expects you do it manually by putting the command line in the general compiler options textbox, typically using a "response file", an external file that contains the full compiler input. In this case nothing is passed to the compiler, so Start() was not found either. Guess it would be better if the compiler reported something like "no files passed in the command line"
About the "WAIT" problem, that's strange, here I always get a helpful compiler error message. Are you guys surely using the latest build? Maybe there's a more helpful message in the Output window?
The problem with the Start() function is that the option "Response file only" in the app properties (General tab) is checked. This option does not pass any .prg files (neither compiler options like /lb /vo etc) to the compiler for compiling and expects you do it manually by putting the command line in the general compiler options textbox, typically using a "response file", an external file that contains the full compiler input. In this case nothing is passed to the compiler, so Start() was not found either. Guess it would be better if the compiler reported something like "no files passed in the command line"
About the "WAIT" problem, that's strange, here I always get a helpful compiler error message. Are you guys surely using the latest build? Maybe there's a more helpful message in the Output window?
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu