FPT bug or not

This forum is meant for questions and discussions about the X# language and tools
User avatar
Horst
Posts: 331
Joined: Tue Oct 13, 2015 3:27 pm

FPT bug or not

Post by Horst »

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 ???
Attachments
tmp.zip
(173.23 KiB) Downloaded 82 times
FFF
Posts: 1571
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

FPT bug or not

Post by FFF »

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 :)

BTW, @Chris: found by chance: if i add a "wait" in front of the other code, i get a simple "Compilation failed" from Xide ;)
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Chris
Posts: 4854
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

FPT bug or not

Post by Chris »

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?

.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
FFF
Posts: 1571
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

FPT bug or not

Post by FFF »

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)
User avatar
Chris
Posts: 4854
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

FPT bug or not

Post by Chris »

Hi Karl,

Can you send me the new prg as it is now, caused this compiler error?

.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
FFF
Posts: 1571
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

FPT bug or not

Post by FFF »

Good morning!
Watch your spam ;)
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Chris
Posts: 4854
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

FPT bug or not

Post by Chris »

Hi Karl,

Got it, thanks! :)
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
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

FPT bug or not

Post by Karl-Heinz »

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

Code: Select all

FUNCTION Start( ) AS VOID
? "Done" 
RETURN

END FUNCTION

WAIT // <----  compilation failed 
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

Code: Select all

WAIT

FUNCTION Start( ) AS VOID
? "Done" 
RETURN

// END FUNCTION
- 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:

Code: Select all

FUNCTION Start( ) AS VOID
? "Done" 
RETURN
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
Attachments

[The extension viaef has been deactivated and can no longer be displayed.]

FFF
Posts: 1571
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

FPT bug or not

Post by FFF »

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...
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Chris
Posts: 4854
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

FPT bug or not

Post by Chris »

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?
WAIT_error.png
WAIT_error.png (16.21 KiB) Viewed 699 times
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply