raulhaag / MiMangaNu

*ES - Lector de Manga online / offline, gratuito y de código abierto. *EN - Manga reader online / offline, free and open source. *FR - Lecteur de manga en ligne / hors ligne, gratuit et open source. *DE - Eine App um Manga zu lesen. Man kann damit Manga online und offline lesen. Es ist kostenlos und quelloffen. *IT - Manga lettore online / offline, gratuito e open source. *RU - В России Манга читает вас. Попробуйте MiMangaNu прямо сейчас.
277 stars 73 forks source link

Some minor problems with 1.48 (or devel) #244

Closed Johndeep closed 8 years ago

Johndeep commented 8 years ago

After the fragment rework, I met some huge problems. Here the the problems from small to big:

  1. the download button at the start page doesn't work.
  2. Many downloads aren't working (always a host error)
  3. If you by any chance make a fresh restart (after deleting or similar), the app crashes at boot.

So currently I'm unable to start or even run the app at all, due this crashing at boot. java.lang.RuntimeException: Unable to start activity ComponentInfo{ar.rulosoft.mimanganu/ar.rulosoft.mimanganu.MainActivity}: java.lang.ClassCastException: android.support.v7.preference.PreferenceScreen cannot be cast to android.preference.GenericInflater$Parent

Well, that's that. I've managed to revert to a former state for now.

raulhaag commented 8 years ago

1 / 3 ready but i don't change anithing fron download that is an internet / host problem but i need to add retry in download initialization

xtj-9182 commented 8 years ago

hello, so I wanted to create an issue yesterday since I'm getting start up crashes since v1.46, anyway it seems my problem is the same as johndeep's. I'm on Android 6.0.1 on my Samsung Galaxy S5 (running CM13 nightlys).

If I try to run MiMangaNu v1.46 I'm getting this exception:

FATAL EXCEPTION: main Process: ar.rulosoft.mimanganu, PID: 27519 Theme: themes:{} java.lang.RuntimeException: Unable to start activity ComponentInfo{ar.rulosoft.mimanganu/ar.rulosoft.mimanganu.MainActivity}: java.lang.ClassCastException: android.support.v7.preference.PreferenceScreen cannot be cast to android.preference.GenericInflater$Parent at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2450) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510) at android.app.ActivityThread.-wrap11(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5461) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) Caused by: java.lang.ClassCastException: android.support.v7.preference.PreferenceScreen cannot be cast to android.preference.GenericInflater$Parent at android.preference.GenericInflater.inflate(GenericInflater.java:321) at android.preference.GenericInflater.inflate(GenericInflater.java:264) at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:273) at android.preference.PreferenceManager.setDefaultValues(PreferenceManager.java:486) at android.preference.PreferenceManager.setDefaultValues(PreferenceManager.java:445) at ar.rulosoft.mimanganu.MainActivity.onCreate(MainActivity.java:35) at android.app.Activity.performCreate(Activity.java:6251) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2403) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)  at android.app.ActivityThread.-wrap11(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:148)  at android.app.ActivityThread.main(ActivityThread.java:5461)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 

the exception points to this line: at ar.rulosoft.mimanganu.MainActivity.onCreate(MainActivity.java:35)

PreferenceManager.setDefaultValues(this, R.xml.fragment_preferences, false); //crashing line

br91 is the last safe build for me that works correctly. br96 is startup crashing and all newer travis builds including the official v1.46 from Fdroid are startup crashing for me.

a few random questions: is MiMangaNu checking for Android 6 Permissions correctly ? is MiMangaNu initializing the shared preference manager correctly ?

raulhaag commented 8 years ago

@xtj-9182 test the last commit y 1.47 go to be a bugfix version for f-droid

raulhaag commented 8 years ago

@Johndeep i go to make a branch whit volley can you test it if connection error have a better performance

xtj-9182 commented 8 years ago

no dice still getting the same exception:

FATAL EXCEPTION: main Process: ar.rulosoft.mimanganu, PID: 30579 Theme: themes:{} java.lang.RuntimeException: Unable to start activity ComponentInfo{ar.rulosoft.mimanganu/ar.rulosoft.mimanganu.MainActivity}: java.lang.ClassCastException: android.support.v7.preference.PreferenceScreen cannot be cast to android.preference.GenericInflater$Parent at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2450) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510) at android.app.ActivityThread.-wrap11(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5461) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) Caused by: java.lang.ClassCastException: android.support.v7.preference.PreferenceScreen cannot be cast to android.preference.GenericInflater$Parent at android.preference.GenericInflater.inflate(GenericInflater.java:321) at android.preference.GenericInflater.inflate(GenericInflater.java:264) at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:273) at android.preference.PreferenceManager.setDefaultValues(PreferenceManager.java:486) at android.preference.PreferenceManager.setDefaultValues(PreferenceManager.java:445) at ar.rulosoft.mimanganu.MainActivity.onCreate(MainActivity.java:35) at android.app.Activity.performCreate(Activity.java:6251) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2403) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)  at android.app.ActivityThread.-wrap11(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:148)  at android.app.ActivityThread.main(ActivityThread.java:5461)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 

this time I'm also getting a sql exception:

E/SQLiteLog: (14) cannot open file at line 31278 of [2ef4f3a5b1] 04-24 16:05:51.013 1493-1493/ar.rulosoft.mimanganu E/SQLiteLog: (14) os_unix.c:31278: (2) open(/storage/emulated/0/MiMangaNu/dbs/mangas.db) - 04-24 16:05:51.019 1493-1493/ar.rulosoft.mimanganu E/SQLiteDatabase: Failed to open database '/storage/emulated/0/MiMangaNu/dbs/mangas.db'. android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method) at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:207) at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:191) at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463) at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185) at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177) at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:806) at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:791) at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:694) at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:581) at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:275) at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:223) at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187) at ar.rulosoft.mimanganu.componentes.Database.getDatabase(Database.java:105) at ar.rulosoft.mimanganu.componentes.Database.getMangasCondition(Database.java:221) at ar.rulosoft.mimanganu.componentes.Database.getMangas(Database.java:215) at ar.rulosoft.mimanganu.MainFragment.setListManga(MainFragment.java:290) at ar.rulosoft.mimanganu.MainFragment.getMMView(MainFragment.java:395) at ar.rulosoft.mimanganu.MainFragment$SectionsPagerAdapter.instantiateItem(MainFragment.java:427) at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:943) at android.support.v4.view.ViewPager.populate(ViewPager.java:1091) at android.support.v4.view.ViewPager.populate(ViewPager.java:1025) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1545) at android.view.View.measure(View.java:18799) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:18799) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:391) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1458) at android.widget.LinearLayout.measureVertical(LinearLayout.java:746) at android.widget.LinearLayout.onMeasure(LinearLayout.java:629) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2899) at android.view.View.measure(View.java:18799) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2108) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1224) at android.view.ViewRoo 04-24 16:05:51.019 1493-1493/ar.rulosoft.mimanganu E/SQLiteOpenHelper: Couldn't open /storage/emulated/0/MiMangaNu/dbs/mangas.db for writing (will try read-only): android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method) at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:207) at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:191) at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463) at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185) at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177) at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:806) at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:791) at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:694) at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:581) at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:275) at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:223) at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187) at ar.rulosoft.mimanganu.componentes.Database.getDatabase(Database.java:105) at ar.rulosoft.mimanganu.componentes.Database.getMangasCondition(Database.java:221) at ar.rulosoft.mimanganu.componentes.Database.getMangas(Database.java:215) at ar.rulosoft.mimanganu.MainFragment.setListManga(MainFragment.java:290) at ar.rulosoft.mimanganu.MainFragment.getMMView(MainFragment.java:395) at ar.rulosoft.mimanganu.MainFragment$SectionsPagerAdapter.instantiateItem(MainFragment.java:427) at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:943) at android.support.v4.view.ViewPager.populate(ViewPager.java:1091) at android.support.v4.view.ViewPager.populate(ViewPager.java:1025) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1545) at android.view.View.measure(View.java:18799) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:18799) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:391) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1458) at android.widget.LinearLayout.measureVertical(LinearLayout.java:746) at android.widget.LinearLayout.onMeasure(LinearLayout.java:629) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2899) at android.view.View.measure(View.java:18799) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2108) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1224)

xtj-9182 commented 8 years ago

I pulled the latest commit (9404ea44cba1a53d0113f47b5c02e42a42479154) and now the crashing line changed to this:

at ar.rulosoft.mimanganu.MainActivity.onCreate(MainActivity.java:35)

if (savedInstanceState == null) { //this line is crashing now ?

FATAL EXCEPTION: main Process: ar.rulosoft.mimanganu, PID: 30579 Theme: themes:{} java.lang.RuntimeException: Unable to start activity ComponentInfo{ar.rulosoft.mimanganu/ar.rulosoft.mimanganu.MainActivity}: java.lang.ClassCastException: android.support.v7.preference.PreferenceScreen cannot be cast to android.preference.GenericInflater$Parent at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2450) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510) at android.app.ActivityThread.-wrap11(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5461) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) Caused by: java.lang.ClassCastException: android.support.v7.preference.PreferenceScreen cannot be cast to android.preference.GenericInflater$Parent at android.preference.GenericInflater.inflate(GenericInflater.java:321) at android.preference.GenericInflater.inflate(GenericInflater.java:264) at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:273) at android.preference.PreferenceManager.setDefaultValues(PreferenceManager.java:486) at android.preference.PreferenceManager.setDefaultValues(PreferenceManager.java:445) at ar.rulosoft.mimanganu.MainActivity.onCreate(MainActivity.java:35) at android.app.Activity.performCreate(Activity.java:6251) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2403) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)  at android.app.ActivityThread.-wrap11(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:148)  at android.app.ActivityThread.main(ActivityThread.java:5461)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 

then this shows up:

04-24 16:05:50.918 1493-1545/ar.rulosoft.mimanganu D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true 04-24 16:05:50.986 1493-1545/ar.rulosoft.mimanganu I/Adreno-EGL: : EGL 1.4 QUALCOMM build: Nondeterministic_AU_msm8974_LA.BF.1.1.3_RB1__release_AU (I389a668de0) OpenGL ES Shader Compiler Version: E031.28.00.04 Build Date: 10/24/15 Sat Local Branch: mybranch15621148 Remote Branch: quic/LA.BF.1.1.3_rb1.3 Local Patches: NONE Reconstruct Branch: NOTHING 04-24 16:05:50.988 1493-1545/ar.rulosoft.mimanganu I/OpenGLRenderer: Initialized EGL, version 1.4

and then sql exception:

E/SQLiteLog: (14) cannot open file at line 31278 of [2ef4f3a5b1] 04-24 16:05:51.013 1493-1493/ar.rulosoft.mimanganu E/SQLiteLog: (14) os_unix.c:31278: (2) open(/storage/emulated/0/MiMangaNu/dbs/mangas.db) - 04-24 16:05:51.019 1493-1493/ar.rulosoft.mimanganu E/SQLiteDatabase: Failed to open database '/storage/emulated/0/MiMangaNu/dbs/mangas.db'. android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method) at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:207) at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:191) at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463) at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185) at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177) at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:806) at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:791) at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:694) at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:581) at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:275) at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:223) at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187) at ar.rulosoft.mimanganu.componentes.Database.getDatabase(Database.java:105) at ar.rulosoft.mimanganu.componentes.Database.getMangasCondition(Database.java:221) at ar.rulosoft.mimanganu.componentes.Database.getMangas(Database.java:215) at ar.rulosoft.mimanganu.MainFragment.setListManga(MainFragment.java:290) at ar.rulosoft.mimanganu.MainFragment.getMMView(MainFragment.java:395) at ar.rulosoft.mimanganu.MainFragment$SectionsPagerAdapter.instantiateItem(MainFragment.java:427) at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:943) at android.support.v4.view.ViewPager.populate(ViewPager.java:1091) at android.support.v4.view.ViewPager.populate(ViewPager.java:1025) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1545) at android.view.View.measure(View.java:18799) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:18799) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:391) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1458) at android.widget.LinearLayout.measureVertical(LinearLayout.java:746) at android.widget.LinearLayout.onMeasure(LinearLayout.java:629) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2899) at android.view.View.measure(View.java:18799) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2108) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1224) at android.view.ViewRoo

raulhaag commented 8 years ago

check if mmn odex files are making the line 35 error againg becouse the problem was the set preference, i go do download an andrioid 6 image to test

xtj-9182 commented 8 years ago

update: it's a permission problem

raulhaag commented 8 years ago

manual permision??

xtj-9182 commented 8 years ago

I just uninstalled it and deleted it's folder so I only got the sql error, after granting permissions manually it worked

xtj-9182 commented 8 years ago

So my guess would be that there is no first run permission check

xtj-9182 commented 8 years ago

So I quickly hacked together a prototype:

http://paste.ofcode.org/KWzM54s82777SmUsfTqvPj

and this works but MiMangaNu still crashes once before you give it the permission since the database is trying to access storage before it has any permission to do so. So you need to put this in place of the database somewhere, I would do it myself but I'm kinda sick today :(.

using my hacked together prototype I'm getting this exception before MimangaNu has any permissions: E/SQLiteLog: (14) cannot open file at line 31278 of [2ef4f3a5b1] 04-24 16:24:50.090 11284-11284/ar.rulosoft.mimanganu E/SQLiteLog: (14) os_unix.c:31278: (13) open(/storage/emulated/0/MiMangaNu/dbs/mangas.db) - 04-24 16:24:50.093 11284-11284/ar.rulosoft.mimanganu E/SQLiteDatabase: Failed to open database '/storage/emulated/0/MiMangaNu/dbs/mangas.db'. android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method) at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:207) at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:191) at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463) at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185) at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177) at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:806) at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:791) at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:694) at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:581) at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:275) at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:223) at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187) at ar.rulosoft.mimanganu.componentes.Database.getDatabase(Database.java:105) at ar.rulosoft.mimanganu.componentes.Database.getMangasCondition(Database.java:221) at ar.rulosoft.mimanganu.componentes.Database.getMangas(Database.java:215) at ar.rulosoft.mimanganu.MainFragment.setListManga(MainFragment.java:290) at ar.rulosoft.mimanganu.MainFragment.getMMView(MainFragment.java:395) at ar.rulosoft.mimanganu.MainFragment$SectionsPagerAdapter.instantiateItem(MainFragment.java:427) at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:943) at android.support.v4.view.ViewPager.populate(ViewPager.java:1091) at android.support.v4.view.ViewPager.populate(ViewPager.java:1025) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1545) at android.view.View.measure(View.java:18799) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:18799) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:391) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1458) at android.widget.LinearLayout.measureVertical(LinearLayout.java:746) at android.widget.LinearLayout.onMeasure(LinearLayout.java:629) at android.view.View.measure(View.java:18799) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2899) at android.view.View.measure(View.java:18799) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2108) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1224) at android.view.ViewRoo

raulhaag commented 8 years ago

@xtj-9182 test the last commit i use a part of your code and was usefull

Johndeep commented 8 years ago

@raulhaag now I've tried the fixed version, the download is working again and button works again.

By the way, I'm currently using 5.1.1 or just cm12.1, which still doesn't have the permission management change.

Anyway, I cannot tell if it'll crash at fresh start, but for now, it's okay. This issue is resolved, great work guys!

Johndeep commented 8 years ago

.. hmm, there are still some rough edges. For example the v7 Support Libraries, somehow it causes several theme inconsistency, and the dialog preferences aren't implemented correctly, because changing one slider option seems to affect all the other slider in example.

So with the revamping to fragments there's still some paper cuts to fix.

xtj-9182 commented 8 years ago

@raulhaag thx my start up crash has been fixed and from what I can tell it's working now.

Edit: btw I can confirm johndeep's problem with the sliders. If you go to settings and scroll to the bottom and then up again, you will see how the text under Download slot and Error toleration per chapter are now listed under Update Threads (background) and Update Threads (Manual). Here are some pictures of the problem: https://imgur.com/a/aH7dt first image is normal and then I scroll down in the second picture, everything is still normal but then I scroll up and suddenly in the third picture the description of the sliders is wrong.

xtj-9182 commented 8 years ago

b446a4f75be20befe023b6b8b22ba0925e8d3392 fixed the seekbar issue for me.

raulhaag commented 8 years ago

test last commit of scrollbars

xtj-9182 commented 8 years ago

latest seekbar commit works great on my side

xtj-9182 commented 8 years ago

I spoke too soon, after further testing I found a weird bug with the Update threads (Manual) and Download threads seekbars for some reason when I put the thread numbers at 5 and quickly press back, then when I go back to the PreferencesFragment the value is at 4. This only seems to affect the above mentioned seekbars and only when using 5 for some reason ... I suspect that it might have something to do with the doInBackground function that is running as soon as the PreferencesFragment is opened, note I have about 6-7GB of Manga so it might take longer to process which might be a cause here.

I tested it on v1.48 and on my latest version so my other commit that changed something in the doInBackground method does not affect this bug.

edit: just tested it with 3 instead of 5 and yes it also goes to x-1 so 2 in this case.

Johndeep commented 8 years ago

Was about to write about that "5 to 4" bug too, like @xtj-9182 said. It seems, this need much more work, mostly because of the fragments, now that I had my overview over the new code, many things related to menu and dialogues needs adjustments.

But I don't think it's about the doInBackground, which is called as soon the Preference is called, because its main and only purpose (up until now) is to calculate the size of the collection. And the main reason why it's a background task, is mainly for people with a too big collection to be calculated "instantly". So why does the SeekBar malfunction as this worked perfectly fine with dialogues before?

I think the SeekBarPreference2 needs rework, as even in the first line it is mentioned to be a "filty hack" for instant summary update working. Maybe there are some strange side effects? And why does this class has to be this.. uhm.. messy and cumbersome?

xtj-9182 commented 8 years ago

@Johndeep yeah I agree it can't be doInBackground I just commented it out and the seekbar bug is still there, I just suspected it cause it caused some other crash (see https://github.com/raulhaag/MiMangaNu/issues/250).

raulhaag commented 8 years ago

about seekbar the first version (widget) has the problem on the recycle view used for the preference fragment, i don't know why the view is not fully updated and the info was mixed (in my table when i test did not note this becose all preeference are in 1 screen) in the version with the emegent fragment there is not problem because the seekbar have this own fragment (that work well but not beauty like widgets) and this realy i don't have an idea why do that but maybe somethin similar at first one (about the version made for Jondeep was the base for the second because v7 support )

raulhaag commented 8 years ago

checkuot the last commit if works well

xtj-9182 commented 8 years ago

I made some quick tests and so far it seems to work now on my side.

Johndeep commented 8 years ago

It seems this slider problem is solved, at least I also notice no side effects for now. By the way, I made some corrections and design fixes, so it doesn't look that strange anymore. I mean, somehow the v7 design has serious dimension issues (too big fonts on my Android 5.1.1 in example, but you can read about much more issues on the web). Also, there is some strange behaviour like the cold start, which really takes its time (compared to the past).

Please check out my pull request. By the way, the ColorPref preview Icon is now squared, maybe this looks more modern? (it is a little more efficient and can reshape to adjust to the text length)

xtj-9182 commented 8 years ago

I have the big font thing too mostly noticeable on the preferencesFragment.

I also have the slow cold start, I wonder if that could be caused by the Android 6 Permission request system we recently implemented ? probably it could be improved if that's it.

also one additional minor bug; when you press the floating + it will turn into an x, if you press on the x it will turn back into a +. If you press the + and then press back on a hardware button (or the android software overlay back button for phones with no hardware back button) it won't turn back into a + even though there is no more server list/server fragment, not sure what the name of that fragment is.

xtj-9182 commented 8 years ago

here some pictures of the big fonts: https://imgur.com/a/u2moh first picture is v1.45 and the second is a fresh compiled build from today.

xtj-9182 commented 8 years ago

On the latest commit I'm getting I/FloatingActionButton: Setting a custom background is not supported.

it goes without saying that I can't change the color of the FloatingActionbutton ... I'm on Android 6.0.1 2016_05_16_18 29 52

raulhaag commented 8 years ago

@xtj-9182 new commit to fix background color

xtj-9182 commented 8 years ago

@raulhaag ok so the button looks good now. but you forgot to rename the SeekBarPreference2 -> SeekBarCustomPreference in fragment_preferences.xml Edit2: nevermind I made a PR.

Edit: By the way can we add .idea/gradle.xml + .idea/misc.xml + .idea/modules.xml + app/app.iml + imageviewtouchlibrary/imageviewtouchlibrary.iml to our .gitignore I accidentally messed them up in my last merge.

Johndeep commented 8 years ago

Now that major bugs and crashes are (hopefully) mostly fixed (so cool! ^_^), there are still the little one at "papercut" level to be fixed. For example the big fonts, it just doesn't fit at all, but I know it's a bug from google directly with their v7 packages.

By the way, why do we use the support v7 lib instead just using the native one again?

Anyway, now testing needs more time, because rare crashes or problems does occur as often as shiny Pokémons ^^" (almost too much (un)luck is needed for that). But anyway, really cool work.

raulhaag commented 8 years ago

@Johndeep can't use native becuase frament and compat fragment can't be managed by an unique frabment manager, an to add compatabilitie i decide to use the library v7. @xtj-9182 i need to add those to my gitignore but sametime i have to much work and that make me lazy (.idea/* and .iml) edit:@xtj-9182 .iml are in gitignore but its start to work when install the .ignore plugin in Android Studio

xtj-9182 commented 8 years ago

@raulhaag I made a PR to update the .gitignore

btw what's the eta on v1.49 ? It's been a while since we had a release and 1.48 is full of crashes...

Edit: maybe we should wait a few more days of bug testing before we release 1.49

raulhaag commented 8 years ago

@xtj-9182 if nothing bad happend, can be this weekend

xtj-9182 commented 8 years ago

@raulhaag can we wait until Sunday, recently I found a bug in my okhttpv3 port, I think we need to downgrade to okhttp v2 since I can't find a fix for now :0

Edit: ok so for now I downgraded the code to v2 at least that code seems to have no bugs ... I might re-commit the v3 code some day when I can fix all bugs. So far I can find no other major bugs, so 1.49 is green lit from my side.

xtj-9182 commented 8 years ago

Happy v1.49 everyone !

Johndeep commented 8 years ago

Main and minor frustrating issues are resolved it seems, so I'm closing this up.