Saving empty file in official IDE crashes the exec. envmt

(Updates to FBSL Editors, RAD and Related Stuff)

Saving empty file in official IDE crashes the exec. envmt

Unread postby maho5 » Mon Dec 10, 2007 2:33 am

Problem:
Only one file oppened in one single tab, file Untitled.fbs, file exists
select all
delete
Save
follows crash of execution environment (FBSL.exe)


Close
New
Only one file oppened in one single tab, file Untitled.fbs, file doe not exist
Save
file Untitled.fbs of size 0 is created
follows crash of execution environment (FBSL.exe)

System config:
Eclecta Editor 1.1.3 Final
Win XP SP2
FBSL 3.3.2.4
maho5
FBSL tiny seed
FBSL tiny seed
 
Posts: 22
Joined: Mon Dec 03, 2007 10:15 am
Location: Europe

Re: Saving empty file in official IDE crashes the exec. envm

Unread postby Gerome » Tue Dec 11, 2007 12:12 am

Hi,

Problem?

Solution :
Lines around 3745, we have these lines :
Code: Select all
      '======================================
      ' The edit control doesn't support linefeeds. They
      ' must be added manually otherwise FBSL won't be
      ' able to read the scripts.
      '======================================
            Alloc(pTemp, 2 * Len(buffer))
            CallAbsolute(AddLF, buffer, pTemp, 0, 0)


Now replace them with those ones :
Code: Select all

      '======================================
      ' The edit control doesn't support linefeeds. They
      ' must be added manually otherwise FBSL won't be
      ' able to read the scripts.
      '======================================
      If Len(buffer) > 0 Then
            Alloc(pTemp, 2 * Len(buffer))
            CallAbsolute(AddLF, buffer, pTemp, 0, 0)
        Else
            Clean pTemp
        End If


and tell me if it works fine :)
Yours,

(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
:: Full SETUP w. HELP 05th of December 2011 ::
http://www.fbsl.net/setup/FBSLv3.exe [full v3.4.10 installation pack]
http://www.fbsl.net/setup/FBSLv3bin.zip [minimal upgrade to v3.4.10]
Laissons les jolies femmes aux hommes sans imagination. / Let us leave pretty women to men without imagination.(M.Proust)
The success is a defeat for the one who does not want to dance any more! (H.F. Thiefaine)
User avatar
Gerome
FBSL Administrator
FBSL Administrator
 
Posts: 3149
Joined: Sat Mar 12, 2005 9:06 pm
Location: Paris -- France

Eclecta 1.1.3 - modded by maho5

Unread postby maho5 » Wed Dec 12, 2007 3:07 am

source code Eclecta 1.1.3 attached
bug above fixed

Plus mods:
New hotkeys in menu File and Format
Icon Check syntax in the toolbar added, order if icons changed
Icon Run compiled from the toolbar removed
Fix in automatic syntax check to better reflect recent changes in FBSL syntax

Unpack the .fbs file and put it to the folder where eclecta.fbs resides
Attachments
Eclecta)20071212003831.zip
(51.44 KiB) Downloaded 169 times
maho5
FBSL tiny seed
FBSL tiny seed
 
Posts: 22
Joined: Mon Dec 03, 2007 10:15 am
Location: Europe

Re: Eclecta 1.1.3 - modded by maho5

Unread postby Gerome » Wed Dec 12, 2007 10:23 am

Hi,
maho5 wrote:source code Eclecta 1.1.3 attached
bug above fixed

Plus mods:
New hotkeys in menu File and Format
Icon Check syntax in the toolbar added, order if icons changed
Icon Run compiled from the toolbar removed
Fix in automatic syntax check to better reflect recent changes in FBSL syntax

Unpack the .fbs file and put it to the folder where eclecta.fbs resides


Thanks for the mods!
They all work fine!
Yours,

(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
:: Full SETUP w. HELP 05th of December 2011 ::
http://www.fbsl.net/setup/FBSLv3.exe [full v3.4.10 installation pack]
http://www.fbsl.net/setup/FBSLv3bin.zip [minimal upgrade to v3.4.10]
Laissons les jolies femmes aux hommes sans imagination. / Let us leave pretty women to men without imagination.(M.Proust)
The success is a defeat for the one who does not want to dance any more! (H.F. Thiefaine)
User avatar
Gerome
FBSL Administrator
FBSL Administrator
 
Posts: 3149
Joined: Sat Mar 12, 2005 9:06 pm
Location: Paris -- France

Unread postby Codeman » Wed Dec 12, 2007 2:02 pm

another fix :
comment this part :
'Case "h", "H"
' '=======================================
' ' Hexadecimal number
' '=======================================
' If Right(RTrim(dst & token), 1) = "&" Then
' dst = RTrim(dst) & "H"
' Else
' token = token & nextchar
' End If
'
why ?
because if you wrote :

Code: Select all

Dim a ="hello"
dim hwnd =10
? a & Hwnd  'then press enter or check syntax
the line is set to :
? a &Hwnd  'witch is not good in fbsl syntax
User avatar
Codeman
FBSL Administrator
FBSL Administrator
 
Posts: 497
Joined: Sat Nov 24, 2007 4:33 pm
Location: France

Unread postby maho5 » Wed Dec 12, 2007 11:47 pm

Thank you, Codeman

Added, tested,
last version attached.

See instal instruction above.
Attachments
Eclecta)20071212223350.zip
(51.53 KiB) Downloaded 156 times
maho5
FBSL tiny seed
FBSL tiny seed
 
Posts: 22
Joined: Mon Dec 03, 2007 10:15 am
Location: Europe

Unread postby taobert » Thu Dec 13, 2007 4:18 pm

With this version // and /* */ (for comments) cause errors in FBSL (at runtime) whereas with the original version they cause errors only in the editor :?

On the other hand no more errors with the ;(semi-colons) ... it's 8)
User avatar
taobert
FBSL geek
FBSL geek
 
Posts: 318
Joined: Sun Oct 29, 2006 4:22 pm
Location: France (Nord)

Unread postby maho5 » Thu Dec 13, 2007 5:10 pm

taobert wrote:With this version // and /* */ (for comments) cause errors in FBSL (at runtime) whereas with the original version they cause errors only in the editor :?

On the other hand no more errors with the ;(semi-colons) ... it's 8)


Runtime crash usually only follows direct memory alloc. So it does not seem to be hiding the code.

I tested with this code:

Code: Select all
$AppType Console
/*Print "1"
Print "2" */
/ / Print "3"
Pause


This is after syntaxcheck/ autocompletion by the last modded eclecta.

No problem with stream comment on my machine. It hides the code.

Could you be using older fbsl platfrom? I am on 3.3.2.4.

I can confirm the // issue. But before patching this, we should ask Gerome.
Because this comment type is not officialy documented anymore, and has been commented out in all official examples.
maho5
FBSL tiny seed
FBSL tiny seed
 
Posts: 22
Joined: Mon Dec 03, 2007 10:15 am
Location: Europe

Unread postby Gerome » Thu Dec 13, 2007 6:40 pm

Hi,
maho5 wrote:
taobert wrote:With this version // and /* */ (for comments) cause errors in FBSL (at runtime) whereas with the original version they cause errors only in the editor :?

On the other hand no more errors with the ;(semi-colons) ... it's 8)


Runtime crash usually only follows direct memory alloc. So it does not seem to be hiding the code.

I tested with this code:

Code: Select all
$AppType Console
/*Print "1"
Print "2" */
/ / Print "3"
Pause


This is after syntaxcheck/ autocompletion by the last modded eclecta.

No problem with stream comment on my machine. It hides the code.

Could you be using older fbsl platfrom? I am on 3.3.2.4.

I can confirm the // issue. But before patching this, we should ask Gerome.
Because this comment type is not officialy documented anymore, and has been commented out in all official examples.


Mike's machine code ONLY supports single character remarks aka the ' sign.
We need to check what is really wrong with 2 consecutive // that are officially seen as remarks since few months, same applies to /* ... */ that is documented recently... Electa's editor is rather old compared to actual FBSL version, but anyway, everyone can actively participate to the corrections :)=

Enjoy FBSL!
Yours,

(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
:: Full SETUP w. HELP 05th of December 2011 ::
http://www.fbsl.net/setup/FBSLv3.exe [full v3.4.10 installation pack]
http://www.fbsl.net/setup/FBSLv3bin.zip [minimal upgrade to v3.4.10]
Laissons les jolies femmes aux hommes sans imagination. / Let us leave pretty women to men without imagination.(M.Proust)
The success is a defeat for the one who does not want to dance any more! (H.F. Thiefaine)
User avatar
Gerome
FBSL Administrator
FBSL Administrator
 
Posts: 3149
Joined: Sat Mar 12, 2005 9:06 pm
Location: Paris -- France

Unread postby taobert » Thu Dec 13, 2007 7:22 pm

maho5 wrote:I tested with this code:

Code: Select all
$AppType Console
/*Print "1"
Print "2" */
/ / Print "3"
Pause




Tested with this code too (with FBSL 3.32.4)=> OK it works on both editor with the same expected error message...

Sorry, it should be a bad testing before :oops:
User avatar
taobert
FBSL geek
FBSL geek
 
Posts: 318
Joined: Sun Oct 29, 2006 4:22 pm
Location: France (Nord)

Unread postby taobert » Thu Dec 13, 2007 7:25 pm

Gerome wrote:Hi,


Mike's machine code ONLY supports single character remarks aka the ' sign.
We need to check what is really wrong with 2 consecutive // that are officially seen as remarks since few months, same applies to /* ... */ that is documented recently... Electa's editor is rather old compared to actual FBSL version, but anyway, everyone can actively participate to the corrections :)=

Enjoy FBSL!


Yes, and thanks to Maho5 for his corrected version :)
User avatar
taobert
FBSL geek
FBSL geek
 
Posts: 318
Joined: Sun Oct 29, 2006 4:22 pm
Location: France (Nord)

Unread postby Codeman » Thu Dec 13, 2007 8:50 pm

try to modify the script mike this :

Code: Select all
      '=======================================
         ' Alien to the FBSL syntax
         '=======================================
         'If Instr("~`|;", nextchar) Then   'maho5
         If Instr("~`|", nextchar) Then 'maho5
            illegal = 2: illegalchar = nextchar
         End If
         Select Case nextchar
            Case Chr(34)
               LookUp(dst)
               dst = dst & nextchar
               docount = Not docount
               token = ""
            Case "/"
               LookUp(dst)
               dst = RTrim(dst) & IIf(Trim(dst) = "", "/", " /")
               OOC = FALSE
               token = ""
User avatar
Codeman
FBSL Administrator
FBSL Administrator
 
Posts: 497
Joined: Sat Nov 24, 2007 4:33 pm
Location: France

Unread postby Gerome » Fri Dec 14, 2007 12:44 am

Codeman wrote:try to modify the script mike this :



PERFECT!
Yours,

(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
:: Full SETUP w. HELP 05th of December 2011 ::
http://www.fbsl.net/setup/FBSLv3.exe [full v3.4.10 installation pack]
http://www.fbsl.net/setup/FBSLv3bin.zip [minimal upgrade to v3.4.10]
Laissons les jolies femmes aux hommes sans imagination. / Let us leave pretty women to men without imagination.(M.Proust)
The success is a defeat for the one who does not want to dance any more! (H.F. Thiefaine)
User avatar
Gerome
FBSL Administrator
FBSL Administrator
 
Posts: 3149
Joined: Sat Mar 12, 2005 9:06 pm
Location: Paris -- France

Unread postby Gerome » Sat Dec 15, 2007 10:48 pm

Mmmh...

Remove Codeman's mods and then around line 5253 replace existing the existing case with the following one :
Code: Select all
Case "/"
   LookUp(dst)
   If Right(RTrim(dst), 1) = "*" Then
      dst = RTrim(dst) & nextchar
   Else
        If nextchar = "/" Then
            dst = RTrim(dst) & nextchar
        Else
            dst = RTrim(dst) & " " & nextchar & " "
        End If
   End If
   token = ""


It should repair the problem noticed by Maho5 !
Yours,

(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
:: Full SETUP w. HELP 05th of December 2011 ::
http://www.fbsl.net/setup/FBSLv3.exe [full v3.4.10 installation pack]
http://www.fbsl.net/setup/FBSLv3bin.zip [minimal upgrade to v3.4.10]
Laissons les jolies femmes aux hommes sans imagination. / Let us leave pretty women to men without imagination.(M.Proust)
The success is a defeat for the one who does not want to dance any more! (H.F. Thiefaine)
User avatar
Gerome
FBSL Administrator
FBSL Administrator
 
Posts: 3149
Joined: Sat Mar 12, 2005 9:06 pm
Location: Paris -- France


Return to FBSL v3 Editors

Who is online

Users browsing this forum: No registered users and 1 guest

cron