Stops working in release mode

DOCCDOCC USMember ✭✭

I have a app that receives information over the internet. It works fine running on the tablet in debug mode. When I put it in release mode it works fine for about 20 minutes and then locks up. Anyone got any ideas what's causing this? The fact it works for a few minutes is extremely frustrating, and make the problem hard to fine. How can I find this problem? Doesn't running in debug mode use more resources on the tablet?

Answers

  • JonDouglasJonDouglas USXamarin Team, University, Developer Group Leader Xamurai

    There's many variables that go into this. Have you grabbed logs from your adb logcat to see why the application is locking up?

    Sadly there's not enough information in your post to help diagnose what's going on. The first thing you should do it minimize the variables between Debug / Release modes. For example a major issue is the Linker setting in Debug vs. Release as it can potentially strip code.

    https://developer.xamarin.com/guides/android/advanced_topics/linking/

  • LjusnanLjusnan DEMember ✭✭✭
    edited March 2017

    @DOCC
    Here are some things you can try
    1) Check the internet permission. In debug mode internet permission is automatically added.
    2) Give all permissions your app might need. Access to network/internet/external storage for example. Also check for runtime permissions in Android Marshmallow and Nougat.
    3) Disable "Use Shared Runtime"
    4) Disable Proguard and AOT Compilation
    5) Set Linking to "None"
    6) Set Java Max Heap Size to "1G"
    7) Check all supported architectures

    Also check for information in logcat.

  • DOCCDOCC USMember ✭✭

    Thanks for the replies. I hope to give these ideas a try in the next couple of days.

  • DOCCDOCC USMember ✭✭

    I ran a test and the program locked up at 13:05:55. The program puts the time on the screen every couple of seconds so I know at what time it locks up when the screen quits updating. Here is the log file around that time. The app is receiving data over port 8899.

    I noticed the error:

    04-11 13:05:27.076  Acer A1-850 Info    515 WAKELOCK_ACQUIRE    TIMESTAMP=1125012291626306,     TAG=NlpWakeLock, TYPE=PARTIAL_WAKE_LOCK             , COUNT=0, PID=25775, UID=10012, FLAGS=
    

    around that time. What does this mean?

  • DOCCDOCC USMember ✭✭

    Here is another run. The lockup occurred at 17:42:25.

Sign In or Register to comment.