4 Replies Latest reply on May 29, 2014 3:38 AM by Kutir Mobility

    Rho::Network.hasNetwork() causes crash

    Guido Nieuwhof

      Hello,

       

      It seems we have found an issue with RhoMobile 4 calling Rho::Network.hasConnection() on Android.

      After about 500 calls the application stops working with the following error:

       

      E/dalvikvm( 6768): JNI ERROR (app bug): local reference table overflow (max=512)

      W/dalvikvm( 6768): JNI local reference table (0x7a0fb008) dump:

      W/dalvikvm( 6768):   Last 10 entries (of 512):

      W/dalvikvm( 6768):       511: 0x41e2fef8 java.lang.String "NetworkJava"

      W/dalvikvm( 6768):       510: 0x41e17a30 java.lang.Class<com.rhomobile.rhodes.Logger>

      W/dalvikvm( 6768):       509: 0x41e6d678 java.lang.Class<com.motorolasolutions.rho.network.Network>

      W/dalvikvm( 6768):       508: 0x41e6d678 java.lang.Class<com.motorolasolutions.rho.network.Network>

      W/dalvikvm( 6768):       507: 0x41e6d678 java.lang.Class<com.motorolasolutions.rho.network.Network>

      W/dalvikvm( 6768):       506: 0x41e6d678 java.lang.Class<com.motorolasolutions.rho.network.Network>

      W/dalvikvm( 6768):       505: 0x41e6d678 java.lang.Class<com.motorolasolutions.rho.network.Network>

      W/dalvikvm( 6768):       504: 0x41e6d678 java.lang.Class<com.motorolasolutions.rho.network.Network>

      W/dalvikvm( 6768):       503: 0x41e6d678 java.lang.Class<com.motorolasolutions.rho.network.Network>

      W/dalvikvm( 6768):       502: 0x41e6d678 java.lang.Class<com.motorolasolutions.rho.network.Network>

      W/dalvikvm( 6768):   Summary:

      W/dalvikvm( 6768):       510 of java.lang.Class (8 unique instances)

      W/dalvikvm( 6768):         1 of java.lang.String

      E/dalvikvm( 6768): Failed adding to JNI local ref table (has 512 entries)

       

       

      I have created a test project which is calling Rho::Network.hasNetwork() over and over again. When deploying to an Android device the program crashes in about one or two minutes.