syvaidya / openstego

OpenStego is a steganography application that provides two functionalities: a) Data Hiding: It can hide any data within an image file. b) Watermarking: Watermarking image files with an invisible signature. It can be used to detect unauthorized file copying.
https://www.openstego.com
GNU General Public License v2.0
1.13k stars 206 forks source link

java.lang.NullPointerException in com.openstego.desktop.util.UserPreferences.init #33

Closed aep closed 4 years ago

aep commented 4 years ago
java.lang.NullPointerException
    at com.openstego.desktop.util.UserPreferences.init(UserPreferences.java:57)
    at com.openstego.desktop.OpenStego.main(OpenStego.java:429)
aep@stark: ~ java -version 
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-b05)
OpenJDK 64-Bit Server VM (build 25.222-b05, mixed mode)
Sohex commented 4 years ago

I see the same issue on a different java version:

java -version
openjdk version "11.0.4" 2019-07-16
OpenJDK Runtime Environment (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3)
OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3, mixed mode, sharing)

Interestingly enough I don't see the issue using v1.8.0_222 as above, but it is a different build:

java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~18.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)
JacobSyndeo commented 4 years ago

Happening on mine too:

java -version
java version "14.0.1" 2020-04-14
Java(TM) SE Runtime Environment (build 14.0.1+7)
Java HotSpot(TM) 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)

(Running on macOS 10.15.4, if that matters)

Edit Ran exactly the same command one more time, and it worked this time. 🤷🏻‍♂️

syvaidya commented 4 years ago

I think first time it does not find openstego.ini file that stores the user preferences in the user's home directory. It might create the file though before exception occurs, and so next time onwards it does not give this error. I'll have to debug.

syvaidya commented 4 years ago

This is a duplicate of #31 and it is already fixed in main branch. Next release will have the fix. Meanwhile just run openstego again to start it.