Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-116645

[Android] providerList() returns NULL list

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.15.16, 6.2.10, 6.5.4, 6.6.1, 6.7.0 FF
    • 5.15.8, 5.15.9
    • Positioning
    • None
    • samsung a11q
      motorola pokerp
      samsung a02
      lge mmh6lm

      Android 9 (SDK 28)
      Android 12 (SDK 31)
      Android 11 (SDK 30)
      Android 10 (SDK 29)
    • Android
    • 3
    • 6148ae00c (dev), b67896814 (6.6), dd0f67764 (6.5), a4c33549f (tqtc/lts-6.2), bd1ab6287 (tqtc/lts-5.15)
    • Foundation Sprint 91, Foundation Sprint 92

    Description

      [libplugins_position_qtposition_android_armeabi-v7a.so] _JNIEnv::GetIntArrayElements(_jintArray*, unsigned char*)

       

      This a method "providerList" into QtPositioning.java at "return retList;" (NULL)

      static private int[] providerList()
      {
          if (locationManager == null) {
              Log.w(TAG, "No locationManager available in QtPositioning");
              return new int[0];
          }
          List<String> providers = locationManager.getProviders(true);
          int retList[] = new int[providers.size()];
          for (int i = 0; i < providers.size();  i++) {
              if (providers.get(i).equals(LocationManager.GPS_PROVIDER)) {
                  //must be in sync with AndroidPositioning::PositionProvider::PROVIDER_GPS
                  retList[i] = 0;
              } else if (providers.get(i).equals(LocationManager.NETWORK_PROVIDER)) {
                  //must be in sync with AndroidPositioning::PositionProvider::PROVIDER_NETWORK
                  retList[i] = 1;
              } else if (providers.get(i).equals(LocationManager.PASSIVE_PROVIDER)) {
                  //must be in sync with AndroidPositioning::PositionProvider::PROVIDER_PASSIVE
                  retList[i] = 2;
              } else {
                  retList[i] = -1;
              }
          }
          return retList;
      }
      

       

      Android error: JNI DETECTED ERROR IN APPLICATION: java_array == null
      backtrace:

        #00  pc 0x0000000000064f9c  /apex/com.android.runtime/lib/bionic/libc.so (abort+172)
        #01  pc 0x0000000000034499  /apex/com.android.art/lib/libc++.so (abort_message+92)
        #02  pc 0x00000000000345ed  /apex/com.android.art/lib/libc++.so (demangling_terminate_handler() (.__uniq.205383134706309982814331919004001075825)+120)
        #03  pc 0x0000000000034df7  /apex/com.android.art/lib/libc++.so (std::__terminate(void ())+2)
        #04  pc 0x00000000000346f5  /apex/com.android.art/lib/libc++.so (_cxxabiv1::failed_throw(cxxabiv1::cxa_exception*) (._uniq.322141405278763512308061072235179479160)+12)
        #05  pc 0x000000000004adc1  /apex/com.android.art/lib/libc++.so (__cxa_throw+72)
        #06  pc 0x0000000000047def  /apex/com.android.art/lib/libc++.so (operator new(unsigned int)+54)
        #07  pc 0x000000000004e533  /apex/com.android.art/lib/libc++.so (std::_1::basic_string<char, std::1::char_traits<char>, std::1::allocator<char> >::_grow_by_and_replace(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, char const*)+86)
        #08  pc 0x000000000004a05d  /apex/com.android.art/lib/libc++.so (std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >::append(char const*, unsigned int)+60)
        #09  pc 0x000000000000d5bd  /apex/com.android.art/lib/libbase.so (android::base::ReadFdToString(android::base::borrowed_fd, std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >*)+152)
        #10  pc 0x000000000000d65f  /apex/com.android.art/lib/libbase.so (android::base::ReadFileToString(std::_1::basic_string<char, std::1::char_traits<char>, std::1::allocator<char> > const&, std::1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >*, bool)+106)
        #11  pc 0x00000000000439bb  /apex/com.android.art/lib/libunwindstack.so (unwindstack::Maps::Parse()+66)
        #12  pc 0x0000000000009af3  /apex/com.android.art/lib/libbacktrace.so (UnwindStackMap::Build()+758)
        #13  pc 0x000000000000a055  /apex/com.android.art/lib/libbacktrace.so (BacktraceMap::Create(int, bool)+124)
        #14  pc 0x000000000025ed07  /apex/com.android.art/lib/libart.so (art::ThreadList::Dump(std::_1::basic_ostream<char, std::_1::char_traits<char> >&, bool)+166)
        #15  pc 0x00000000005078b5  /apex/com.android.art/lib/libart.so (art::AbortState::Dump(std::_1::basic_ostream<char, std::_1::char_traits<char> >&) const+136)
        #16  pc 0x0000000000501a3f  /apex/com.android.art/lib/libart.so (art::Runtime::Abort(char const*)+1342)
        #17  pc 0x000000000000fc99  /apex/com.android.art/lib/libbase.so (android::base::SetAborter(std::_1::function<void (char const*)>&&)::$_3::_invoke(char const*)+48)
        #18  pc 0x000000000000f55b  /apex/com.android.art/lib/libbase.so (android::base::LogMessage::~LogMessage()+226)
        #19  pc 0x000000000024bb4f  /apex/com.android.art/lib/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+2866)
        #20  pc 0x000000000047e8b7  /apex/com.android.art/lib/libart.so (int* art::JNI<false>::GetPrimitiveArray<_jintArray*, int, art::mirror::PrimitiveArray<int> >(_JNIEnv*, _jintArray*, unsigned char*)+614)
        #21  pc 0x00000000000089d0  /data/app/~~damsLktl-3KFzjMsCuNskQ==/rjr.heron.android-_DmG-wXCmg9GuwBCYlV1bQ==/lib/arm/libplugins_position_qtposition_android_armeabi-v7a.so (_JNIEnv::GetIntArrayElements(_jintArray*, unsigned char*))

      Attachments

        1. solution.png
          solution.png
          89 kB
        2. tela1.png
          tela1.png
          54 kB
        3. tela2.png
          tela2.png
          130 kB
        4. tela3.png
          tela3.png
          76 kB
        5. image-2023-09-19-16-24-11-719.png
          image-2023-09-19-16-24-11-719.png
          71 kB
        6. image-2023-09-19-16-24-17-363.png
          image-2023-09-19-16-24-17-363.png
          71 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ivan.solovev Ivan Solovev
            reinaldojr Reinaldo de Souza Junior
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: