1 Reply Latest reply on Jul 24, 2012 8:16 AM by Evgeny Vovchenko

    Lazy loading and threading

    Bart Fukkink

      Good day!


      For our application we have created our own synchronisation method. This basicly is a thread wich pols for changes every couple of seconds (wich is arranged trough settings).


      This working fine and all in the simulator. However, when we run it on our Android devices (Motorola Xoom 4.0.4 and Google Nexus S 4.1.1 ) the application crashes after the set amount of time with the logcat messages shown below:


      07-24 09:27:35.620: I/APP(11914): I 07/24/2012 09:27:35:631 00002ea5                  APP| const_missing: BufferItemData
      07-24 09:27:35.620: I/APP(11914): I 07/24/2012 09:27:35:632 00002ea5                  APP| load_model: BufferItemData
      07-24 09:27:35.630: I/APP(11914): E 07/24/2012 09:27:35:642 00002ea5               Rhodes| JNIEnv is not set for this thread!!!
      07-24 09:27:35.630: A/libc(11914): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)


      In this, BufferItemData is nothing more then:


      class BufferItemData
        include Rhom::PropertyBag


      Now I wonder, is this a bug? That the loading of the model crashes on Android if its done trough a thread wich is not the main thread?


      The sollution for this is adding a simple 'require Bufferitemdata' to fix it, but this is not our desired sollution. The list of properties is going to grow a lot in the near future. We dont want to add all of those.