[Bug 29582] New: Star Wars Battlefront (I and II) "Loading" screen very slow.

classic Classic list List threaded Threaded
58 messages Options
123
Reply | Threaded
Open this post in threaded view
|

[Bug 29582] New: Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=29582

             Bug #: 29582
           Summary: Star Wars Battlefront (I and II) "Loading" screen very
                    slow.
           Product: Wine
           Version: 1.3.36
          Platform: x86-64
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: -unknown
        AssignedTo: [hidden email]
        ReportedBy: [hidden email]
    Classification: Unclassified


The "Loading" screen takes so long (in SW Battlefront II) that I can't connect
to network games because when it finally finishes loading the level, I get a
message that says "lost connection to host" (presumably because it timed out).
I haven't timed it, but it seems to be about 2 minutes, whereas running it on
windows takes roughly 5-10 seconds.

WINEDEBUG=+relay did show that PeekMessageA was being called about 2700 times a
second (probably not a big deal) but then GetForgroundWindows was being called
right after that (a wineserver call).  I suspected that as a possible culprit,
but haven't dug in too deeply yet.

I'll do some profiling on this later and try to get some better info.  Maybe I
can find a hack-around to positively isolate the cause.

--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=29582

--- Comment #1 from Daniel Santos <[hidden email]> 2012-01-09 21:31:49 CST ---
Oh, I forgot to mention that aside from the progress bar having nothing to do
with reality (i.e., it doesn't appear to reflect the actual status of the
"loading", rather it just progresses a tick every second until it's full), the
GUI is flawless during this slow loading, updating very prettily making the
program look like it's doing plenty (just like "loading" screens are supposed
to do).  Also, there is very little disk activity, but one CPU is at 100%.

--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=29582

--- Comment #2 from Daniel Santos <[hidden email]> 2012-01-11 00:49:17 CST ---
Created attachment 38323
  --> http://bugs.winehq.org/attachment.cgi?id=38323
sad little hack for swbf2 loading performance probs

fuck!  (sorry for the language)  These programmers are fucking idiots!

I injected a hack and decreased loading times to about 30% of what it was
taking before (still not as fast as on windows).  Basically, all it does is
when PeekMessageX is called and no messages are returned, it sets a timer to
prevent it from making the wineserver call again for 1 millisecond.  Also,
calls to GetForgroundWindow return a cached value (this part has a minor bug in
it, but works enough for the test).  The synopsis?  It makes unneeded calls to
PeekMessageA and GetForgroundWindow 24k per second each!

So I guess we're dealing with a special ed case here.

--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=29582

--- Comment #3 from Daniel Santos <[hidden email]> 2012-01-13 01:44:28 CST ---
hmm, it would appear that this can actually be due to a failed call to
SetFilePointer where the return value appears to be ignored by the app.  The
GUI thread 0x0009 appears to interact with thread 0x0023 for loading data and
signaling each other back and forth.  It would appear that the GUI thread is
supposed to be waiting for something to happen, but thread 0x23 signals their
semephore and leaves it that way, leading the GUI thread to burn the CPU
hitting PeekMessageA, GetForegroundWindow

waiting for

Note: due to an incomplete timestamp mod, timestamps on trace statements (in
milliseconds) are roughly 49.25 seconds behind other timestamps (which are in
microseconds) and server traces are timestamp-less.

708.860908:0023:Call
KERNEL32.SetFilePointer(000000e0,00000000,00000000,00000000) ret=0067ad93
758.129:0023:trace:ntdll:NtSetInformationFile
(0xe0,0x6d2e8f8,0x6d2e8f0,0x00000008,0x0000000e)
0023: get_handle_fd( handle=00e0 )
0023: *fd* 00e0 -> 34
0023: get_handle_fd() = 0 { type=1, cacheable=1, access=00120089,
options=00000068 }
708.860934:0023:Ret  KERNEL32.SetFilePointer() retval=00000000 ret=0067ad93
708.860940:0023:Call
KERNEL32.ReadFile(000000e0,04a07800,00020000,06d2ea04,00000000) ret=0067adbb
758.129:0023:trace:file:ReadFile 0xe0 0x4a07800 131072 0x6d2ea04 (nil)
758.129:0023:trace:ntdll:NtReadFile
(0xe0,(nil),(nil),(nil),0x6d2e908,0x4a07800,0x00020000,(nil),(nil)),partial
stub!
758.129:0023:trace:ntdll:NtReadFile = SUCCESS (131072)
708.861018:0023:Ret  KERNEL32.ReadFile() retval=00000001 ret=0067adbb

It's after this that it begins cycling on PeekMessageA, GetForegroundWindow,
WaitForSingleObject and ReleaseSemephore.  It doesn't do it forever, after some
time, it proceeds, but this is one place that it transitions from apearing to
behave normally to definitely misbehaving.

I'm not yet sure why the call to SetFilePointer failed.  I believe this call
should have caused it to seek to the beginning of the file (where the file
pointer should have already been since it was just opened).

--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=29582

--- Comment #4 from Daniel Santos <[hidden email]> 2012-01-14 01:49:07 CST ---
well, it would appear that I'm wrong about the call the call to SetFilePointer
-- it returned zero because that was the low-order of the file pointer position
(oops).  Either way, the app definitely enters a race condition of some sort.
In another sample, I found a thread spinning calling WaitForSingleObject on a
semaphore followed by ReleaseSemaphore on that same handle for about a solid
second.  Isolating the root cause (from Wine's end of it) of this race
condition looks pretty difficult.

Also, I was slightly off on my numbers.  My hack only reduced load time by
about 45%.  Normally it takes about 80 seconds to load and the hack reduced it
to 45 seconds.  Setting the misbehaving thread's priority lower doesn't help
because that thread appears to be what opens the data files (that are
"loaded"), even though it passes those handles off to another thread to
actually read them (strange).  It appears to be the coordination between those
two threads that's going awry.

--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=29582

Maxime Alves <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #5 from Maxime Alves <[hidden email]> 2012-03-19 17:23:38 CDT ---
Same situation here, only installed vcrun to make the game work, but the
loading screen last like 5 minutes.
The only log messages I get are :

fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:wined3d_buffer_preload Too many declaration changes or converting
dynamic buffer, stopping converting
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.

distro : debian squeeze i386
wine version : 1.4

--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=29582

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=29582

Jonathan Haller <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |one.who.stands.alone@gmail.
                   |                            |com

--- Comment #6 from Jonathan Haller <[hidden email]> 2012-10-02 14:18:00 CDT ---
Same situation here, xubuntu 12.04 AMD64, wine 1.5.14.  I am surprised nobody
has confirmed this yet...

The game not working online is solely due to the servers dropping the
connection since the client takes so long to load, for swbfront2 this is a
fairly critical bug.

--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=29582

--- Comment #7 from Daniel Santos <[hidden email]> 2012-10-03 12:40:51 CDT ---
> The game not working online is solely due to the servers dropping the
> connection since the client takes so long to load, for swbfront2 this is a
> fairly critical bug.

Yeah, that was my point, despite so much working in this game, this bug makes
removes a full half of its functionality.

The silly part of this is that the app appears to be beating its self to death
on something other than loading, thus starving the thread that's actually
trying to do the loading.  Or, if the loading isn't occurring in an actual
background thread (that belongs to the app), whatever other thing it's caught
up on is keeping it from loading.  In one iteration of my in-process wine
kernel, I had this thing loading up in 5 seconds (even though I broke plenty of
other stuff with that hack) -- this proved that it wasn't a problem with
actually loading slowly, but with the app slowing its self down as it tries to
load the level data.

I'll take another look at this in a few months, I'm too bogged down with
another project to spend much time on it at the moment.

--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=29582

ignacio rodríguez <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.

Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=29582

Micah John <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #8 from Micah John <[hidden email]> 2013-08-29 12:41:35 CDT ---
Please let us know when you do, and keep us updated!

--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=29582

Jack Coventry <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #9 from Jack Coventry <[hidden email]> ---
Sorry for being a massive noob but how to I add the hack to the port?

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=29582

--- Comment #10 from [hidden email] ---
(In reply to Jack Coventry from comment #9)
> Sorry for being a massive noob but how to I add the hack to the port?

http:://wiki.winehq.org/Patching

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=29582

--- Comment #11 from Jack Coventry <[hidden email]> ---
Thanks for getting back so quickly, sorry for bugging you but I have one more
question, where exactly does this diff file start and end. Thankyou!

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=29582

--- Comment #12 from Jack Coventry <[hidden email]> ---
FYI this is what I get when I try it
patching file dlls/user32/focus.c
Hunk #1 succeeded at 36 (offset 1 line).
Hunk #2 succeeded at 366 (offset 2 lines).
Hunk #3 succeeded at 380 (offset 2 lines).
patching file dlls/user32/message.c
Hunk #2 succeeded at 3751 with fuzz 1 (offset 201 lines).
Hunk #3 FAILED at 3774.
1 out of 3 hunks FAILED -- saving rejects to file dlls/user32/message.c.rej
patching file dlls/user32/user_main.c
Hunk #1 succeeded at 328 (offset -3 lines).
patching file dlls/user32/user_private.h
patch unexpectedly ends in middle of line
Hunk #2 succeeded at 41 with fuzz 2 (offset 5 lines).

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=29582

Dara Adib <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #13 from Dara Adib <[hidden email]> ---
Created attachment 48931
  --> http://bugs.winehq.org/attachment.cgi?id=48931
sad little hack updated without changes

(In reply to Jack Coventry from comment #12)
> FYI this is what I get when I try it
> patching file dlls/user32/focus.c
> [...]
> Hunk #3 FAILED at 3774.
> 1 out of 3 hunks FAILED -- saving rejects to file dlls/user32/message.c.rej

That (hacky) patch was made for an older version of Wine from over two years
ago. Wine has changed in the meantime so part of the patch doesn't apply
correctly.

I updated Daniel's patch for master and it also works with 1.6.2. At least I
think I updated the patch correctly. I didn't make any changes. Battlefront I
seems to work well for me with the patch applied to 1.6.2.

Cheers,
Dara

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=29582

Ben Malovrh <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #14 from Ben Malovrh <[hidden email]> ---
Yo! How do you convert the hack file and apply it. Im really new at this.
Someone please help.

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=29582

Ronny Schmatzler <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #15 from Ronny Schmatzler <[hidden email]> ---
Created attachment 50823
  --> https://bugs.winehq.org/attachment.cgi?id=50823
Hack updated for 1.7.37

Patch updated for 1.7.37 - works fine in Battlefront 2. :)

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=29582

Mel Irizarry <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 29582] Star Wars Battlefront (I and II) "Loading" screen very slow.

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=29582

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


123