Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ping: Richard Russell

50 views
Skip to first unread message

Auric__

unread,
Nov 17, 2011, 4:31:54 PM11/17/11
to
I just tried running your QB2BBC under Wine (Slackware Linux 13.37, kernel
2.6.37.6) and got this error:
Cannot create file C:\users\auric\Temp\BBCdba.tmp\..\lib\QBLIB.BBC

Similarly, I tried running Liberty Basic Booster, and got a similar error:
Cannot create file C:\users\auric\Temp\BBC590e.tmp\..\lib\LBLIBC.BBC

I don't know if this is a problem with Wine or BBC BASIC.
"C:\users\auric\Temp" is linked to a buried subdir in my home directory
(/home/auric/.wine/drive_c/users/auric/Temp) and I *do* have full r/w
permissions there; the runtime interpreter shows up just fine, as does the
.tmp dir (containing a 0-byte file called "$").

The Wine appdb has a page on BBC BASIC 5.91b here:
http://appdb.winehq.org/objectManager.php?sClass=version&iId=21754
Looks like there are some issues, but since Wine works on what Wine deems
important, the likelihood of this being resolved any time soon (or even at
all) is slim-to-none IMO.

I rather doubt that this is worth trying to fix, but I thought I should at
least let you know.

--
Please use a silencer when you blow her little freckled head off;
some of us are trying to sleep.

ne...@rtrussell.co.uk

unread,
Nov 17, 2011, 5:52:32 PM11/17/11
to
On Nov 17, 9:31 pm, "Auric__" <not.my.r...@email.address> wrote:
>   Cannot create file C:\users\auric\Temp\BBCdba.tmp\..\lib\QBLIB.BBC
>   Cannot create file C:\users\auric\Temp\BBC590e.tmp\..\lib\LBLIBC.BBC

The reason is bug 25207 in Wine:

http://bugs.winehq.org/show_bug.cgi?id=25207

BBC BASIC (and hence both QB2BBC and LB Booster) creates a
subdirectory as a side-effect of a call to SHFileOperation with the
FO_MOVE flag. This works in all versions of Windows, but Wine fails
to create the subdirectory.

I'm afraid I've rather given up on Wine. All the effort seems to go
into getting 'mainstream' programs to run; compatibility with Windows
per se is not considered a high priority. They seem to expect me to
modify my code to work around the Wine bugs; I'm not going to do that.

Richard.
http://www.rtrussell.co.uk/

Auric__

unread,
Nov 18, 2011, 3:10:32 AM11/18/11
to
ne...@rtrussell.co.uk wrote:

> On Nov 17, 9:31 pm, "Auric__" <not.my.r...@email.address> wrote:
>>   Cannot create file C:\users\auric\Temp\BBCdba.tmp\..\lib\QBLIB.BBC
>>   Cannot create file C:\users\auric\Temp\BBC590e.tmp\..\lib\LBLIBC.BBC
>
> The reason is bug 25207 in Wine:
>
> http://bugs.winehq.org/show_bug.cgi?id=25207

"not major"?! *THAT* is the official response? How hard can it be to write
such a trivial thing?
if not exist targetDir$
if (fFlags and FOF_NOCONFIRMMKDIR) then
x = true
else
x = inputbox ("create " & targetDir$ & "?", vbyesnocancel)
end if
if x then mkdir targetDir$
end if
Bam! 8 lines of pseudo VB; probably only take a dozen lines or so of
*real* code. (Maybe a bit more in C/C++, but not much.) Hell, I'll grab
the sources and see if *I* can do this.

> BBC BASIC (and hence both QB2BBC and LB Booster) creates a
> subdirectory as a side-effect of a call to SHFileOperation with the
> FO_MOVE flag. This works in all versions of Windows, but Wine fails
> to create the subdirectory.

I assume that means that *any* program that does so will fail under Wine,
then. Sigh.

> I'm afraid I've rather given up on Wine. All the effort seems to go
> into getting 'mainstream' programs to run; compatibility with Windows
> per se is not considered a high priority. They seem to expect me to
> modify my code to work around the Wine bugs; I'm not going to do that.

I don't blame you one bit. As I said, "Wine works on what Wine deems
important"; the mainstream stuff will please more people than the
lesser-known stuff. Oh, well. (Now I guess I need to test *all* of my
Windows stuff under Wine, see what fails, and update the "works with"
sections of the readmes...)

FWIW, QB2BBC & LBB are the first programs I've run under Wine that
flat-out fail (although the failure is really Wine's), but then, I don't
do anything "serious" under Wine, preferring either native Linux tools, or
switching to Windows. (I use Xnews, UltraEdit, PowerBASIC (as an IDE for
FreeBASIC), and Servant Salamander (file manager) under Wine, and while
they all have issues in varying degrees, they all work... for the most
part.)

--
It also has a tripod mount because, well, why not?

ne...@rtrussell.co.uk

unread,
Nov 18, 2011, 4:39:35 AM11/18/11
to
On Nov 18, 8:10 am, "Auric__" <not.my.r...@email.address> wrote:
> "not major"?! *THAT* is the official response?

It does irritate me that the *only* grounds for a bug being classed as
'major' appear to be that a large number of applications are
affected. It seems to me that there should be other criteria too -
for example a failure to implement behaviour documented by Microsoft
should be classed as more important than a failure to emulate an
undocumented feature of Windows.

> How hard can it be to write such a trivial thing?

There is a possible complication in that you may need to recursively
create subdirectories in order to reach the one you want to create.
That's why using SHFileOperation is such a convenient method, because
it does that automatically. However LBB and QB2BBC don't need the
recursive behaviour.

> FWIW, QB2BBC & LBB are the first programs I've run under Wine that
> flat-out fail (although the failure is really Wine's)

They don't do anything out-of-the-ordinary. The thing that makes them
fail is the inclusion of a library, so I would expect any compiled
BB4W program which includes a statement of the following kind to fail
under Wine:

INSTALL @lib$+"LIBRARY"

Perhaps your programs haven't relied on libraries for their operation,
or maybe you've appended the library code to your program rather than
INSTALLing it.

Richard.
http://www.rtrussell.co.uk/

Auric__

unread,
Nov 18, 2011, 3:45:27 PM11/18/11
to
"ne...@rtrussell.co.uk" <ne...@rtrussell.co.uk> wrote:

> On Nov 18, 8:10 am, "Auric__" <not.my.r...@email.address> wrote:
>> "not major"?! *THAT* is the official response?
>
> It does irritate me that the *only* grounds for a bug being classed as
> 'major' appear to be that a large number of applications are
> affected. It seems to me that there should be other criteria too -
> for example a failure to implement behaviour documented by Microsoft
> should be classed as more important than a failure to emulate an
> undocumented feature of Windows.

Very much agree, but I can also understand them doing it their way. I
guess.

>> How hard can it be to write such a trivial thing?
>
> There is a possible complication in that you may need to recursively
> create subdirectories in order to reach the one you want to create.
> That's why using SHFileOperation is such a convenient method, because
> it does that automatically. However LBB and QB2BBC don't need the
> recursive behaviour.

Well, I think that would be an extra 2 or 3 lines in the sources, in that
case. I checked out the current version from git last night; tonight I'll
dig thru it a bit and see what I can find.

>> FWIW, QB2BBC & LBB are the first programs I've run under Wine that
>> flat-out fail (although the failure is really Wine's)
>
> They don't do anything out-of-the-ordinary. The thing that makes them
> fail is the inclusion of a library, so I would expect any compiled
> BB4W program which includes a statement of the following kind to fail
> under Wine:
>
> INSTALL @lib$+"LIBRARY"
>
> Perhaps your programs haven't relied on libraries for their operation,
> or maybe you've appended the library code to your program rather than
> INSTALLing it.

I assume you mean runtime loading vs compile-time? Linking to a .dll vs
linking to a .lib (or .a or whatever)? If so, well, Xnews requires 13 DLLs,
while UltraEdit needs 20, and as far as I know, pretty much every Win32 app
needs at least user32, gdi32, & kernel32 -- so that can't be it. (I haven't
tried something like LoadLibrary, but I expect it to work.) (If you mean
something else, then sorry, I misunderstood.)

--
...and in her loathing and self-despair she found wrath.

ne...@rtrussell.co.uk

unread,
Nov 19, 2011, 6:49:56 AM11/19/11
to
On Nov 18, 8:45 pm, "Auric__" <not.my.r...@email.address> wrote:
> (If you mean something else, then sorry, I misunderstood.)

I mean using the BBC BASIC 'INSTALL' statement to install a BBC
library, as in the example I quoted. The presence of such a statement
in a program causes the BB4W compiler (by default) to embed the
library in the EXE. When the EXE is run the file is automatically
extracted and stored in a temporary directory. It's the creation of
that temporary directory which is failing under Wine.

I assumed from your comments that you were a BBC BASIC programmer, and
therefore familiar with the INSTALL statement. If not then the above
won't make any sense, but the point is that it's a feature most BBC
BASIC programs use, so the failure to run under Wine would be expected
to apply to most compiled BBC BASIC programs, not just LBB and QB2BBC.

In terms of the sheer number of programs affected that ought to be
persuasive to the Wine developers, but they would no doubt claim that
as they've never heard of any of the programs that doesn't count!

Richard.
http://www.rtrussell.co.uk/

Auric__

unread,
Nov 19, 2011, 6:54:53 PM11/19/11
to
ne...@rtrussell.co.uk wrote:

> On Nov 18, 8:45 pm, "Auric__" <not.my.r...@email.address> wrote:
>> (If you mean something else, then sorry, I misunderstood.)
>
> I mean using the BBC BASIC 'INSTALL' statement to install a BBC
> library, as in the example I quoted. The presence of such a statement
> in a program causes the BB4W compiler (by default) to embed the
> library in the EXE. When the EXE is run the file is automatically
> extracted and stored in a temporary directory. It's the creation of
> that temporary directory which is failing under Wine.

Ah, I see. Different behavior than any BASICs I use.

> I assumed from your comments that you were a BBC BASIC programmer, and
> therefore familiar with the INSTALL statement. If not then the above
> won't make any sense, but the point is that it's a feature most BBC
> BASIC programs use, so the failure to run under Wine would be expected
> to apply to most compiled BBC BASIC programs, not just LBB and QB2BBC.

I'm not a BBC BASIC programmer, simply because I'm not used to the syntax,
and haven't had a reason to learn it. (Yet. I recently acquired an old Z80
MSX machine; if I don't like the ROM BASIC, *and* I can get CP/M working,
then BBC BASIC is the only other BASIC I can find that'll work there.)

> In terms of the sheer number of programs affected that ought to be
> persuasive to the Wine developers, but they would no doubt claim that
> as they've never heard of any of the programs that doesn't count!

...sigh.

--
My brother is convinced that my driving habits will get me shot.

Auric__

unread,
Nov 19, 2011, 11:47:00 PM11/19/11
to
Well, I've spent some time looking into this, and (assuming I understand the
code correctly) it looks like it *SHOULD* be creating the directories. This
will take someone more familiar with C/C++ than me to fix, unfortunately;
I'm not even sure I'm reading it correctly.

In short (well, nothing short about this, but in summary):
- depending on declaration of SHFileOperation, possibly start with
SHFileOperationA, which calls SHFileOperationW
- SHFileOperationW calls copy_files
- copy_files calls create_dest_dirs
- create_dest_dirs calls SHNotifyCreateDirectoryW
- SHNotifyCreateDirectoryW calls CreateDirectoryW (kernel32)
- CreateDirectoryW calls NtCreateFile (ntdll)
- NtCreateFile calls FILE_CreateFile (ntdll) which does the actual work

If I'm reading the source correctly, FILE_CreateFile essentially asks the
system (the *actual* system -- Linux or whatever -- not another part of
Wine) to create the directory. So, from the initial call to
SHFileOperationW, to the actual creation of the directory, there's *at
least* 7 calls made (and possibly more; no guarantees I understand this
mess), any one of which might contain the problem.

--
If the law is not upheld equivalently it is worthless, as are its upholders.

ne...@rtrussell.co.uk

unread,
Nov 20, 2011, 5:32:27 AM11/20/11
to
On Nov 20, 4:47 am, "Auric__" <not.my.r...@email.address> wrote:
> Well, I've spent some time looking into this, and (assuming I understand the
> code correctly) it looks like it *SHOULD* be creating the directories.

Were you tracing the code for FO_MOVE or FO_COPY? I only ask because
of your comment:

> - SHFileOperationW calls copy_files

Possibly FO_MOVE, which is what affects BB4W, also calls
'copy_files' (i.e. it does the move by a copy-and-delete process) but
I don't know.

The Bugzilla entry contains the (C) source code and an executable
which demonstrates the bug, so perhaps by using that in conjunction
with a patched version of Wine you might be able to make progress.
Does the error code returned when the bug takes effect (1223) provide
any extra clues?

You will receive the gratitude of many BBC BASIC users if you manage
to resolve this issue!

Richard.
http://www.rtrussell.co.uk/

Auric__

unread,
Nov 20, 2011, 5:22:08 PM11/20/11
to
ne...@rtrussell.co.uk wrote:

> On Nov 20, 4:47 am, "Auric__" <not.my.r...@email.address> wrote:
>> Well, I've spent some time looking into this, and (assuming I understand
>> the code correctly) it looks like it *SHOULD* be creating the
>> directories.
>
> Were you tracing the code for FO_MOVE or FO_COPY? I only ask because
> of your comment:
>
>> - SHFileOperationW calls copy_files

Gah, dammit. That's what I get for doing this while tired. I was even
referring to the bugzilla entry while working on it. Sigh.

At least that explains why I couldn't find the problem. :-)

> Possibly FO_MOVE, which is what affects BB4W, also calls
> 'copy_files' (i.e. it does the move by a copy-and-delete process) but
> I don't know.
>
> The Bugzilla entry contains the (C) source code and an executable
> which demonstrates the bug, so perhaps by using that in conjunction
> with a patched version of Wine you might be able to make progress.
> Does the error code returned when the bug takes effect (1223) provide
> any extra clues?
>
> You will receive the gratitude of many BBC BASIC users if you manage
> to resolve this issue!

Ok... I think I've found the problem. The fix is *ONE SINGLE LINE ADDED*.
I'm about to compile and test; if it works, you get to send the patch in
(because I don't want "Auric__" associated with this; I'd use my real name,
but I *really* don't want "Auric__" associated with *that*, even obliquely).

This will probably take some time; I have to uninstall Wine first, and then
compile and test. A couple hours at a guess; more if it doesn't work the
first time. (This is not a fast machine, compared to modern computers.) If
it works, I'll post the patch here.

--
You are drinking someone else's grandma, just to get three heart back.

Auric__

unread,
Nov 20, 2011, 10:33:06 PM11/20/11
to
...and it's a bust. No dice. Sorry. As I suspected, someone else will have
to fix it.

--
What in the flying fuck...?
0 new messages