-
Notifications
You must be signed in to change notification settings - Fork 22
NullPointerException #8
Comments
thats probably the contract is not in the directory the studio reads from. right now it creates in the /User/username/TronStudio/source/ when creates new file. Also make sure you use the latest version of studio branch to build |
Thank you for the prompt response.
I didn't specified any directory because I don't see any button for that. |
I tried again from 0 and didnt have any error, this is what my procedure: download from https://github.com/tronprotocol/tron-studio/archive/1.0.0.zip unzip it and go to the directory ./gradlew build -x test -x check java -jar build/libs/TronStudio.jar |
Did everything as you described, also from 0 with your zip. Still get the error in console when press "Compile" button. No any message in UI.
Updated JDK to the latest version in repository:
Just FYI, also had errors during building:
But in the end:
System: |
Hi, I've, been debugging and found that the problem on Ubuntu Linux system 16.04 LTS (xenial) is in fact that libz3.so.4 is not available to solc binary: solidityCompilerResult.errors = /home/krome/TronStudio/compiler/solc: error while loading shared libraries: libz3.so.4: cannot open shared object file: No such file or directory Quick fix (but not a reliable one, multiverse does not contain the package so i just used launchpad one): Check if you have: /usr/lib/x86_64-linux-gnu/libz3.so.4 shared library in path. RERUN Application. It should work, at least it did for me. :) -Krome Plasma (Kromulan) |
I am sure different linux, unix distributions have a similar solution (just find libz3 package). |
To author, this is a dynamically linked binary: krome:~/Development/tron-studio$ ldd src/main/resources/bin/linux/solc Perhaps distributing these as statically compiled binaries would be a bit less problematic in this aspect. |
kromulan, thank you. I installed z3 and now have libz3: Then built everything from beginning. |
It works with manually created symlink libz3.so.4 to libz3.so. |
I was facing the same problem. The solution presented by @kromulan worked for me. Thank you. |
Ran into this issue as well. @kromulan solution also worked for me. |
got same error at macos, but @kromulan solution cannot work on mac |
@aker0357 Open a TronStudio.jar. There is a bin\mac directory, decompress it and use ldd equivalent tool i believe it's otool (http://schumakov.info/howto-osx.php). Check solc's dynamically linked libraries, see if they are all there on your system. I did not check the osx version as i don't use osx. I'll see if i can get access to an osx machine and check it out tommorow at work. Anyway the problem on x86/amd64 version for linux was missing dynamically linked compression libz/zlib library. I am not sure with mac but there's no harm to check (the dylib, could also possibly be provided by brew on osx, try and let us know). Hope this helps until i get more information if i am able to. |
@kromulan there is something weird that, at first I had errors during building like gvitali and the TronStudio.jar is not executable, then I try some solutions from this thread and other similar problem . Sadly, most of solution is for linux and did not work on me, after the auto update of Mac OS the compile seems still has error but the jar is executable. I would try your comment to check what's the problem after working hours, thanks a lot. |
When I used tron studio, I found that importing eth smart contract, click compile to display sha3 function not found |
when i comile the contract, tips show success, but there have nothing in detail, just empty, anybody know what happend??? |
Same problem... When I compile, empty... |
Hi. I always get this exception in console when try to compile any solidity code (e.g. HelloWorld from the tutorial). There are no any reaction in the app after "Compile" pressed.
HelloWorld.sol java.lang.NullPointerException22:42:54.956 ERROR [Thread-89] [DefaultConfig](DefaultConfig.java:28) Uncaught exception Thread[Thread-89,5,main],java.lang.NullPointerException at org.tron.studio.solc.CompilationErrorResult.parse(CompilationErrorResult.java:65) at org.tron.studio.ui.RightTabCompileController.lambda$onClickCompile$10(RightTabCompileController.java:75) at java.lang.Thread.run(Thread.java:748)
Archlinux,
Oracle JDK
$ java -version java version "1.8.0_181" Java(TM) SE Runtime Environment (build 1.8.0_181-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
What could I do to make it working?
The text was updated successfully, but these errors were encountered: