Page 12 of 24 FirstFirst ... 2101112131422 ... LastLast
Results 111 to 120 of 236

Thread: thinBasic 1.11.x.x

  1. #111
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10
    Quote Originally Posted by DirectuX View Post
    update:

    sSFile = Dialog_OpenFile(hDlg, "Source file", DIR_GetCurrent, "All Files (*.*)|*.*" , "*", %OFN_FILEMUSTEXIST)
    sDpath = Dialog_BrowseForFolder(hDlg, "Destination folder", DIR_GetCurrent, %TRUE) & FILE_PathSplit(sSFile, %Path_FileExt)
    
      mbresult = MsgBox 0, sSFile & $crlf & "will be copied to" & $crlf & sDpath, %MB_OKCANCEL
    
      if mbresult <> %IDOK Then
        MsgBox 0, "Aborting demo"
        Stop
      endif
    
    runs well in thinAir, but when in thinDebug, it stops on an error :

    Attachment 10145
    I tried and here it seems working fine
    Only problem I saw is that Dialog_BrowseForFolder function seems not adding a trailing "\"

    Maybe copy/paste problem from web page?
    Capture.PNG

    I will try to check what is causing that copy/paste problem, maybe a unicode char is inserted like end of line or end of paragraph
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  2. #112
    Member DirectuX's Avatar
    Join Date
    Oct 2018
    Location
    France
    Posts
    417
    Rep Power
    55
    Quote Originally Posted by ErosOlmi View Post
    Maybe copy/paste problem from web page?
    It's my own typed code.


    Quote Originally Posted by ErosOlmi View Post
    I tried and here it seems working fine
    Did you try with F8 in thinDebug ?, it's were it bugs.

    Quote Originally Posted by ErosOlmi View Post
    I will try to check what is causing that copy/paste problem, maybe a unicode char is inserted like end of line or end of paragraph
    yeah told so in a previous post, it looked like the issue came from carriage returns.
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  3. #113
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10
    Yes, I executed in debug step by step with F8
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  4. #114
    Member DirectuX's Avatar
    Join Date
    Oct 2018
    Location
    France
    Posts
    417
    Rep Power
    55
    Then I don't know what's wrong.
    I'll try to find out this w-e.

    Edit : when I comment out this part of code, the debugger finds and error lower, again commenting out the lower error leads me deeper in the code...and so on. Seems thinDebug doesn't locate accurately what is bothering it. It will take longer to find the incriminated line.
    Last edited by DirectuX; 28-03-2020 at 13:17.
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  5. #115
    Member DirectuX's Avatar
    Join Date
    Oct 2018
    Location
    France
    Posts
    417
    Rep Power
    55
    'Modeless 
    CONTROL ADD BUTTON  , hDlg, %button1,"Start COPY",  65,  420,  45, 20
    
    Commenting out this line removes the error. Eros, did you change something to the buttons ?
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  6. #116
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10
    No, didn't change anything in that area.
    I'm working mostly in thinAir

    Can you send me a complete code example giving error so I can test it?
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  7. #117
    Member DirectuX's Avatar
    Join Date
    Oct 2018
    Location
    France
    Posts
    417
    Rep Power
    55
    Quote Originally Posted by ErosOlmi View Post
    No, didn't change anything in that area.
    I'm working mostly in thinAir

    Can you send me a complete code example giving error so I can test it?
    Conversation continued in the asynchronous-file-operations thread.
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  8. #118
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10
    Debugging a script that use an user interface message pump can create false runtime errors.

    Problem is related to the fact that windows message pump is too intense to be trapped correctly so parsing of script at runtime can jump into script position different from the one expected by thinBasic Core Engine.

    Windows events are fired asynchronously and stopping them at runtime by the debugger move parsing position in a place that Core do not expect.

    I do not know if I will be able to solve this for the moment with current thinBasic Core structure that is single thread parsing.
    The only way I see to solve this situation it to have different parsing threads working at the same time: one for Core engine and others for windows/controls events each working separately with a script pointer different for each one.

    Will think about that.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  9. #119
    Member DirectuX's Avatar
    Join Date
    Oct 2018
    Location
    France
    Posts
    417
    Rep Power
    55
    Quote Originally Posted by ErosOlmi View Post
    Debugging a script that use an user interface message pump can create false runtime errors.

    Problem is related to the fact that windows message pump is too intense to be trapped correctly so parsing of script at runtime can jump into script position different from the one expected by thinBasic Core Engine.

    Windows events are fired asynchronously and stopping them at runtime by the debugger move parsing position in a place that Core do not expect.

    I do not know if I will be able to solve this for the moment with current thinBasic Core structure that is single thread parsing.
    The only way I see to solve this situation it to have different parsing threads working at the same time: one for Core engine and others for windows/controls events each working separately with a script pointer different for each one.

    Will think about that.
    If the problem is known, it's half ok.


    "a script that use an user interface message pump"
    Does it mean modeless only ? Because the second example is modal and has the error too.
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  10. #120
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10
    Yes all.

    And error can or cannot occurs randomly depending on messages sent to/from the script.
    Maybe I will find a way to solve without recoding thinBasic from the ground up removing some events only when script is under debugging.
    It would be similar to Visual Designers that remove events when in visual editing.

    Will see.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

Page 12 of 24 FirstFirst ... 2101112131422 ... LastLast

Members who have read this thread: 1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •