BBC BASIC for SDL 2.0 version 1.08a released

New releases of BB4W and BBCSDL, and other updates, will be announced here
Leo
Posts: 13
Joined: Tue 03 Apr 2018, 16:45

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by Leo »

Incidentally, I think my "no failures in 36 attempts" may well be significant because when not using the bbsdl.bbc parameter, I've never made it past 8 attempts without a failure (average is about 6.5).
RichardRussell

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by RichardRussell »

Leo wrote: Sun 15 Dec 2019, 21:26 After 5 successful startups I got the command window and the SYS and PRINT gave fundamentally the same as Ken, ie :
C:\Program Files (x86)\BBC BASIC SDL\
You don't say whether that is correct but I'm assuming that it is, otherwise you would have shouted "Eureka!". So if SDL_GetBasePath is working (and of course we can't be sure that it was earlier, when it mattered!) that casts doubt on argv[0], but it seems highly unlikely that something so fundamental was incorrect.
Incidentally, I think my "no failures in 36 attempts" may well be significant
I would think so too, but (so far) we have only your experience (which suggests it does have an effect) and Svein's (who found it didn't, albeit that he was achieving it a different way) to guide us. I would like more feedback on whether adding an explicit parameter (either in the command line, or by editing the shortcut's properties; please try both) makes any difference.
Leo
Posts: 13
Joined: Tue 03 Apr 2018, 16:45

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by Leo »

I've now tried running in different ways with differing results.
The 'failure' cases showed a command window instead of the IDE.
In all the 'no failure' case, I ran the command 30 times.

1. Using bbcsdl.exe without parameter...

a) By clicking on the program file in a file manager (I tried 2 different FM's)
Fails in less than 7 attempts.

b) By running from a console window via command line
No failures!

2. Using a shortcut that includes the bbcsdl.bbc parameter

a) By clicking on the shortcut in a file manager
No failures

b) By running the shortcut via a command line
No failures

Your request to try direct command line is spot on. It works consistently from there.
This must mean that Windows 10 is doing something different from (eg) Win 7 on starting programs via mouse click.
(I don't see any failures on Windows 7)
mavison
Posts: 34
Joined: Tue 03 Apr 2018, 17:27

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by mavison »

I copied my shortcut, and on the copy added BBCSDL.BBC as a parameter, so I now have two shortcuts.
Double-clicking on the original fails about 1 in 5 times.
Double-clicking on the one with a parm has not failed in 25 tests.

When it failed, GetBasePath gave G:\BBCSDL\BBCSDL108a\ which is the diretory containing BBCSDL.exe etc.

Re: "multiple versions' vs "multiple instances" I really meant multiple instances. I thought I remembered some problems I had some time ago which you said were because I was running multiple instances of the IDE - something about temporary files? Are you saying it is now safe to run multiple instances of the SDLIDE?
RichardRussell

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by RichardRussell »

mavison wrote: Mon 16 Dec 2019, 18:39Are you saying it is now safe to run multiple instances of the SDLIDE?
Well, it was always the intention that you can, since it's useful (for example) to be able to copy-and-paste code from one IDE into another. You can see from the code itself that it was specifically designed with this capability in mind:

Code: Select all

        SYS "SDL_GetPerformanceCounter" TO N%%
        Session$ = STR$(N%% AND &7FFFFFF)
This creates a unique (per session) string that is used as a filename prefix, for example:

Code: Select all

      F% = OPENIN(@tmp$ + "undo" + Session$ + STR$ul% + ".tmp.bbc")
So I'm sure I won't have said that you can't run multiple instances. However there are some things that you shouldn't do, or if you do you may experience 'unexpected' results. One of those is to run a program in Debug or Profile mode if multiple instances of SDLIDE are open, because all the instances are likely to think they should display the List Variables window or Profiler Report!

Of course it being the intention that multiple instances can be run is not the same thing as it actually working as intended! It's entirely possible that there are bugs in SDLIDE that result in problems arising. If you encounter any such issues please report them.

Sadly, there seems to be a reluctance to report any problems to me. This is either because people think I am infallible (ridiculous but flattering) or that they fear my reaction if they do (more likely). I would just like to remind everyone that my posts here are moderated, so if you are reluctant to report problems for fear of receiving an insulting or abrasive reply, the moderator(s) ought to protect you by blocking it.
mavison
Posts: 34
Joined: Tue 03 Apr 2018, 17:27

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by mavison »

Re: So I'm sure I won't have said that you can't run multiple instances.

Sorry, but on (old) thread BBCSDL error 192 on Windows « Reply #6 on: Feb 23rd, 2017, 4:40pm »you said:
This may be reading too much into your comment, but the reference to "SDLIDE window(s)" prompts me to point out that SDLIDE is most definitely not compatible with having more than one instance running, so if you are ever tempted to start a second instance of SDLIDE, don't!

I am now confused!
RichardRussell

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by RichardRussell »

mavison wrote: Mon 16 Dec 2019, 22:41I am now confused!
That was written nearly three years ago! I was pretty sure that the Session$ variable had been there from the start, but my dementia means that my memory cannot be trusted: I might not accurately recall something that happened a week ago, let alone three years! So perhaps I added it after you raised the issue rather than before.

Only a few days ago I confidently stated here that dlglib.bbc polls the mouse rather than using ON MOUSE, that is what my memory told me. But on examining the code it proved to be completely false. A short while later I stated, with equal confidence, that the distinction between a Click and a Drag was determined solely by a timer; that turned out to be wrong too.

Fortunately you have a much more reliable source of information available, the code itself! The reference to Session$ there (please check it rather than taking my word) proves that SDLIDE is at least intended to support multiple instances, even if it doesn't in practice.

You will not be troubled by my worthless answers for much longer.
RichardRussell

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by RichardRussell »

mavison wrote: Mon 16 Dec 2019, 18:39 Double-clicking on the one with a parm has not failed in 25 tests.
We really need to hear from Svein again. He found that adding the parameter didn't help, so I wonder what is different in his setup.

If you have found a workaround that is effective for you, that's great.
svein
Posts: 58
Joined: Tue 03 Apr 2018, 19:34

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by svein »

Ok, new attempt.
From Linux thru Remmina to Windows 10 pc.

1. Download bbcsdl,extract to downloads,shortcut to desktop,click on shortcut,select sdlide and checkbox, failing as before.
2. Add bbcsdl.bbc to shortcut, better but still failing.
3. Extract to ProgramFiles(x86)/bbcsdl, new shortcut to desktop, same tests and results as above.
4. Deleting all content in /appdata/local/temp and /appdata/roaming/bbcbasic and the two bbcsdl folders created.
5. Repeat point 1, same result
6. Repeat point 2, no fails in 20 attempts !!
7. Opening several windows as i usually do, one running, one running in debug mode, opening several new ones, no fails apart from the distorted graphics.
8. Removed bbcsdl.bbc from shortcut, needed 4 clicks before sdlide opened.
9. Add bbcsdl.bbc to shortcut, no fails in 20 attempts.

Note: From the very first attempt, the graphics in sdlide was messed up, most of the toolbar consisted of grey unresponsive squares and the ide background was black until i typed something. Cut and paste icons appeared when i selected some lines and went away when i removed the selection.
Maybe a result of remote desktop connection ?

I'll make a new attempt when i get to a windows pc, it may however not be before after new year.

Svein
svein
Posts: 58
Joined: Tue 03 Apr 2018, 19:34

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by svein »

>the graphics in sdlide was messed up<

I can confirm this to be a result of remote desktop connection.

Svein