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

[qt-android] Crash when JNI is called from multipile threads

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.4.0 RC
    • 5.3.2, 5.4.0 Beta
    • QPA
    • None
    • many android devices
    • Android
    • f9408cc81c7d3cb3fa212005fb30cd8318ebf247

    Description

      I have a qt5 android program which will call JNI code in multiple threads, it will randomly crashed, I found it crashed in getCachedMethodID() in qjni.cpp through core dump.
      It seems that getCachedMethodID() will access a global data structure JMethodIDHash, and it is totally un-protected from multi-threaded access. I think we should use a mutex to protect it.

      Attachments

        Activity

          People

            stromme Christian
            jianliang79 liang jian
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: