onyxbits / raccoon4

APK Downloader for Google Play
https://raccoon.onyxbits.de
Apache License 2.0
655 stars 91 forks source link

Empty database crash in DatabaseManager.java:139 #46

Open saper opened 6 years ago

saper commented 6 years ago

I got this when starting Racoon for a very first time with no database by clicking "View" and selecting "My Apps"

Looks like we shouldn't try to set autocommit then no connection has not been obtained in DatabaseManager.java:139

2018-01-02 16:01:49.281:INFO:oejs.Server:jetty-8.y.z-SNAPSHOT
2018-01-02 16:01:49.349:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:20579
java.lang.NullPointerException
    at de.onyxbits.raccoon.db.DatabaseManager.get(DatabaseManager.java:139)
    at de.onyxbits.raccoon.appmgr.MyAppsViewBuilder.assemble(MyAppsViewBuilder.java:197)
    at de.onyxbits.weave.swing.AbstractPanelBuilder.build(AbstractPanelBuilder.java:56)
    at de.onyxbits.weave.swing.WindowBuilder.build(WindowBuilder.java:196)
onyxbits commented 6 years ago

I'm pretty sure, there was a reason for setting autocommit to false, but right now, I'm unable to think straight. This isn't a critical bug, right?

saper commented 6 years ago

Sure, it is not - I was just starting up racoon for a very first time and seeing an exception scrolling down wasn't a good sign (especially since I am using FreeBSD which is kind of unsupported). But #47 seems to fix it.