Skip to content

Commit 9618247

Browse files
committed
Merge branch 'GT-3280_ryanmkurtz_python' into patch
2 parents 6b81682 + dd05514 commit 9618247

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

Ghidra/Features/Base/.launch/Ghidra.launch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
<listAttribute key="org.eclipse.jdt.launching.MODULEPATH"/>
2525
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="ghidra.GhidraRun"/>
2626
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Framework Utility"/>
27-
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:+IgnoreUnrecognizedVMOptions -Djava.system.class.loader=ghidra.GhidraClassLoader -Dfile.encoding=UTF8 -Duser.country=US -Duser.language=en -Dsun.java2d.pmoffscreen=false -Dsun.java2d.xrender=true -Dsun.java2d.d3d=false -Xdock:name=&quot;Ghidra&quot; -Dvisualvm.display.name=Ghidra"/>
27+
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:+IgnoreUnrecognizedVMOptions -Djava.system.class.loader=ghidra.GhidraClassLoader -Dfile.encoding=UTF8 -Duser.country=US -Duser.language=en -Dsun.java2d.pmoffscreen=false -Dsun.java2d.xrender=true -Dsun.java2d.d3d=false -Xdock:name=&quot;Ghidra&quot; -Dvisualvm.display.name=Ghidra -Dpython.console.encoding=UTF-8"/>
2828
</launchConfiguration>

Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/interpreter/InterpreterComponentProvider.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,15 @@ public void dispose() {
171171

172172
@Override
173173
public void componentActivated() {
174-
// Call the callbacks
175-
firstActivationCallbacks.forEach(l -> l.call());
176174

177-
// Since we only care about the first activation, clear the list
178-
// of callbacks so future activations don't trigger anything.
175+
// Since we only care about the first activation, clear the list of callbacks so future
176+
// activations don't trigger anything. First save them off to a local list so when we
177+
// process them we aren't affected by concurrent modification due to reentrance.
178+
List<Callback> callbacks = new ArrayList<>(firstActivationCallbacks);
179179
firstActivationCallbacks.clear();
180+
181+
// Call the callbacks
182+
callbacks.forEach(l -> l.call());
180183
}
181184

182185
@Override

Ghidra/RuntimeScripts/Common/support/launch.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ VMARGS=-Dcpu.core.override=
4646
# Default font size for many java swing elements.
4747
VMARGS=-Dfont.size.override=
4848

49+
# Set Jython console encoding (prevents a console error)
50+
VMARGS=-Dpython.console.encoding=UTF-8
51+
4952
# Eclipse on macOS can have file locking issues if the user home directory is networked. Therefore,
5053
# we will disable file locking by default for macOS. Comment the following line out if Eclipse file
5154
# locking is needed and known to work.

0 commit comments

Comments
 (0)