GithubHelp home page GithubHelp logo

Comments (4)

Col-E avatar Col-E commented on September 22, 2024 1

Saw you commented on YT, but can't seem to reply there unless you deleted it.

Anyways, the visualize menu only appears when the feature is supported for the given method:

private boolean canUseVm() {
	// Can only be run on JVM classes
	if (!isOwnerJvmClass())
		return false;
	// SSVM must have been initialized
	SsvmIntegration ssvm = RecafUI.getController().getServices().getSsvmIntegration();
	if (!ssvm.isInitialized())
		return false;
	// Cannot run on abstract/native methods
	int access = methodInfo.getAccess();
	return !AccessFlag.isAbstract(access) && !AccessFlag.isNative(access);
}

SSVM has its own page in the config menu. You can check if its active in there, which it should be by default.

from recaf-3x-issues.

Amejonah1200 avatar Amejonah1200 commented on September 22, 2024

To avoid confusion, it would be probably be a good idea on disabling the action instead of removing it.
On click, we could tell then the requirements for it.

from recaf-3x-issues.

KTibow avatar KTibow commented on September 22, 2024

It would probably be better if it said why exactly. I got the menu to pull up on a hello world .class, but it appeared to crash Recaf for a bit:
image
Then the window pulled up. When I clicked optimize it lagged out again for a bit, then gave this error:

SSVM optimize thread encountered VM error
java.lang.UnsatisfiedLinkError: sun/nio/fs/UnixNativeDispatcher.stat0(JLsun/nio/fs/UnixFileAttributes;)V
	at sun.nio.fs.UnixNativeDispatcher.stat0(Native Method)
	at sun.nio.fs.UnixNativeDispatcher.stat(UnixNativeDispatcher.java:301)
	at sun.nio.fs.UnixFileAttributes.get(UnixFileAttributes.java:70)
	at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:52)
	at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:149)
	at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
	at java.nio.file.Files.readAttributes(Files.java:1764)
	at java.util.zip.ZipFile$Source.get(ZipFile.java:1259)
	at java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:733)
	at java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:850)
	at java.util.zip.ZipFile.<init>(ZipFile.java:248)
	at java.util.zip.ZipFile.<init>(ZipFile.java:177)
	at java.util.jar.JarFile.<init>(JarFile.java:350)
	at jdk.internal.loader.URLClassPath$JarLoader.getJarFile(URLClassPath.java:814)
	at jdk.internal.loader.URLClassPath$JarLoader$1.run(URLClassPath.java:759)
	at jdk.internal.loader.URLClassPath$JarLoader$1.run(URLClassPath.java:752)
	at java.security.AccessController.doPrivileged(Native Method)
	at jdk.internal.loader.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:751)
	at jdk.internal.loader.URLClassPath$JarLoader.<init>(URLClassPath.java:726)
	at jdk.internal.loader.URLClassPath$3.run(URLClassPath.java:494)
	at jdk.internal.loader.URLClassPath$3.run(URLClassPath.java:477)
	at java.security.AccessController.doPrivileged(Native Method)
	at jdk.internal.loader.URLClassPath.getLoader(URLClassPath.java:476)
	at jdk.internal.loader.URLClassPath.getLoader(URLClassPath.java:445)
	at jdk.internal.loader.URLClassPath.getResource(URLClassPath.java:314)
	at jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:695)
	at jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
	at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
	at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)

Update: I turned off the "remote vm" thing and it seemed to optimize fine.

from recaf-3x-issues.

KTibow avatar KTibow commented on September 22, 2024

Optimizing isn't working everywhere where I want it to be but it's working good enough.

from recaf-3x-issues.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.