WineHQ
Bug Tracking Database – Bug 43733

 Bugzilla

 

Last modified: 2017-12-12 02:46:50 CST  

max 7 page fault when showing drop-down

Bug 43733 - max 7 page fault when showing drop-down
max 7 page fault when showing drop-down
Status: CLOSED DUPLICATE of bug 42497
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: -unknown
2.3
x86 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2017-09-19 17:01 CDT by aaahaaap
Modified: 2017-12-12 02:46 CST (History)
3 users (show)

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


Attachments
max 7.2.5 32bit page fault (19.18 KB, text/plain)
2017-09-19 17:01 CDT, aaahaaap
Details
sad hack (999 bytes, patch)
2017-11-18 17:23 CST, Louis Lenders
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description aaahaaap 2017-09-19 17:01:49 CDT
Created attachment 59214 [details]
max 7.2.5 32bit page fault

Using max 7.2.5 32bit using 32 bit wine I run into the issue that any drop-down I click on causes a page fault. See attachment for the page fault

Way to reproduce:
- Create a new 32 bit wine prefix
- Install max 7.2.5 32 bit
  - Download from https://cycling74.com/downloads/older, direct linke https://akiaj5esl75o5wbdcv2a-maxmspjitter.s3.amazonaws.com/Max725_x86_160915.zip 
  - Extract the zip
  - Run "WINEPREFIX=<wineprefix path> wine msiexec /i <path-to>/Max7_x86_160913_334ed90.msi"
- Download the monome sum patch from https://github.com/monome/monome_sum/releases/tag/1.3a (direct link https://github.com/monome/monome_sum/archive/1.3a.tar.gz)
- Extract the monome sum tar.gz file, which should result in a "monome_sum-1.3a" directory
- Run max 7.2.5 "WINEPREFIX=<wineprefix path> wine <wineprefix path>/drive_c/Program\ Files\ \(x86\)/Cycling\ \'74/Max\ 7/MaxRT_nocef.exe"
- Using File > Open open the file "monome_sum-1.3a/monome_sum/monome_sum.maxproj"
- Click on the drop-down in the top left of the "smallbatch" window
- The outline of the drop-down is shown and the application page faults
Comment 1 Fabian Maurer 2017-09-20 02:14:39 CDT
Confirming.
Comment 2 aaahaaap 2017-11-17 17:29:41 CST
Does anyone have any idea what's causing this? Is more info needed to determine the cause? If so what kind of info?
Comment 3 Zebediah Figura 2017-11-17 19:48:53 CST
In true Fochtian style.

The game crashes at 0x4c288f:

  4c2889:	ff 15 c8 aa c1 00    	call   *0xc1aac8
  4c288f:	5f                   	pop    %edi

And if we look for this address, we find:

  4c230a:	e8 b1 e2 ff ff       	call   0x4c05c0
  4c230f:	84 c0                	test   %al,%al
  4c2311:	75 27                	jne    0x4c233a
  4c2313:	68 08 e1 a9 00       	push   $0xa9e108
  4c2318:	ff 15 f8 32 99 00    	call   *0x9932f8
  4c231e:	68 20 e1 a9 00       	push   $0xa9e120
  4c2323:	50                   	push   %eax
  4c2324:	ff 15 5c 33 99 00    	call   *0x99335c
  4c232a:	8b c8                	mov    %eax,%ecx
  4c232c:	33 c0                	xor    %eax,%eax
  4c232e:	85 c9                	test   %ecx,%ecx
  4c2330:	89 0d c8 aa c1 00    	mov    %ecx,0xc1aac8

i.e.

    if (!4c05c0())
        pUpdateLayeredWindow = GetProcAddress(GetModuleHandle(L"user32.dll"), "UpdateLayeredWindow")

And that function is:

  4c05c4:	8d 45 fc             	lea    -0x4(%ebp),%eax
  4c05c7:	50                   	push   %eax
  4c05c8:	68 19 00 02 00       	push   $0x20019
  4c05cd:	6a 00                	push   $0x0
  4c05cf:	68 f4 df a9 00       	push   $0xa9dff4
  4c05d4:	68 01 00 00 80       	push   $0x80000001
  4c05d9:	ff 15 0c 30 99 00    	call   *0x99300c
  4c05df:	85 c0                	test   %eax,%eax
  4c05e1:	75 0f                	jne    0x4c05f2
  4c05e3:	ff 75 fc             	pushl  -0x4(%ebp)
  4c05e6:	ff 15 00 30 99 00    	call   *0x993000
  4c05ec:	b0 01                	mov    $0x1,%al
  4c05ee:	8b e5                	mov    %ebp,%esp
  4c05f0:	5d                   	pop    %ebp
  4c05f1:	c3                   	ret    
  4c05f2:	32 c0                	xor    %al,%al

i.e.

    if (!RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\Wine", 0, KEY_READ, &hkey))
    {
        RegCloseKey(hkey);
        return 1;
    }
    return 0;


To summarize: The application is Wine-aware. I suspect it was trying to work around some bug in UpdateLayeredWindow(), but then some part of that code path broke.

It's not really obvious what this code path is, if there is one.
Comment 4 Louis Lenders 2017-11-18 17:23:06 CST
Created attachment 59721 [details]
sad hack

I guess this is duplicate of bug 42497 then (NOTOURBUG). 

This won`t be fixed in wine. 

Maybe wine-staging accepts/could provide a workaround to get this running (as there`s already a ``hide wine-version`` option there)? 

There are more apps lying around in that apparantly suffer from this bug: bug 43504, bug 41566 (though that one doesn`t check the existence of wine registrykey, but rather checks wine_get_version).

Is it OK to collect all these bugs as duplicate of bug 42497?

(For completeness I attached very poor and sad hack that makes the crash dissappear so the app works apparantly well)
Comment 5 aaahaaap 2017-11-18 17:45:00 CST
Thanks for the info everyone!

(In reply to Zebediah Figura from comment #3)
> In true Fochtian style.
> 
> The game crashes at 0x4c288f:
> 
> ...
> 
> 
> To summarize: The application is Wine-aware. I suspect it was trying to work
> around some bug in UpdateLayeredWindow(), but then some part of that code
> path broke.
> 
> It's not really obvious what this code path is, if there is one.

Just checking because you wrote "The game crashes", this comment was about Max 7 not about a game, right?

(In reply to Louis Lenders from comment #4)
> Created attachment 59721 [details]
> sad hack
> 
> I guess this is duplicate of bug 42497 then (NOTOURBUG). 
> 
> This won`t be fixed in wine. 
> 
> Maybe wine-staging accepts/could provide a workaround to get this running
> (as there`s already a ``hide wine-version`` option there)? 
> 
> There are more apps lying around in that apparantly suffer from this bug:
> bug 43504, bug 41566 (though that one doesn`t check the existence of wine
> registrykey, but rather checks wine_get_version).
> 
> Is it OK to collect all these bugs as duplicate of bug 42497?
> 
> (For completeness I attached very poor and sad hack that makes the crash
> dissappear so the app works apparantly well)

Since there are more applications having this issue it would be nice if wine (staging) would have an option that hides the wine registry entry. This could be an extra option or be part of the existing "hide wine-version" option.

Btw. What happens if I delete that registry key myself? Does anything within wine break?
Comment 6 Zebediah Figura 2017-11-18 17:48:03 CST
(In reply to aaahaaap from comment #5)
> Just checking because you wrote "The game crashes", this comment was about
> Max 7 not about a game, right?

Whoops, yes, sorry. I'm so used to debugging games I sometimes accidentally write "game" even when the program isn't one :-)

> Btw. What happens if I delete that registry key myself? Does anything within
> wine break?

Probably, but regardless Wine will re-create the key on startup anyway.
Comment 7 Nikolay Sivov 2017-11-19 03:29:36 CST
(In reply to Louis Lenders from comment #4)
> Created attachment 59721 [details]
> sad hack
> 
> I guess this is duplicate of bug 42497 then (NOTOURBUG). 
> 
> This won`t be fixed in wine. 
> 
> Maybe wine-staging accepts/could provide a workaround to get this running
> (as there`s already a ``hide wine-version`` option there)? 

There's at least two separate cases. If application detects Wine and applies a workaround in a broken way, that doesn't work anymore in newer Wine versions, that's one thing. In this case anyone interested in running it should contact developer for updates, or persuade them to actually report bugs. If it's not possible users can just have separate Wine installation that works for this application.

Another thing is when application detects Wine and refuses to run just because it's Wine. If it was a developer intention I don't think we should intervene at all, but instead respect developer's decision and let it crash/fail as it's meant to.

In any case adding workarounds in Wine for such applications is a bad idea, and hiding wine version export is an example of that.
Comment 8 aaahaaap 2017-11-19 17:22:53 CST
(In reply to Zebediah Figura from comment #6)
> (In reply to aaahaaap from comment #5)
> > Just checking because you wrote "The game crashes", this comment was about
> > Max 7 not about a game, right?
> 
> Whoops, yes, sorry. I'm so used to debugging games I sometimes accidentally
> write "game" even when the program isn't one :-)

OK, good to know :)
 
> > Btw. What happens if I delete that registry key myself? Does anything within
> > wine break?
> 
> Probably, but regardless Wine will re-create the key on startup anyway.

OK. Also I noticed wine stores it's config there so probably no a good idea to delete it :)

I guess I'll send a mail to Cycling 74 to ask them if they are could remove the wine check since it should no longer be necessary.
Any suggestions what I can mention to them so they know what to fix? Seems like the function is called "UpdateLayeredWindow"? Is that Max code or Windows code?
(Sorry, all of this is new to me).


(In reply to Louis Lenders from comment #4)
> Created attachment 59721 [details]
> sad hack
> ...
> 
> (For completeness I attached very poor and sad hack that makes the crash
> dissappear so the app works apparantly well)

The hacky patch works, even though it ain't pretty at least it means I can get going again. Thanks!
Comment 9 Zebediah Figura 2017-11-19 18:01:08 CST
Is there a reason that the most recent version was not tested? It may not suffer from the same problem...
Comment 10 Louis Lenders 2017-11-20 15:03:13 CST
> 
> I guess I'll send a mail to Cycling 74 to ask them if they are could remove
> the wine check since it should no longer be necessary.
> Any suggestions what I can mention to them so they know what to fix? 

I`d say just point them to this bugreport. Also https://bugs.winehq.org/show_bug.cgi?id=42497 is the same issue really and has an analysis of the crash.
(https://bugs.winehq.org/show_bug.cgi?id=42497#c8)

For now let`s resolve this as duplicate.

*** This bug has been marked as a duplicate of bug 42497 ***
Comment 11 Alistair Leslie-Hughes 2017-12-12 02:46:50 CST
Closing Duplicate


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

Hosted By CodeWeavers