
Ubuntu日本語フォーラム

ログインしていません。
[環境]
eclipse-cpp-2019-12-R-linux-gtk-x86_64
pleiades-2019.11.29 (ダウンロード版)
$ java --version
openjdk 11.0.5 2019-10-15
OpenJDK Runtime Environment (build 11.0.5+10-post-Ubuntu-0ubuntu1.118.04)
OpenJDK 64-Bit Server VM (build 11.0.5+10-post-Ubuntu-0ubuntu1.118.04, mixed mode, sharing)
[症状]
eclipse.ini の
-Xverify:none
オプションを外すと、起動せず。
[eclipse-workspace/.metadata/.log]
!SESSION 2019-12-28 16:00:02.809 -----------------------------------------------
eclipse.buildId=4.14.0.I20191210-0610
java.version=11.0.5
java.vendor=Private Build
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=ja_JP
Framework arguments: -product org.eclipse.epp.package.cpp.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.cpp.product -clean
!ENTRY org.eclipse.e4.ui.workbench.swt 4 2 2019-12-28 16:00:16.955
!MESSAGE プラグイン "org.eclipse.e4.ui.workbench.swt" からのコードの起動で問題が発生しました。
!STACK 0
java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
org/eclipse/jface/viewers/StyledString.<init>(Ljava/lang/String;)V @18: invokespecial
Reason:
Type uninitializedThis (current frame, stack[7]) is not assignable to 'java/lang/Object'
Current Frame:
bci: @18
flags: { flagThisUninit }
locals: { uninitializedThis, 'java/lang/String' }
stack: { 'java/lang/String', uninitialized 1, uninitialized 1, 'jp/sourceforge/mergedoc/pleiades/runtime/advice/JointPoint$EditPoint', 'java/lang/String', 'java/lang/String', 'java/lang/String', uninitializedThis }
Bytecode:
0000000: 2bbb 0114 59b2 011a 1301 1c13 011e 1301
0000010: 1f2a b701 22b8 0128 4c2a 2b01 b700 f2b1
0000020:[解決策]
plugins/jp.sourceforge.mergedoc.pleiades/conf/pleiades-config.xml を修正。
[修正パッチ]
--- a/eclipse/plugins/jp.sourceforge.mergedoc.pleiades/conf/pleiades-config.xml.orig
+++ b/eclipse/plugins/jp.sourceforge.mergedoc.pleiades/conf/pleiades-config.xml
@@ -1153,7 +1153,7 @@
<jointPoint
className="org.eclipse.jface.viewers.StyledString"
methodName="StyledString"
- descriptor="(Ljava/lang/String;)V">
+ descriptor="(Ljava/lang/Object;)V">
<!-- 呼び出し元による限定 (Buildship 3.0 Gradle タスク・ビュー > グループ名) 2018.12.23 -->
<!-- → shadow など翻訳しないようほうが良いグループがあるため廃止修正後、
-Xverify:none オプションを外しても、エラー無く起動。
オフライン
ついでに、pleiades-config-idea.xmlのエラー
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Start Failed: Internal error. Please refer to http://jb.gg/ide/critical-startup-errors
java.lang.VerifyError: Expecting a stack map frame
Exception Details:
Location:
com/intellij/openapi/util/text/StringUtil.pluralize(Ljava/lang/String;)Ljava/lang/String; @33: athrow
Reason:
Expected stackmap frame at this location.
Bytecode:
0000000: 2ab0 00a7 ffff 0000 a7ff fe00 0000 0000
0000010: 0000 0000 a7ff f700 00a7 fffe 0000 a7ff
0000020: febf 0000 0000 0000 a7ff fa00 0000 0000
0000030: 0000 0000 0000 0000 0000 0000 0000 0000
0000040: 0000 00a7 ffe8 0000 a7ff febf 0000 0000
0000050: 0000 0000 0000 0000 0000 0000 0000 0000
0000060: 0000 0000 a7ff e800 00a7 fffe bf
Stackmap Table:
same_frame(@2)
same_frame(@6)
same_frame(@11)
same_frame(@23)
same_frame(@28)
same_frame(@34)
same_frame(@43)
same_frame(@70)
same_frame(@76)
same_frame(@103)
at com.intellij.openapi.util.SystemInfo.<clinit>(SystemInfo.java:42)
at com.intellij.openapi.application.PathManager.platformPath(PathManager.java:615)
at com.intellij.openapi.application.PathManager.platformPath(PathManager.java:602)
at com.intellij.openapi.application.PathManager.getDefaultConfigPathFor(PathManager.java:269)
at com.intellij.openapi.application.PathManager.getCustomOptionsDirectory(PathManager.java:316)
at com.intellij.openapi.application.PathManager.getCustomPropertiesFile(PathManager.java:471)
at com.intellij.openapi.application.PathManager.loadProperties(PathManager.java:442)
at com.intellij.idea.Main.bootstrap(Main.java:87)
at com.intellij.idea.Main.main(Main.java:77)
-----
JRE 11.0.5+10-b520.17 amd64 by JetBrains s.r.o[解決策]
plugins/jp.sourceforge.mergedoc.pleiades/conf/pleiades-config-idea.xml を修正。
[修正パッチ]
--- a/plugins/jp.sourceforge.mergedoc.pleiades/conf/pleiades-config-idea.xml.orig
+++ b/plugins/jp.sourceforge.mergedoc.pleiades/conf/pleiades-config-idea.xml
@@ -560,7 +560,7 @@
</pointCut>
<pointCut editPoint="execution" timing="before">
<advice><![CDATA[
- return $1;
+ return $_;
]]></advice>
<!-- 複数形変換を無効化 (限定翻訳は around で処理) -->オフライン
#1の訂正。
[修正パッチ]
--- a/eclipse/plugins/jp.sourceforge.mergedoc.pleiades/conf/pleiades-config.xml.orig
+++ b/eclipse/plugins/jp.sourceforge.mergedoc.pleiades/conf/pleiades-config.xml
@@ -1150,8 +1150,13 @@
<includeTrace className="net.certiv.ntail.dialogs.ViewerDialog"/>
</jointPoint>
-
+ </pointCut>
<!-- JFace 装飾テキスト -->
+ <pointCut editPoint="execution" timing="before">
+ <advice><![CDATA[
+ $1 = ?{translation.class}.translate($1, null);
+ ]]></advice>
+
<jointPoint
className="org.eclipse.jface.viewers.StyledString"
methodName="StyledString"
@@ -1164,12 +1169,12 @@
-->
<!-- 呼び出し元による限定 (Kotlin プロジェクトのツリーラベル:Kotlin ランタイム・ライブラリー) 2017.05.26 -->
- <includeTrace className="org.eclipse.jdt.ui.JavaElementLabels"
- methodName="getStyledContainerEntryLabel"/>
+ <!--includeTrace className="org.eclipse.jdt.ui.JavaElementLabels"
+ methodName="getStyledContainerEntryLabel"/-->
<!-- 呼び出し元による限定 (インスタ検索ビュー) 2016.07.15 -->
- <includeTrace className="it.unibz.instasearch.ui.ResultLabelProvider"
- methodName="getStyledText"/>
+ <!--includeTrace className="it.unibz.instasearch.ui.ResultLabelProvider"
+ methodName="getStyledText"/-->
</jointPoint>[原因]
#1のエラーログと、ソースコード TranslationEditor.java を見比べると、
$0 が uninitializedThis らしい。
Pleiades/src/main/java/jp/sourceforge/mergedoc/pleiades/runtime/TranslationEditor.java
一部抜粋
private String bindArguments(String advice, JointPoint whereJP, JointPoint targetJP) {
long start = System.nanoTime();
// ?{JOINT_POINT} を new JointPont(...) に置換
if (advice.contains("?{JOINT_POINT}")) {
advice = advice.replaceAll("\\?\\{JOINT_POINT\\}",
Matcher.quoteReplacement(
"new " + RuntimeJointPoint.class.getName() + "(" +
EditPoint.class.getName() + "." + whereJP.getEditPoint().name() +
",\"" + whereJP.getClassName() + "\"" +
",\"" + whereJP.getMethodName() + "\"" +
",\"" + whereJP.getDescriptor() + "\"" +
", $0" +
")"
)
);
}/eclipse/configuration/jp.sourceforge.mergedoc.pleiades/transformed-class.cache 内の
/org.eclipse.jface_3.22.0.v20201106-0834.jar/org.eclipse.jface.viewers.StyledString を
展開して、 StyledString.class にリネーム javap すると
一部抜粋
public org.eclipse.jface.viewers.StyledString(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
0: aload_1
1: aconst_null
2: invokestatic #293 // Method jp/sourceforge/mergedoc/pleiades/runtime/resource/Translations.translate:(Ljava/lang/String;Ljp/sourceforge/mergedoc/pleiades/runtime/advice/RuntimeJointPoint;)Ljava/lang/String;
5: astore_1
6: aload_0
7: aload_1
8: aconst_null
9: invokespecial #252 // Method "<init>":(Ljava/lang/String;Lorg/eclipse/jface/viewers/StyledString$Styler;)V
12: return
LineNumberTable:
line 120: 6
line 121: 12
LocalVariableTable:
Start Length Slot Name Signature
0 13 0 this Lorg/eclipse/jface/viewers/StyledString;
0 13 1 string Ljava/lang/String;Method が挿入されているので、これでいいのではないかと思います。
ただ、どこが翻訳されているのかは、よく分かりませんが。
オフライン
[結論]
#3のように修正すると、プロジェクト・エクスプローラー内のフォルダー名等が翻訳されてしまうため、いらない。
[修正パッチ]
--- a/eclipse/plugins/jp.sourceforge.mergedoc.pleiades/conf/pleiades-config.xml.orig
+++ b/eclipse/plugins/jp.sourceforge.mergedoc.pleiades/conf/pleiades-config.xml
@@ -1151,28 +1151,6 @@
</jointPoint>
- <!-- JFace 装飾テキスト -->
- <jointPoint
- className="org.eclipse.jface.viewers.StyledString"
- methodName="StyledString"
- descriptor="(Ljava/lang/String;)V">
-
- <!-- 呼び出し元による限定 (Buildship 3.0 Gradle タスク・ビュー > グループ名) 2018.12.23 -->
- <!-- → shadow など翻訳しないようほうが良いグループがあるため廃止
- <includeTrace className="org.eclipse.buildship.ui.internal.view.task.TaskNameLabelProvider"
- methodName="getGroupText"/>
- -->
-
- <!-- 呼び出し元による限定 (Kotlin プロジェクトのツリーラベル:Kotlin ランタイム・ライブラリー) 2017.05.26 -->
- <includeTrace className="org.eclipse.jdt.ui.JavaElementLabels"
- methodName="getStyledContainerEntryLabel"/>
-
- <!-- 呼び出し元による限定 (インスタ検索ビュー) 2016.07.15 -->
- <includeTrace className="it.unibz.instasearch.ui.ResultLabelProvider"
- methodName="getStyledText"/>
-
- </jointPoint>
-
</pointCut>
<!-- 通常翻訳 (before・第 1 引数) 退避付き -->オフライン
> [原因]
> #1のエラーログと、ソースコード TranslationEditor.java を見比べると、
> $0 が uninitializedThis らしい。
詳細な考察ありがとうございます。
-Xverify:none をはずすとコンストラクタ呼び出し前の this を表す $0 が参照できないようです。
次回リリースで、udooon さんの最終対応と同じように削除します。
オフライン