A
Using C++/CNI in a Linux environment, I can successfully call the factorycast java classes to retrieve data, as long as I do it in a single thread. If there is more than one thread, I get a segmentation fault when the Java garbage collector kicks in. The backtrace is below:
#0 0x00000000 in ?? ()
#1 0x080c7c69 in com.schneiderautomation.factorycast.Ref.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) () at Ref.java:152
#2 0x080c7b47 in com.schneiderautomation.factorycast.Ref.setAddress(java.lang.String) () at Ref.java:117
#3 0x08058ae9 in clsFactoryCast::getIntRegisters (this=0x8197880,
startRegister=40799, count=1, aryvalues=0xbf5ff664)
at clsFactoryCast.hxx:88
#4 0x080586b0 in clsModiconEthernet::getData (this=0x8115000)
at clsModiconEthernet.hxx:125
#5 0x08057e92 in clsScan::doPoll (this=0x8115000) at clsScan.hxx:230
#6 0x08057b24 in startThread (arg=0xbffffaac) at scanner.cxx:43
#7 0x409d5e51 in pthread_start_thread () from /lib/libpthread.so.0
#8 0x409d5ecf in pthread_start_thread_event () from /lib/libpthread.so.0
#9 0x40b0e6ea in clone () from /lib/libc.so.6
#0 0x00000000 in ?? ()
#1 0x080c7c69 in com.schneiderautomation.factorycast.Ref.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) () at Ref.java:152
#2 0x080c7b47 in com.schneiderautomation.factorycast.Ref.setAddress(java.lang.String) () at Ref.java:117
#3 0x08058ae9 in clsFactoryCast::getIntRegisters (this=0x8197880,
startRegister=40799, count=1, aryvalues=0xbf5ff664)
at clsFactoryCast.hxx:88
#4 0x080586b0 in clsModiconEthernet::getData (this=0x8115000)
at clsModiconEthernet.hxx:125
#5 0x08057e92 in clsScan::doPoll (this=0x8115000) at clsScan.hxx:230
#6 0x08057b24 in startThread (arg=0xbffffaac) at scanner.cxx:43
#7 0x409d5e51 in pthread_start_thread () from /lib/libpthread.so.0
#8 0x409d5ecf in pthread_start_thread_event () from /lib/libpthread.so.0
#9 0x40b0e6ea in clone () from /lib/libc.so.6