WineHQ
Bug Tracking Database – Bug 26365

 Bugzilla

 

Last modified: 2016-08-19 08:19:45 CDT  

Geneforge 1 - text gets cut away

Bug 26365 - Geneforge 1 - text gets cut away
Geneforge 1 - text gets cut away
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: -unknown
1.3.14
x86 Linux
: P2 trivial
: ---
Assigned To: Mr. Bugs
http://www.spidweb.com/geneforge/inde...
: download
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-03-09 20:24 CST by xaron77
Modified: 2016-08-19 08:19 CDT (History)
11 users (show)

See Also:
Regression SHA1:
Fixed by SHA1:
Distribution: ---
Staged patchset:


Attachments
Help without clipping. (31.56 KB, application/x-bzip)
2012-01-16 13:53 CST, Javier Kohen
Details
Triggering the bug. (49.37 KB, application/x-bzip)
2012-01-16 13:53 CST, Javier Kohen
Details
Help with clipping. (25.71 KB, application/x-bzip)
2012-01-16 13:54 CST, Javier Kohen
Details
Help without clipping (325.71 KB, image/png)
2013-01-18 10:56 CST, Pierre Etchemaite
Details
Help with clipping (321.53 KB, image/png)
2013-01-18 11:02 CST, Pierre Etchemaite
Details
ddraw trace without the bug (303.10 KB, application/gzip)
2014-03-03 13:44 CST, wanderer
Details
ddraw trace with the bug (314.00 KB, application/gzip)
2014-03-03 13:46 CST, wanderer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xaron77 2011-03-09 20:24:23 CST
Text gets cut-away on the right side of dialogue screen (letters often get cut in half) and character statistics screen. No errors are displayed.
Comment 1 Rosanne DiMesio 2011-03-09 21:38:08 CST
Not critical. http://bugs.winehq.org/page.cgi?id=fields.html#bug_severity
Comment 2 Javier Kohen 2012-01-16 13:33:41 CST
There is a downloadable demo in the official site: http://www.spidweb.com/geneforge/index.html
Comment 3 Javier Kohen 2012-01-16 13:53:04 CST
I have a little bit more information on how to reproduce this, and I'm attaching the output of the ddraw debug channel.

As soon as your character appears on the map, it works fine:

1) Before you do anything else, you can press F1 to see the help and all the text should appear on the screen (gf-help-before.log).
2) Have the character walk. A short step is enough (gf-walk.log).
3) After the previous step the text outside the map view is clipped. You can press F1 to see the help and you'll see how the text that falls outside the map view is missing (gf-help-after.log).


Surprisingly diff between the before and after logs gives relatively few differences, and there are clear patterns, though I can't tell whether they are significant. Hopefully gf-walk.log or the diff gives someone who knows ddraw a clue. There is also a demo you can play with to test this.
Comment 4 Javier Kohen 2012-01-16 13:53:38 CST
Created attachment 38387 [details]
Help without clipping.
Comment 5 Javier Kohen 2012-01-16 13:53:55 CST
Created attachment 38388 [details]
Triggering the bug.
Comment 6 Javier Kohen 2012-01-16 13:54:12 CST
Created attachment 38389 [details]
Help with clipping.
Comment 7 Ben Kelly 2012-04-02 19:28:27 CDT
I can confirm that, as of Wine 1.5.1 amd64, this still affects both Geneforge and Geneforge 2. I can provide logs and screenshots if useful.
Comment 8 Pierre Etchemaite 2012-09-08 16:27:25 CDT
Problem still exists with Wine 1.5.12.

Debian unstable architecture amd64
Wine 1.5.12
Nvidia GeForce G102M / proprietary driver 304.37
Comment 9 Pierre Etchemaite 2013-01-18 06:25:57 CST
Problem still exists with Wine 1.5.21.

Debian unstable architecture amd64
Wine 1.5.21
Nvidia GeForce G102M / proprietary driver 304.64
Comment 10 Pierre Etchemaite 2013-01-18 10:42:16 CST
(In reply to comment #3)
> 2) Have the character walk. A short step is enough (gf-walk.log).

Actually just selecting the character (by left-clicking on it) is enough.
Other than that I confirm exactly what you describe.
Comment 11 Pierre Etchemaite 2013-01-18 10:56:52 CST
Created attachment 43215 [details]
Help without clipping

Before character selection with the mouse, the help text displays correctly;
The help can be opened and closed several times and still work correctly.
One can even scroll the map around, no issue.
Comment 12 Pierre Etchemaite 2013-01-18 11:02:54 CST
Created attachment 43216 [details]
Help with clipping

After the character has been selected with the mouse, the help text is clipped to the map area. Returning to main menu, loading a different game, do not fix the clipping, only restarting the program does.
Comment 13 fiziologus 2013-03-28 11:06:36 CDT
this bug exist in regedit when you try to edit multiline value for key, e.g. file name for fonts.
Comment 14 Pierre Etchemaite 2013-06-17 16:57:04 CDT
Problem still exists in 1.6-rc2

Debian unstable architecture amd64
Nvidia GeForce G102M / proprietary driver 313.30
Comment 15 Ken Sharp 2013-12-27 11:46:58 CST
Confirmed by multiple users.
Comment 16 fiziologus 2014-01-15 06:32:17 CST
wine-1.7.10
Bug exist.
Comment 17 wanderer 2014-03-02 08:26:41 CST
For whatever it's worth, still found in wine-1.7.13-53-g37e0a1a.

Also, this bug has been known since at least mid-2009, probably years prior. (I filed another bug in July 2009 which mentions the existence of this bug, and I'd known about it for a long time at that point.) I thought I'd discussed it with other people here on the WineHQ Bugzilla, but I can't find any sign of that; maybe it was on some other Wine site.

I'm pretty sure this is one of the longest-standing known bugs still present in Wine, at least of its class - that being "likely the only bug preventing a particular program from being Platinum-class".

If there's any significant chance of getting this bug fixed, I'd be willing to do testing and provide logs, although I'm not remotely familiar with how to produce useful debug logs from Wine - the documentation I've found has not been at all helpful in that regard.
Comment 18 wanderer 2014-03-03 13:44:46 CST
Created attachment 47692 [details]
ddraw trace without the bug

I started a new game, generated a new character, saved immediately without doing anything, then exited the program.

Here's Wine output with WINEDEBUG=+ddraw for a run which loads that save file, displays the Help dialog with F1 (exhibiting a text window without the bug), closes the dialog, then quits the game through normal channels.

I don't know if ddraw is actually relevant, but it's as good a suggestion for a place to start looking as anyone has made yet, and I imagine a simple "all" log would be sufficiently overkill that no one would bother digging through it.
Comment 19 wanderer 2014-03-03 13:46:50 CST
Created attachment 47693 [details]
ddraw trace with the bug

Here's Wine output with WINEDEBUG=+ddraw for a run which loads the same (unmodified) save file, clicks on the character to trigger the change to the buggy state, displays the Help dialog with F1 (exhibiting a text window with the bug), closes the dialog, then quits the game through normal channels.
Comment 20 wanderer 2014-03-04 09:26:08 CST
Additional observation, in case it may help at some point: after triggering the bug in the test runs I've been using to generate traces, when I quit to the title-screen menu, the ancillary graphics (the frame surrounding the menu, and the "monster summoner" and the monsters it summons, but not the background graphic or the menu entries themselves) are not visible below a certain height.

I've been trying to produce logs which might contain more useful information, but going stab-in-the-dark with individual debug channels seems unproductive, and trying for a +all trace - with any class, apparently - results in animation so slow and choppy I can rarely even get past the title-screen menu and have never managed to actually load the saved game. (As best I can discern, it seems to only accept mouse-click input which arrives when a frame is actually being drawn, or something like that.)
Comment 21 Pierre Etchemaite 2014-08-04 10:10:59 CDT
Problem still exists in Wine 1.7.23
Comment 22 Pierre Lupien 2015-11-28 11:51:48 CST
A possible fix... or at the very least a working hack...

I've stepped through the application with the debugger and I believe I
found what could be the problem (at least in one case).

My test case (wine version: 1.8-rc1, running on ArchLinux/x86_64):
  - Start the application
  - Click "Start New Game" and accept all defaults and lick Ok until
    the main game screen appears
  - Click on the journal icon, the "Welcome to Geneforge" text appears
     correctly
  - Close the journal window
  - Move the mouse over the character on screen. A green circle will
    appear around the character. Move the mouse away.
  - Click on the journal icon again, the "Welcome to Geneforge" text
    will now be clipped (which, obviously, is a problem). Other
    text in the game will also be clipped from that point on.
  
Calls from the application:
  
When the mouse is moved over the character, the following happens:
  - App calls ddraw_surface_GetDC and sets background color, 
    text color, etc
  - App calls CreateRectRgn, SelectClipRgn and DeleteObject(hrgn)  
    (the DeleteObject is expected/ok, since SelectClipRgn makes a copy)
  - App makes various calls to draw the selection circle.
  - App calls ddraw_surface1_ReleaseDC (which in turn calls
    ddraw_surface7_ReleaseDC [dlls/ddraw/surface.c:2197]).
  - App moves on to other things.
    
The app never explicetly un-selects the clip region, so it seems it 
expects the clip region to be un-selected by the call to 
ddraw_surface1_ReleaseDC  (assumption supported by the fact that the
text always appears properly on Windows).

I was able to fix it by adding the following call to 
ddraw_surface7_ReleaseDC (before the mutex lock):

    SelectClipRgn(hdc, NULL);

Now, I have absolutely no idea what kind of unwanted side-effect(s)
this addition might have (performance-related  or otherwise) or if
a better solution could be found (like a call to SaveDC in GetDC and
RestoreDC in ReleaseDC), or if instead the fix belongs in the
deeper function wined3d_surface_releasedc.  I also haven't played the
game much further to check other test cases, but the journal text is
now ok as well as the text from game events (e.g. tutorial messages).

So this could be a fix or a very bad hack. In any case, if a 
knowledgeable Wine developper is interested in taking a look, this 
could be a good place to start.
Comment 23 wanderer 2015-11-29 11:57:40 CST
I'm very glad to see that this has been tracked down!

I'd love to dig into this myself, with that information, but unfortunately I don't have a way of building Wine properly (i.e., so as to support both 32-bit and 64-bit Windows programs with one install) ever since Debian dropped ia32-libs-dev without getting multi-arch -dev packages properly in place. My best workaround requires a multi-step build process which includes changing the installed versions of various -dev packages in between the build steps, and that's not at all practical for iterative testing.

If there's anything to be done to help push getting this vetted and (if necessary) developed into an acceptable patch, I'd be glad to do what I can in that direction.
Comment 24 Jen 2016-04-18 19:58:15 CDT
I applied the fix mentioned in comment 22 to wine 1.9.8 and recompiled.  So far the Geneforge text wrap glitch is fixed for me, and I haven't noticed any other problems.
Comment 25 Jay Little 2016-07-27 15:13:49 CDT
Is this bug still a current issue?

I just installed wine 1.9.15-1 in Arch. After installing and testing Geneforge 1 using Play On Linux (setup to use system version of wine), I can't actually replicate the bug.

I am still able to replicate the bug using CrossOver Office 15.1.0 which is based on an older stable version of wine, but as it stands right now - the current version wine appears to have resolved the issue in my preliminary testing.

FYI: Whatever the fix was, it wasn't the change suggested in comment #22.
Comment 26 Bruno Jesus 2016-08-12 16:03:34 CDT
I can see the problem in 1.7.7 just like the picture in comment 12, in wine 1.9.16 everything seems fine. Previous comment states it is fixed too so resolving as fixed.
Comment 27 Alexandre Julliard 2016-08-19 08:19:45 CDT
Closing bugs fixed in 1.9.17.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to privacy@winehq.org

Hosted By CodeWeavers