Bug or Not ?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Elwin
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2013 6:45 pm

Bug or Not ?

Post by Elwin »

Uru - Ages Beyond Myst Demo works good enough to play completely in wine-1.3.20 but loses some of it's functionality and can't be completed in both wine-1.3.21 and wine-1.7.5. Disabling sound at the beginning of the game allows the game to be played completely in both wine-1.3.21 and wine-1.7.5.

The problem is in /dlls/msvcrt/file.c.

In wine-1.3.20 this is the line used to define the allowable number of open files.
static MSVCRT_FILE* MSVCRT_fstreams[2048];

In wine-1.3.21 and wine-1.7.5 these lines are used for the same purpose.
#define MSVCRT_MAX_FILES 2048
#define MSVCRT_FD_BLOCK_SIZE 32
static file_crit* MSVCRT_fstream[MSVCRT_MAX_FILES/MSVCRT_FD_BLOCK_SIZE];
static int MSVCRT_max_streams = 512, MSVCRT_stream_idx;

Changing the last to lines to the following will fix the problem.
static file_crit* MSVCRT_fstream[MSVCRT_MAX_FILES];
static int MSVCRT_max_streams = MSVCRT_MAX_FILES, MSVCRT_stream_idx;

The above mentioned program needed the values to be at least 1022 to play to completion
User avatar
dimesio
Moderator
Moderator
Posts: 13368
Joined: Tue Mar 25, 2008 10:30 pm

Re: Bug or Not ?

Post by dimesio »

Elwin
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2013 6:45 pm

Re: Bug or Not ?

Post by Elwin »

Thanks for the link but no, sound seems to be correct. The ogg and wave files sound the same except for the ones which are split into left and right files.

The issue is one of available resources. Just changing the two values from 1022 to 1021 allows the game to be played to the end but not completed. At the end the linking book on the pedestal has a gateway image but the closeup of the book doesn't.

The code as given has the maximum value for the index (512) larger than the size of the array (64).
This doesn't work unless this a dynamically allocated structure.
User avatar
dimesio
Moderator
Moderator
Posts: 13368
Joined: Tue Mar 25, 2008 10:30 pm

Re: Bug or Not ?

Post by dimesio »

File a bug.
Elwin
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2013 6:45 pm

Re: Bug or Not ?

Post by Elwin »

After corresponding with Piotr Caban, I changed only " static int MSVCRT_max_streams = 512, MSVCRT_stream_idx;" to "static int MSVCRT_max_streams = 1022, MSVCRT_stream_idx;" and the program worked properly.
Locked