GithubHelp home page GithubHelp logo

Comments (18)

segler-alex avatar segler-alex commented on June 6, 2024

i am testing this app with 4 different devices: s2, s5, fairphone 1, nexus 7
but i cannot reproduce your issue.
which device do you use?
could you provide a log?
App for displaying logs: catlog in fdroid and logcat in playstore

from radiodroid.

zoff99 avatar zoff99 commented on June 6, 2024

still the same problem, doing network stuff on main thread:

06-18 19:05:34.304: E/AndroidRuntime(13209): FATAL EXCEPTION: main
06-18 19:05:34.304: E/AndroidRuntime(13209): Process: net.programmierecke.radiodroid2, PID: 13209
06-18 19:05:34.304: E/AndroidRuntime(13209): android.os.NetworkOnMainThreadException
06-18 19:05:34.304: E/AndroidRuntime(13209): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1147)
06-18 19:05:34.304: E/AndroidRuntime(13209): at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:249)
06-18 19:05:34.304: E/AndroidRuntime(13209): at libcore.io.IoBridge.recvfrom(IoBridge.java:553)
06-18 19:05:34.304: E/AndroidRuntime(13209): at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485)
06-18 19:05:34.304: E/AndroidRuntime(13209): at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37)
06-18 19:05:34.304: E/AndroidRuntime(13209): at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okio.Okio$2.read(Okio.java:113)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okio.RealBufferedSource.indexOf(RealBufferedSource.java:147)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:94)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okhttp.internal.http.HttpConnection$ChunkedSource.readChunkSize(HttpConnection.java:512)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okhttp.internal.http.HttpConnection$ChunkedSource.read(HttpConnection.java:495)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okhttp.internal.Util.skipAll(Util.java:227)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okhttp.internal.http.HttpConnection.discard(HttpConnection.java:216)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okhttp.internal.http.HttpConnection$ChunkedSource.close(HttpConnection.java:540)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okio.RealBufferedSource.close(RealBufferedSource.java:198)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okio.RealBufferedSource$1.close(RealBufferedSource.java:181)
06-18 19:05:34.304: E/AndroidRuntime(13209): at net.programmierecke.radiodroid2.StreamProxy.stop(StreamProxy.java:303)
06-18 19:05:34.304: E/AndroidRuntime(13209): at net.programmierecke.radiodroid2.PlayerService.Stop(PlayerService.java:473)
06-18 19:05:34.304: E/AndroidRuntime(13209): at net.programmierecke.radiodroid2.PlayerService$1.Stop(PlayerService.java:75)
06-18 19:05:34.304: E/AndroidRuntime(13209): at net.programmierecke.radiodroid2.PlayerServiceUtil.stop(PlayerServiceUtil.java:55)
06-18 19:05:34.304: E/AndroidRuntime(13209): at net.programmierecke.radiodroid2.ActivityPlayerInfo$3.onClick(ActivityPlayerInfo.java:106)
06-18 19:05:34.304: E/AndroidRuntime(13209): at android.view.View.performClick(View.java:4797)
06-18 19:05:34.304: E/AndroidRuntime(13209): at android.view.View$PerformClick.run(View.java:19899)
06-18 19:05:34.304: E/AndroidRuntime(13209): at android.os.Handler.handleCallback(Handler.java:739)
06-18 19:05:34.304: E/AndroidRuntime(13209): at android.os.Handler.dispatchMessage(Handler.java:95)
06-18 19:05:34.304: E/AndroidRuntime(13209): at android.os.Looper.loop(Looper.java:135)
06-18 19:05:34.304: E/AndroidRuntime(13209): at android.app.ActivityThread.main(ActivityThread.java:5310)

from radiodroid.

zoff99 avatar zoff99 commented on June 6, 2024

06-18 18:42:17.710: E/AndroidRuntime(12894): FATAL EXCEPTION: main
06-18 18:42:17.710: E/AndroidRuntime(12894): Process: net.programmierecke.radiodroid2, PID: 12894
06-18 18:42:17.710: E/AndroidRuntime(12894): java.lang.RuntimeException: Unable to start service net.programmierecke.radiodroid2.PlayerService@3d894437 with Intent { act=stop flg=0x10000000 cmp=net.programmierecke.radiodroid2/.PlayerService bnds=[193,413][1056,557] }: android.os.NetworkOnMainThreadException
06-18 18:42:17.710: E/AndroidRuntime(12894): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2956)
06-18 18:42:17.710: E/AndroidRuntime(12894): at android.app.ActivityThread.access$2200(ActivityThread.java:154)
06-18 18:42:17.710: E/AndroidRuntime(12894): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1419)
06-18 18:42:17.710: E/AndroidRuntime(12894): at android.os.Handler.dispatchMessage(Handler.java:102)
06-18 18:42:17.710: E/AndroidRuntime(12894): at android.os.Looper.loop(Looper.java:135)
06-18 18:42:17.710: E/AndroidRuntime(12894): at android.app.ActivityThread.main(ActivityThread.java:5310)
06-18 18:42:17.710: E/AndroidRuntime(12894): at java.lang.reflect.Method.invoke(Native Method)
06-18 18:42:17.710: E/AndroidRuntime(12894): at java.lang.reflect.Method.invoke(Method.java:372)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
06-18 18:42:17.710: E/AndroidRuntime(12894): Caused by: android.os.NetworkOnMainThreadException
06-18 18:42:17.710: E/AndroidRuntime(12894): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1147)
06-18 18:42:17.710: E/AndroidRuntime(12894): at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:249)
06-18 18:42:17.710: E/AndroidRuntime(12894): at libcore.io.IoBridge.recvfrom(IoBridge.java:553)
06-18 18:42:17.710: E/AndroidRuntime(12894): at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485)
06-18 18:42:17.710: E/AndroidRuntime(12894): at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37)
06-18 18:42:17.710: E/AndroidRuntime(12894): at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okio.Okio$2.read(Okio.java:113)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okio.RealBufferedSource.indexOf(RealBufferedSource.java:147)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:94)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okhttp.internal.http.HttpConnection$ChunkedSource.readChunkSize(HttpConnection.java:512)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okhttp.internal.http.HttpConnection$ChunkedSource.read(HttpConnection.java:495)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okhttp.internal.Util.skipAll(Util.java:227)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okhttp.internal.http.HttpConnection.discard(HttpConnection.java:216)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okhttp.internal.http.HttpConnection$ChunkedSource.close(HttpConnection.java:540)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okio.RealBufferedSource.close(RealBufferedSource.java:198)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okio.RealBufferedSource$1.close(RealBufferedSource.java:181)
06-18 18:42:17.710: E/AndroidRuntime(12894): at net.programmierecke.radiodroid2.StreamProxy.stop(StreamProxy.java:303)
06-18 18:42:17.710: E/AndroidRuntime(12894): at net.programmierecke.radiodroid2.PlayerService.Stop(PlayerService.java:473)
06-18 18:42:17.710: E/AndroidRuntime(12894): at net.programmierecke.radiodroid2.PlayerService.onStartCommand(PlayerService.java:264)
06-18 18:42:17.710: E/AndroidRuntime(12894): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2939)
06-18 18:42:17.710: E/AndroidRuntime(12894): ... 10 more

from radiodroid.

zoff99 avatar zoff99 commented on June 6, 2024

put this in your onCreate() method to find all these problems:

        ------- only after API level 9 -------
        ------- only after API level 9 -------
            try
            {
                StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectAll().penaltyDeath().penaltyLog().build());
                StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().detectAll().penaltyLog().build());
        
                    StrictMode.ThreadPolicy old = StrictMode.getThreadPolicy();
                    StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder(old).permitDiskWrites().build());
                    old = StrictMode.getThreadPolicy();
                    StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder(old).permitDiskReads().build());
        
                }
                catch (NoClassDefFoundError e)
                {
                }
        ------- only after API level 9 -------
        ------- only after API level 9 -------

from radiodroid.

zoff99 avatar zoff99 commented on June 6, 2024

still happens on 0.20 version

from radiodroid.

zoff99 avatar zoff99 commented on June 6, 2024

any new on this? this is very bad :-(

from radiodroid.

segler-alex avatar segler-alex commented on June 6, 2024

thank you for your help!
i still cannot reproduce this, but your Log helped a lot.
please try again in version 0.21

from radiodroid.

zoff99 avatar zoff99 commented on June 6, 2024

no problem. if it happens again i will send log again.
when will 0.21 be available on f-droid?

from radiodroid.

segler-alex avatar segler-alex commented on June 6, 2024

fdroid takes 24 hours. :(

from radiodroid.

segler-alex avatar segler-alex commented on June 6, 2024

app-release.apk.zip

from radiodroid.

segler-alex avatar segler-alex commented on June 6, 2024

that is the current build, if you check it now, i will wait with pushing to fdroid

from radiodroid.

segler-alex avatar segler-alex commented on June 6, 2024

i pushed the new build, because i got no answer

from radiodroid.

zoff99 avatar zoff99 commented on June 6, 2024

i can not test now. at home it works. but normally i use it in my car with blutooth.
when i use it in the car next time i will tell you ASAP.

thanks for your work!

from radiodroid.

zoff99 avatar zoff99 commented on June 6, 2024

0.21 works fine now. thanks!

from radiodroid.

segler-alex avatar segler-alex commented on June 6, 2024

cool!

from radiodroid.

zoff99 avatar zoff99 commented on June 6, 2024

aso, du bist eh aus wien :-)

from radiodroid.

segler-alex avatar segler-alex commented on June 6, 2024

yes :) du auch?

from radiodroid.

zoff99 avatar zoff99 commented on June 6, 2024

yup. stupid that on github you can not send private messages.

from radiodroid.

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.