ユーザー名が特定の日本語文字を含むときにNVDAインストーラーが起動しない
Windows 7 x64 で前のバージョン(2012.1j)をアンインストールして 2012.2.1jp を「管理者として実行」したら起動に成功したとのことです。
このかたから続報(うまくいかないので諦めますというご連絡)をいただきました。
インストールに成功したのは Windows 7 64 ビットマシンだけで、 以下の両方で 2012.2.1jp インストーラーが実行エラーになるということです。
デジタル署名が関係あるかも知れません。
>Windows 7 の 32 ビット、リカバリー直後の環境 >Windows XP の現在お使いの環境(リカバリーは試していない)
XPならば可能性がある(証明書の最新のものがインストールされていないなどで、インストーラが動作しない)のですが 7では問題無いはずです。
あと可能性があるとすれば、インストーラが管理者権限で動作する。あるいはしないとか インストーラが作成したファイルは、権限が管理者なので、通常権限では読めないなどです。
さきほど書き込み 2012-07-20 11:03 をログインしないで行ってしまったので、コメントを書き直します。
その後、以下の方法で成功したという続報をいただきました。
(ここから)
nvda_2012.2.1jpがインストールできたパソコンとできなかったパソコンを調べていましたところ 7・64ビットのパソコンの、Cドライブの直下にtempというホルダーが作成されているのに気がつきました。
そのホルダーをインストールできなかった7・32ビットとXPのCドライブに コピーして貼り付けしたあとでnvda_2012.2.1jpのインストールをやってみたところ どちらにも正常にインストールできました。
tempのホルダー内にはcomtypes_cacheというホルダーと、nvda.log・readmejp.htaというファイルがありました。
現在どのパソコンのNVDAも正常に動作しています。
(ここまで)
上記のうち readmejp.hta は「ヘルプ」メニューの「NVDA日本語版の説明」を表示するときに日本語版で追加した処理で生成しています。インストーラーの起動には影響を与えないと思います。
もしかしたら C ドライブ直下の書き込み権限の有無が影響あるのかも知れません。
例えば「川山」という名前(ログオン名、アカウント名)で管理者権限のないユーザー(XP では「制限ユーザー」、Windows 7 では「標準ユーザー」)を作ると、この現象を Windows XP sp3 と Windows 7 x64 の両方で再現できました。
(最初に報告してくださったユーザーの名前をフルネームでユーザー名として使った場合も再現できています)
他にもいくつかユーザー名を作ったり変更したりしてみましたが、日本語ユーザー名であってもエラーが起きる名前と起きない名前があるようです。
また、環境変数 TEMP, TMP を変更したり削除したりすると、一時ファイルが C:\Windows\temp に作られますが、やはりエラーは発生します。
日本語版だけでなく本家版 2012.2.1 および 2012.3beta1 でもエラーが発生します。
エラーは下記のダイアログです(XP と 7 でほぼ同様)。
Error Occured: See the logfile 'C:\Users\川山\AppData\Local\Temp\nsh22B1.tmp\app\nvda_noUIAccess.exe.log' for details
このダイアログが開いている間は上記のログファイルにはロックがかかっていて閲覧できず、ダイアログを閉じると app ディレクトリが空になるので、やはりログの中身を閲覧することはできません。
関係がありそうな NSIS のバグ報告を見つけました。Unicode NSIS に移行する必要があるようです。
本家に報告したほうがよさそうです。。
報告用に文字コード(Unicode)を調べたのでメモしておきます。
川 0x5ddd 山 0x5c71
nvda-dev-asia に下記を報告しました。
Some Japanese users have been reported that NVDA launcher cannot run under some situations.
I found how to reproduce the problem.
Tested systems are Windows xp sp3 (Japanese) and Windows 7 x64 (Japanese).
(1) Create a non-administrative user, with the name of two multi-characters as follows:
川 0x5ddd
山 0x5c71
The name is: 川山 (ideographic characters for 'river' and 'mountain')
Some other character sequences can reproduce this error, however, it is the shortest one that I found.
(2) Log on to Windows as the user.
(3) Execute launcher of NVDA 2012.2.1 or 2012.3beta1. (also reproduced with NVDA JP versions)
(4) After the music, following error is shown:
Error Occurred: See the logfile 'C:\Users\**\AppData\Local\Temp\nsh22B1.tmp\app\nvda_noUIAccess.exe.log' for details
Notice: ** is the user name: 川山
So the user cannot use NVDA at all.
(5) The log file is locked, so it can not be opened. After the error dialog closed, the app directory is empty.
(6) If environment values TEMP and TMP are deleted, the temporary file is created under C:\Windows\temp, however, the error is not resolved.
I found an NSIS bug report that may be related to this problem:
http://sourceforge.net/tracker/?func=detail&atid=373085&aid=2725350&group_id=22049
It says that 'Unicode NSIS' should be used instead of original NSIS.
Mick さんからコメントが届きました。
たとえインストーラーを直せても Python 2.7 の制約があるので動作しない可能性があり、簡単には直せないという話です。
当面は「別のログオン名で使ってください」とお願いすることになりそうです。
I think the issues are more than just a unicode build of NSIS.
If I copy a portable build of NVDA into a directory with a 0xfddd char in it, also with my system locale (for non-unicode apps) set to Japanese (ACP is 932) then starting NVDA causes an error dialog sayng that it could not load python27.dll with LoadLibrary.
In order to fix this, I think we'd have to wait until Python 3, if in deed it did fix it at all.
I think this must be a rather rare case as it seems as though some part of Windows does not think that 0xfddd is in the codepage selected for the system. I'd bet that these people can't run a lot of other old apps either.
Of course if you have any further info on this I'm always happy to consider things. But right now I don't think this can be solved.
Re unicode NSIS: that project looks like it's still getting on its feet. Certainly not something we want to switch to for 2012.3.
下記のようにコメントしました。
ここで書いたことですが、日本語版については launcher と並行して(救済策として)ポータブル版の zip ファイルを配布したほうがよいように思えてきました。
I understand the technical limitations behind the issue.
This summer, when Rakuten started the Kobo e-book service in Japan, they had the similar problem regarding multi-byte account names, and they had to fix it just after the initial release. This kind of problem is, however, not known very well in Japan.
I tested that if the portable copy is in the Latin name folder such as c:\nvda, such a user can use NVDA as the portable version.
The problem is that NVDA is now only launcher version.
As a interim solution, Japanese team will discuss on distributing zipped archive of portable copy in addition to the launcher.
直せそうだという連絡(下記)が Mick さんからありました。
Actually, Jamie and I have spent the afternoon investigating this further, and we have found the exact issue and come up with a solution. I shall commit the fix tomorrow.
in short, there is a rather bad bug in Python's tempfile.gettempdir when dealing with multi-byte filenames.
I was able to reproduce your issue exactly. Previously I was uding the wrong hex code -- sorry about that.
直していただきました。これから確認しますが、tempfile.gettempdir() が失敗するときには os.getenv('temp') を使うようなので、環境変数 TEMP の設定を消さないようにする必要があります。(普通にユーザーを作ったらこの変数が未設定になることはないようです)
本家のチケット2729 http://www.nvda-project.org/ticket/2729
以下は Mick さんからのコメント:
I'm hoping that main 5581 fixes the issue. Please reopen #2729 if it does not.
Please note that the reason NVDA did not run when you deleted the temp and tmp variables is a different issue. So when testing, please make sure these variables are back the way they should be in any normal user profile.
Thanks for reporting.
本家の 5581 を自分でビルドしてみました。
Windows 7 では解決したものの、XP では直っていないようです。
本家の 5581 スナップショットが公開されたらもう一度試してみます。
As far as my own build of 5581 (not the NVAccess snapshot), the bug was fixed with Windows 7 sp1 x64.
The same error still occurs with Windows xp sp3.
本家の 5581 スナップショットを待つあいだ、日本語版にマージして Windows XP で試しました。
nvda_noUIAccess.exe.log Traceback (most recent call last): File "nvda.pyw", line 148, in <module> File "logHandler.pyc", line 324, in initialize File "logHandler.pyc", line 204, in __init__ IOError: [Errno 13] Permission denied: 'c:\\temp\\nvda.log' set TEMP の結果 TEMP=C:\DOCUME~1\川山\LOCALS~1\Temp set TMP の結果 TMP=C:\DOCUME~1\川山\LOCALS~1\Temp
Windws 7 では os.gettemp('temp') が set TEMP の値を返しているのですが。。
もしやと思って確認したらテスト環境には C:\temp というディレクトリがあったので、これを別名に変更してみたところ、なんと起動しました。。
本家 main 5586 で追加の修正が行なわれました。
lp:nvdajp 4411 でマージされました。
日本語版をビルドして試してみたところ、問題が解決されていました。
Windows XP で C:\temp が存在していても、launcher のログが下記のようになっており、ユーザーの一時ファイルディレクトリが正しく作られていました。
INFO - nvda (20:29:46): Starting NVDA INFO - core.main (20:29:46): Config dir: C:\DOCUME~1\川山\LOCALS~1\Temp\nsd7.tmp\app\userConfig INFO - core.main (20:29:46): NVDA version jpdev121019 INFO - core.main (20:29:46): Using Windows version sys.getwindowsversion(major=5, minor=1, build=2600, platform=2, service_pack='Service Pack 3') INFO - core.main (20:29:46): Using Python version 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] INFO - core.main (20:29:46): Using comtypes version 0.6.2 INFO - synthDrivers.jtalk._nvdajp_jtalk.initialize (20:29:48): jt_dll C:\DOCUME~1\川山\LOCALS~1\Temp\nsd7.tmp\app\synthDrivers\jtalk\libopenjtalk.dll INFO - synthDrivers.jtalk.mecab.Mecab_initialize (20:29:48): INFO - synthDrivers.jtalk.mecab.Mecab_initialize (20:29:48): mecab:0.993 nvdajp-jtalk-dic (utf-8) 20121014-134920 INFO - synthDrivers.jtalk._nvdajp_jtalk.initialize (20:29:48): libopenjtalk 20120714-120831 INFO - synthDriverHandler.setSynth (20:29:48): Loaded synthDriver nvdajp_jtalk INFO - core.main (20:29:48): Using wx version 2.8.12.0 (msw-unicode) INFO - braille.initialize (20:29:48): Using liblouis version 2.5.1 INFO - braille.BrailleHandler.setDisplayByName (20:29:48): Loaded braille display driver noBraille, current display has 0 cells. WARNING - core.main (20:29:48): Java Access Bridge not available WARNING - core.main (20:29:48): UIA not available INFO - core.main (20:29:48): NVDA initialized INFO - config.save (20:29:56): Configuration saved
下記のコミットで、日本語の独自拡張部分(ヘルプのドキュメントを開く処理)の不具合を、本家の tempfile と同様に修正しました。
lp:nvdajp 4412
本家 2012.3 rev 5604 にて、この件についての修正がコミットされました。
日本語版についてはヘルプのドキュメントをHTAで開く独自修正について、jp2012.3 rev 5617 で本家がオーバーライドした tempfile.tempdir をそのまま使うようにして、また unicode() の引数などの修正を行いました。
Windows XP のユーザー名「川山」の launcher 環境で NVDA のヘルプが表示できることを確認しました。
本家の main 5820 で、この問題に関する追加の修正が行われたとのことです。
http://www.nvda-project.org/ticket/2729#comment:5
日本語ユーザー名でのインストール失敗が 2012.3.1jp でも解決していない場合があるようですが、2013.1jp のベータ版を出したときに再度確認をお願いしたいと思います。
インストーラーの起動について不具合報告を受けていないので、クローズします。
らくらくNVDAに投稿された内容ですが、西本宛にも問い合わせがきて、現在、対応中の問題をこちらに記載します。
ダウンロードした 2012.2.1jp のパッケージが実行できず、下記のエラーが出るとのことです。
また、別の環境ではインストールしたファイルが実行できず下記のエラーが出るそうです。
ダウンロードされたファイルのサイズ(バイト数)は問題がないようです。
本家チケット2198に似た報告がありますが解決方法が記載されていません。
http://www.nvda-project.org/ticket/2198
なにか進展があったら追記します。