ルギア君の戯言

雑多な記事。

Linux で MHF?

とりあえず、動かない前提で無料会員でユーザー登録し、クライアントをダウンロードしてみた。


まずは、インストール・・・難なくクリア。
というか exe ファイル内に梱包してあるファイルを取り出すだけっぽい。
サイズや速度的に解凍もしないみたい。ほとんどがメディアファイルなので圧縮するメリットがないと考えた為だろう。


さて起動。
1回目・・・GameGuard が正しく起動しない。

(前略)
fixme:debugstr:CheckRemoteDebuggerPresent (0xffffffff)->(0x7cb45d): Stub!
wine: Unhandled page fault on write access to 0x03bc0ee4 at address 0xb0816b (thread 0009), starting debugger...
Unhandled exception: page fault on write access to 0x03bc0ee4 in 32-bit code (0x00b0816b).
(後略)

メモリ上でのアクセス違反の模様。
ちなみに、

[lugia@lugia-castle mhf]$ ls         
GameGuard      MonsterHJP.ini  dat          hangame_b.url  mhf.exe   mhl.dll  url.lst          vorbis.dll
GameGuard.des  Readme.txt      gdiplus.dll  hangame_m.url  mhfi.exe  ogg.dll  url_hangame.lst            
[lugia@lugia-castle mhf]$ cd GameGuard                                                                   
[lugia@lugia-castle GameGuard]$ ls                                                                       
GameGuard.ver   Splash.jpg  category.tsf  npgg.erl    npgl.erl        npgmup.erl  teas.tls      tyavd.tsf
GameMon.des     TeCtrl.dll  daily.tsf     npgg9x.des  npgmup.des      npsc.des    teasbase.tsf  tyavn.tsf
MonsterHJP.ini  TyAv32.dll  ggscan.des    npggNT.des  npgmup.des.new  teas.dll    teasname.tsf           
[lugia@lugia-castle GameGuard]$ wine GameMon.des                                                         
fixme:reg:GetNativeSystemInfo (0x7659af) using GetSystemInfo()                                           
fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot                                
fixme:thread:NtSetInformationThread info class 17 not supported yet                                      
fixme:debugstr:CheckRemoteDebuggerPresent (0xffffffff)->(0x7cb45d): Stub!                                
wine: Unhandled page fault on write access to 0x03bc0ee4 at address 0xb0816b (thread 0009), starting debugger...
(後略)

で再現されるので、wine で GameMon.des を起動するとわかるように、mhf.exe ではなく GameMon.des 内でのエラーであることがわかる。
des ファイルはこれ以外は dll なので、起動できない。


2回目・・・フリーズ・・・rz
何も利かなくなったので、強引に電源断。
とりあえず、Xのエラーと仮定。


3回目・・・1回目と同じ。
4回目・・・wine で mhf.exe を起動したら急いで Ctrl+Alt+F1 でコンソールに切替え。
固まって何もできない→Xのエラーでは無く kernel のエラーであることが判明。
kernel が死んでは何もできないので強引に電源断。


5回目、6回目・・・1回目と同じ。
7回目・・・ようやく kernel のエラーの内容を把握。Ctrl+Alt+F1 でコンソールにしていると勝ってに表示される。
↓固まる直前に表示された内容。

EIP is at native_flush_tlb_others+0x7a/0x9c
EAX: 00000202 EBX: d94d6e00 ECX: fffff000 EDX: 000008fd
ESI: 7c0454f0 EDI: e4fb90b0 EBP: d94f2d18 ESP: d94f2d0c
 DS: 007b ES: 007b FS: 00d8 GS: 003b SS: 0068
CR0: 8005003b CR2: 7c0454f0 CR3: 194d4000 CR4: 000026d0
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: ffff0ff0 DR7: 00000555
[<c04130f8>] flash_tlb_page+0x90/0x97
[<c041bee8>] ptep_set_access_flags+0x5a/0x64
[<c04714bc>] do_wp_page+0x1ef/0x4fb
[<c041c998>] ? kmap_atomic_prot+0xd9/0xdb
[<c0472c0a>] handle_mm_fault+0x661/0x6e0
[<c064f2b8>] do_page_fault+0x375/0x71e
[<c05cd1fc>] ? sock_aio_read+0x104/0x112
[<c04d82d3>] ? inode_has_perm+0x5b/0x65
[<c04866f5>] ? do_sync_read+0xab/0xe9
[<c0420b25>] ? __dequeue_entity+0x73/0x7b
[<c0403762>] ? __switch_to+0x10f/0x14e
[<c0424e02>] ? hrtick_set+0x80/0xe5
[<c064beeb>] ? schedule+0x72a/0x76b
[<c064ef43>] ? do_page_fault+0x0/0x71e
[<c064d9ca>] error_code+0x72/0x78
[<c0640033>] ? quirk_intel_irqbalance+0x88/0xc6
=======================

kernel がフリーズする時は、GameGuard の起動前に起こるので、mhf.exe 自体が問題かもしれないが、起こる時と起こらない時があるというのは非常に不可解なところがある。なお、mhf.exe と一緒に入っている GameGuard.des を削除(移動)したり改変したりすると、何度起動しても kernel がフリーズすることは無くなる。(GameGuard をインストールしなおしてくださいというメッセージが出るので、起動自体には意味が無い。)


ま、音楽が聞けるから良しとするか! ・・・でもモンハンのお気に入りの曲はポッケ村なんだがなぁ(MHFにはない)・・・
なんで聞けるのかはトップディレクトリをよ〜く見るとわかるよ。きっと。

最初パターンのエラーメッセージ全文

[lugia@lugia-castle mhf]$ wine mhf.exe 2> a.txt
[lugia@lugia-castle mhf]$ cat a.txt
fixme:time:GetCalendarInfoW Unimplemented caltype 4
fixme:time:GetCalendarInfoW Unimplemented caltype 3
fixme:advapi:LsaOpenPolicy ((null),0x7ea15334,0x00000001,0x7ea15350) stub
fixme:advapi:LsaClose (0xcafe) stub  (←カーネルエラーが発生するのはこのあと)
fixme:wininet:INET_QueryOption INTERNET_OPTION_PER_CONNECTION_OPTION stub
fixme:wininet:INET_QueryOption Unhandled dwOption 4                      
fixme:wininet:INET_QueryOption Unhandled dwOption 5                      
fixme:wininet:INET_QueryOption Unhandled dwOption 3                      
fixme:wininet:INET_QueryOption Unhandled dwOption 2                      
fixme:reg:GetNativeSystemInfo (0x7659af) using GetSystemInfo()           
fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
fixme:thread:NtSetInformationThread info class 17 not supported yet      
fixme:debugstr:CheckRemoteDebuggerPresent (0xffffffff)->(0x7cb45d): Stub!
wine: Unhandled page fault on write access to 0x03bc0ee4 at address 0xb0816b (thread 001d), starting debugger...
Unhandled exception: page fault on write access to 0x03bc0ee4 in 32-bit code (0x00b0816b).                      
Register dump:                                                                                                  
 CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b                                                                
 EIP:00b0816b ESP:00341fe8 EBP:00000001 EFLAGS:00010246(   - 00      -RIZP1)                                    
 EAX:03bc0ee4 EBX:00000000 ECX:00000001 EDX:6bffc684                                                            
 ESI:00341ff8 EDI:03bc0ee4                                                                                      
Stack dump:                                                                                                     
0x00341fe8:  00380000 00903700 03bc0ee4 00000000                                                                
0x00341ff8:  00000000 00000000 00000000 00000000                                                                
0x00342008:  00000000 00000000 00000000 00000000                                                                
0x00342018:  00000000 00000000 00000000 00000000                                                                
0x00342028:  00000000 00000000 00000000 00000000                                                                
0x00342038:  00000000 00000000 00000000 00000000                                                                
Backtrace:                                                                                                      
=>1 0x00b0816b (0x00000001)                                                                                     
  2 0x00000000 (0x00000000)                                                                                     
0x00b0816b: repe movsb  (%esi),%es:(%edi)                                                                       
Modules:                                                                                                        
Module  Address                 Debug info      Name (82 modules)                                               
ELF       101000-  1ef000       Deferred        libx11.so.6                                                     
ELF       2e1000-  356000       Export          libfreetype.so.6                                                
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
PE        400000-  910000       Deferred        gamemon.des                                                     
ELF       a89000-  aa3000       Deferred        libnsl.so.1                                                     
ELF       b61000-  b64000       Deferred        libxcomposite.so.1                                              
ELF       c35000-  da9000       Deferred        libc.so.6                                                       
ELF       dab000-  db3000       Deferred        libsm.so.6                                                      
ELF       db5000-  dcd000       Deferred        libice.so.6                                                     
ELF       df8000-  dfd000       Deferred        libxxf86vm.so.1                                                 
ELF      5329000- 5386000       Deferred        libpulse.so.0                                                   
ELF      6416000- 64de000       Deferred        libasound.so.2                                                  
ELF      652e000- 6534000       Deferred        libgdbm.so.3                                                    
ELF      6536000- 653b000       Deferred        libasyncns.so.0                                                 
ELF     60315000-603d8000       Deferred        comctl32<elf>                                                   
  \-PE  60320000-603d8000       \               comctl32                                                        
ELF     603d8000-60522000       Deferred        user32<elf>                                                     
  \-PE  603f0000-60522000       \               user32                                                          
ELF     60522000-605bf000       Deferred        gdi32<elf>                                                      
  \-PE  60530000-605bf000       \               gdi32                                                           
ELF     605bf000-60612000       Deferred        advapi32<elf>                                                   
  \-PE  605d0000-60612000       \               advapi32                                                        
ELF     606c0000-60759000       Deferred        winex11<elf>                                                    
  \-PE  606d0000-60759000       \               winex11                                                         
ELF     6089a000-608ba000       Deferred        imm32<elf>                                                      
  \-PE  608a0000-608ba000       \               imm32                                                           
ELF     608de000-60970000       Deferred        winmm<elf>                                                      
  \-PE  608f0000-60970000       \               winmm                                                           
ELF     60970000-609a5000       Deferred        winealsa<elf>                                                   
  \-PE  60980000-609a5000       \               winealsa                                                        
ELF     60af8000-60b0f000       Deferred        msacm32<elf>                                                    
  \-PE  60b00000-60b0f000       \               msacm32                                                         
ELF     60b0f000-60c36000       Deferred        shell32<elf>                                                    
  \-PE  60b20000-60c36000       \               shell32                                                         
ELF     60c36000-60c90000       Deferred        shlwapi<elf>                                                    
  \-PE  60c40000-60c90000       \               shlwapi                                                         
ELF     60c90000-60d9b000       Deferred        ole32<elf>                                                      
  \-PE  60cb0000-60d9b000       \               ole32                                                           
ELF     60d9b000-60e00000       Deferred        rpcrt4<elf>                                                     
  \-PE  60db0000-60e00000       \               rpcrt4                                                          
ELF     60e00000-60e1f000       Deferred        iphlpapi<elf>                                                   
  \-PE  60e10000-60e1f000       \               iphlpapi                                                        
ELF     60e1f000-60e4a000       Deferred        ws2_32<elf>                                                     
  \-PE  60e30000-60e4a000       \               ws2_32                                                          
ELF     60e4a000-60e5e000       Deferred        lz32<elf>                                                       
  \-PE  60e50000-60e5e000       \               lz32                                                            
ELF     6278d000-627b5000       Deferred        msacm32<elf>                                                    
  \-PE  62790000-627b5000       \               msacm32                                                         
ELF     6a86d000-6a886000       Deferred        version<elf>                                                    
  \-PE  6a870000-6a886000       \               version                                                         
ELF     6e119000-6e12d000       Deferred        midimap<elf>                                                    
  \-PE  6e120000-6e12d000       \               midimap                                                         
ELF     6ea83000-6ea89000       Deferred        libasound_module_pcm_pulse.so                                   
ELF     700bc000-700ee000       Deferred        uxtheme<elf>                                                    
  \-PE  700c0000-700ee000       \               uxtheme                                                         
ELF     7b800000-7b93a000       Deferred        kernel32<elf>                                                   
  \-PE  7b820000-7b93a000       \               kernel32                                                        
ELF     7bc00000-7bca8000       Deferred        ntdll<elf>                                                      
  \-PE  7bc10000-7bca8000       \               ntdll                                                           
ELF     7bf00000-7bf03000       Deferred        <wine-loader>                                                   
Threads:                                                                                                        
process  tid      prio (all id:s are in hex)                                                                    
00000008                                                                                                        
        0000001e    0                                                                                           
        00000009    0                                                                                           
0000000c                                                                                                        
        00000013    0                                                                                           
        00000012    0                                                                                           
        0000000e    0                                                                                           
        0000000d    0                                                                                           
0000000f                                                                                                        
        00000015    0                                                                                           
        00000014    0                                                                                           
        00000011    0                                                                                           
        00000010    0                                                                                           
00000016                                                                                                        
        0000001a    0                                                                                           
        00000017    0                                                                                           
00000018                                                                                                        
        00000019    0                                                                                           
0000001c (D) H:\mhf\GameGuard\GameMon.des                                                                       
        00000036    2                                                                                           
        00000035    2                                                                                           
        00000034    2                                                                                           
        00000033    2                                                                                           
        00000032    2                                                                                           
        00000031    2                                                                                           
        00000030    2                                                                                           
        0000002f    2
        0000002e    2
        0000002d    2
        0000002c    2
        0000002b    2
        0000002a    2
        00000029    2
        00000028    2
        00000027    2
        00000026    0
        00000025    0
        00000024    0
        00000023    0
        00000022    0
        00000021    0
        00000020    0
        0000001f    0
        0000001d    0 <==
Backtrace:
=>1 0x00b0816b (0x00000001)
  2 0x00000000 (0x00000000)
err:seh:raise_exception Exception frame is not in stack limits => unable to dispatch exception.
[lugia@lugia-castle mhf]$

1回の起動で、カーネルログ (/var/log/messages)に

Jan  8 22:04:26 lugia-castle kernel: =======================
Jan  8 22:04:26 lugia-castle kernel: Pid: 5519, comm: mhf.exe Not tainted (2.6.26.7-4m.mo5.i686 #1)
Jan  8 22:04:26 lugia-castle kernel: EIP: 0073:[<60000832>] EFLAGS: 00000293 CPU: 1
Jan  8 22:04:26 lugia-castle kernel: EIP is at 0x60000832
Jan  8 22:04:26 lugia-castle kernel: EAX: fffffe00 EBX: 00000007 ECX: 0032dd6c EDX: 00000008
Jan  8 22:04:26 lugia-castle kernel: ESI: 7ffd8000 EDI: 0032dd6c EBP: 0032dd80 ESP: 0032dd38
Jan  8 22:04:26 lugia-castle kernel: DS: 007b ES: 007b FS: 0033 GS: 003b SS: 007b
Jan  8 22:04:26 lugia-castle kernel: CR0: 8005003b CR2: 0013a204 CR3: 33b70000 CR4: 000026d0
Jan  8 22:04:26 lugia-castle kernel: DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
Jan  8 22:04:26 lugia-castle kernel: DR6: ffff0ff0 DR7: 00000555
Jan  8 22:04:26 lugia-castle kernel: =======================

が複数個記録される。

使用バージョン

Momonga で独自にパッチを当てたりしているものもあるので注意。

wine 1.1.10-1m.mo5.i686
kernel 2.6.26.5-11m.mo5.i686
alsa-lib 1.0.18-1m.mo5.i686
mesa-libGL 7.1-3m.mo5.i686
mesa-libGLU 7.1-3m.mo5.i686
libICE 1.0.4-3m.mo5.i686
libX11 1.1.5-2m.mo5.i686
libXext 1.0.4-2m.mo5.i686
libXxf86vm 1.0.2-1m.mo5.i686