Modifying Dependent Shared Objects in Executables

I am attempting to perform the following operations on ELF32 format files:
1) modify the names of the NEEDED shared objects that are referenced by an executable after the executable has been built.
2) modify the embedded SONAME of a shared object file (adding one if it does not exist) after the shared object file has been built.
3) modifying the NEEDED shared objects that are referenced in a shared object file after it has been built.
The shared objects and executables are built from third party software that we have the source code for, but we do NOT want to modify the Makefile for each third party package each time we build a new version.
Of the three items, the one that is proving the most challenging is the modification of the executable files after they have been built.
Is there either a tool that enables me to modify these fields in the shared objects as well as the executables? Is there a way that I can re-link a shared object or executable file and then specify that modifications be made to the existing SONAME and NEEDED information?
(I have attempted unsuccessfully to use the elf library on executable files. Even relatively simple operations, such as modifying the length of the dynamic string section in which the NEEDED shared object is stored breaks the executable file.)

Hello Tomi,
First, thank you for taking the time to write such a well
though-out suggestion.  Are you familiar
with the “LabVIEW Object-Oriented Programming: The Decisions Behind the Design”
document?  I think the reason we chose to implement a ‘by
value’ strategy, is that is more in line with the LabVIEW programming paradigm
of dataflow, and would make sense to most of our LabVIEW users.
I think your suggestion is interesting, and it does
highlight the need to think outside of the conventional LabVIEW box and look to
some of the innovative things other languages do.  However, I think we all agree that
synchronization takes careful planning and extra work for the programmer.  Even with an ‘ideal’ solution I see no way
around this.  For LabVIEW users today,
one great way to get synchronized ‘by reference’ semantics with your objects is
to use a single-element queue to pass your object.  The queue itself is passed ‘by reference’ and
is inherently synchronized!  The does
have the disadvantage of adding one more small layer of complexity to your
program, but some complexity would have to be introduced in any situation.  The other disadvantage with this is that it
is not always an intuitive way to implement your program and requires some
amount of LabVIEW knowledge before one would generally come across this
technique.
In any case, I appreciate the time and effort you put in to
your suggestion.  Please make sure that
you submit the suggestion formally through the NI Product Suggestion Center so
that it can be reviewed by some of the decision makers here.
Thanks again,
Travis M
LabVIEW R&D
National Instruments

Similar Messages

  • Publish executable's symbols to a loaded shared object

    I am trying to load a shared object that should resolve some symbols inside the executable that loaded it:
    program A loads plugin.so which uses method "callback" that exists in program A
    When I try to load the .so I end up with an error:
    undefined symbol: __1cJBugEngineFipath2t6Mpkc_v_
    if I use nm "program" | grep __1cJBugEngineFipath2t6Mpkc_v_:
    0000000000416d20 T __1cJBugEngineFipath2t6Mpkc_v_
    On Linux with the GCC tools, I would normally use the option "-rdynamic":
    "When creating a dynamically linked executable, add all symbols to the dynamic symbol table. The dynamic symbol table is the set of symbols which are visible from dynamic objects at run time."
    but I have read that the linker for suncc automatically exports all symbols as a default.
    Any tip?

    Nope :( same symbol error.
    I also tried to use "dlopen(0, RTLD_NOLOAD|RTLD_GLOBAL)" to force symbols to be global in the executable, that didn't work.
    I can fortunately switch from a plugin-based build to a completely static executable (all plugins statically linked but the client code is exactly the same) but it would be much better to fix this issue on Linux.

  • Exception handling is not working in GCC compile shared object

    Hello,
    I am facing very strange issue on Solaris x86_64 platform with C++ code compiled usging gcc.3.4.3.
    I have compiled shared object that load into web server process space while initialization. Whenever any exception generate in code base, it is not being caught by exception handler. Even though exception handlers are there. Same code is working fine since long time but on Solaris x86, Sparc arch, Linux platform
    With Dbx, I am getting following stack trace.
    Stack trace is
    dbx: internal error: reference through NULL pointer at line 973 in file symbol.cc
    [1] 0x11335(0x1, 0x1, 0x474e5543432b2b00, 0x59cb60, 0xfffffd7fffdff2b0, 0x11335), at 0x11335
    ---- hidden frames, use 'where -h' to see them all ----
    =>[4] __cxa_throw(obj = (nil), tinfo = (nil), dest = (nil), , line 75 in "eh_throw.cc"
    [5] OBWebGate_Authent(r = 0xfffffd7fff3fb300), line 86 in "apache.cpp"
    [6] ap_run_post_config(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x444624
    [7] main(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x42c39a
    I am using following link options.
    Compile option is
    /usr/sfw/bin/g++ -c -I/scratch/ashishas/view_storage/build/coreid1014/palantir/apache22/solaris-x86_64/include -m64 -fPIC -D_REENTRANT -Wall -g -o apache.o apache.cpp
    Link option is
    /usr/sfw/bin/g++ -shared -m64 -o apache.so apache.o -lsocket -lnsl -ldl -lpthread -lthread
    At line 86, we are just throwing simple exception which have catch handlers in place. Also we do have catch(...) handler as well.
    Surpursing things are..same issue didn't observe if we make it as executable.
    Issue only comes if this is shared object loaded on webserver. If this is plain shared object, opened by anyother exe, it works fine.
    Can someone help me out. This is completly blocking issue for us. Using Solaris Sun Studio compiler is no option as of now.

    shared object that load into web server process space
    ... same issue didn't observe if we make it as executable.When you "inject" your shared object into some other process a well-being of your exception handling depends on that other process.
    Mechanics of x64 stack traversing (unwind) performed when you throw the exception is quite complicated,
    particularly involving a "nearly-standartized" Unwind interface (say, Unwind_RaiseException).
    When we are talking about g++ on Solaris there are two implementations of unwind interface, one in libc and one in libgcc_s.so.
    When you g++-compile the executable you get it directly linked with libgcc_s.so and Unwind stuff resolves into libgccs.
    When g++-compiled shared object is loaded into non-g++-compiled executable's process _Unwind calls are most likely already resolved into Solaris libc.
    Thats why you might see the difference.
    Now, what exactly causes this difference can vary, I can only speculate.
    All that would not be a problem if _Unwind interface was completely standartized and properly implemented.
    However there are two issues currently:
    * gcc (libstdc++ in particular) happens to use additional non-standard _Unwind calls which are not present in Solaris libc
    naturally, implementation details of Unwind implementation in libc differs to that of libgccs, so when all the standard _Unwind
    routines are resolved into Solaris version and one non-standard _Unwind routine is resolved into gcc version you get a problem
    (most likely that is what happens with you)
    * libc Unwind sometimes is unable to decipher the code generated by gcc.
    However that is likely to happen with modern gcc (say, 4.4+) and not that likely with 3.4.3
    Btw, you can check your call frame to see where _Unwind calls come from:
    where -h -lIf you indeed stomped on "mixed _Unwind" problem then the only chance for you is to play with linker
    so it binds Unwind stuff from your library directly into libgccs.
    Not tried it myself though.
    regards,
    __Fedor.

  • Using Shared Object Libraries

    How (or what) do we set when using shared object libraries?
    We have Java Native Methods which are implemented using C++ and stored in shared object libraries. We can build our project, but when trying to execute the project, the shared object libraries are not found. We had tried to set the external execution settings to include the library paths, but nothing seems to take affect.
    What do we need to set to run with the shared object libraries?

    RK,
    I appreciate your responce, hopefully we'll get this worked out. I will try to give you as much information as I can so you will hopefully understand the problem.
    We have added a Library Reference to our project - which is a jar file - this jar file contains our Business Objects which are implemented in Java. Within this Library Reference, there is a Java class which has a Native method. The method is implemented in C++ The C++ implementation of this method is within a C++ shared object library (libname.so).
    How do we let Creator know that we need to link in this C++ Shared Object Library at run time?
    The Modifers Properties for the method in the library reference are correctly set - that is they are set to Native. For a method within a java element, selecting or un-selecting this modifier simply changes the method declaration. It does not tell Creator where the actual implementation is (shared object library in this case).
    As originally stated, we tried to include our shared object library in the Execution Property of the properties window for the Java Element. Here is what we have done so far - all unsuccessful....
    Under the External Execution Property - we added the environment variable LD_LIBRARY_PATH set to our shared object library path. We also selected the Append Environment Variable (set to true). We are not able to modify the Library Path of the External Execution Property - it will not allow changes - all buttons are disabled in the pop up window.
    There are no properties for the Internal Execution within the Executor Properties, so there is nothing we can set there.
    We have tried to set the Debugger Execution properties in the same manner as the External Execution properties to run the project in Debug mode - and have the same problem - while executing the project, we get the error message which indicates that our shared object library can not be found.
    There are no property settings available on the J2EE Server Execution Properties to set.
    What do we need to set so that this Shared Object Library will be located during execution of our project under SJSC?
    Thank you for any suggestions you may have.
    --Scott                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Error 0(Native: listNetInterfaces:[3]) and error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

    Hi Gurus,
    I'm trying to upgrade my test 9.2.0.8 rac to 10.1 rac. I cannot upgrade to 10.2 because of RAM limitations on my test RAC. 10.1 Clusterware software was successfully installed and the daemons are up with OCR and voting disk created. Then during the installation of RAC software at the end, root.sh needs to be run. When I run root.sh, it gave the error: while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory. I have libpthread.so.0 in /lib. I looked up on metalink and found Doc ID: 414163.1 . I unset the LD_ASSUME_KERNEL in vipca (unsetting of LD_ASSUME_KERNEL was not required in srvctl because there was no LD_ASSUME_KERNEL in srvctl). Then I tried to run vipca manually. I receive the following error: Error 0(Native: listNetInterfaces:[3]). I'm able to see xclock and xeyes. So its not a problem with x.
    OS: OEL5 32 bit
    oifcfg iflist
    eth0 192.168.2.0
    eth1 10.0.0.0
    oifcfg getif
    eth1 10.0.0.0 global cluster_interconnect
    eth1 10.1.1.0 global cluster_interconnect
    eth0 192.168.2.0 global public
    cat /etc/hosts
    192.168.2.3 sunny1pub.ezhome.com sunny1pub
    192.168.2.4 sunny2pub.ezhome.com sunny2pub
    192.168.2.33 sunny1vip.ezhome.com sunny1vip
    192.168.2.44 sunny2vip.ezhome.com sunny2vip
    10.1.1.1 sunny1prv.ezhome.com sunny1prv
    10.1.1.2 sunny2prv.ezhome.com sunny2prv
    My questions are:
    should ping on sunny1vip and sunny2vip be already working? As of now they dont work.
    if you look at oifcfg getif, I initially had eth1 10.0.0.0 global cluster_interconnect,eth0 192.168.2.0 global public then I created eth1 10.1.1.0 global cluster_interconnect with setif. Should it be 10.1.1.0 or 10.0.0.0. I looked at the subnet calculator and it says for 10.1.1.1, 10.0.0.0 is the subnet. In metalink they had used 10.10.10.0 and hence I used 10.1.1.0
    Any ideas on resolving this issue would be very much appreciated. I had been searching on oracle forums, google, metalink but all of them refer to DOC Id 414163.1 but it does n't seem to work. Please help. Thanks in advance.
    Edited by: ayyappa on Aug 20, 2009 10:13 AM
    Edited by: ayyappa on Aug 20, 2009 10:14 AM
    Edited by: ayyappa on Aug 20, 2009 10:15 AM

    a step forward towards resolution but i need some help from the gurus.
    root# cat /etc/hosts
    127.0.0.1 localhost.localdomain localhost
    ::1 localhost6.localdomain6 localhost6
    192.168.2.3 sunny1pub.ezhome.com sunny1pub
    192.168.2.4 sunny2pub.ezhome.com sunny2pub
    10.1.1.1 sunny1prv.ezhome.com sunny1prv
    10.1.1.2 sunny2prv.ezhome.com sunny2prv
    192.168.2.33 sunny1vip.ezhome.com sunny1vip
    192.168.2.44 sunny2vip.ezhome.com sunny2vip
    root# /u01/app/oracle/product/crs/bin/oifcfg iflist
    eth1 10.0.0.0
    eth0 192.168.2.0
    root# /u01/app/oracle/product/crs/bin/oifcfg getif
    eth1 10.0.0.0 global cluster_interconnect
    eth0 191.168.2.0 global public
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl config nodeapps -n sunny1pub -a
    ****ORACLE_HOME environment variable not set!
    ORACLE_HOME should be set to the main directory that contain oracle products. set and export ORACLE_HOME, then re-run.
    root# export ORACLE_BASE=/u01/app/oracle
    root# export ORACLE_HOME=/u01/app/oracle/product/10.1.0/Db_1
    root# export ORA_CRS_HOME=/u01/app/oracle/product/crs
    root# export PATH=$PATH:$ORACLE_HOME/bin
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl config nodeapps -n sunny1pub -a
    VIP does not exist.
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl add nodeapps -n sunny1pub -o $ORACLE_HOME -A 192.168.2.33/255.255.255.0
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl add nodeapps -n sunny2pub -o $ORACLE_HOME -A 192.168.2.44/255.255.255.0
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl config nodeapps -n sunny1pub -a
    VIP exists.: sunny1vip.ezhome.com/192.168.2.33/255.255.255.0
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl config nodeapps -n sunny2pub -a
    VIP exists.: sunny2vip.ezhome.com/192.168.2.44/255.255.255.0
    Once I execute the add nodeapps command as root on node 1, I was able to get vip exists for config nodeapps on node 2. The above 2 statements resulted me with same values on both nodes. After this I executed root.sh on both nodes, I did not receive any errors. It said CRS resources are already configured.
    My questions to the gurus are as follows:
    Should ping on vip work? It does not work now.
    srvctl status nodeapps -n sunny1pub(same result for sunny2pub)
    VIP is not running on node: sunny1pub
    GSD is not running on node: sunny1pub
    PRKO-2016 : Error in checking condition of listener on node: sunny1pub
    ONS daemon is not running on node: sunny1pub
    [root@sunny1pub ~]# /u01/app/oracle/product/crs/bin/crs_stat -t
    Name Type Target State Host
    ora....pub.gsd application OFFLINE OFFLINE
    ora....pub.ons application OFFLINE OFFLINE
    ora....pub.vip application OFFLINE OFFLINE
    ora....pub.gsd application OFFLINE OFFLINE
    ora....pub.ons application OFFLINE OFFLINE
    ora....pub.vip application OFFLINE OFFLINE
    Will crs_stat and srvctl status nodeapps -n sunny1pub work after I upgrade my database or should they be working now already? I just choose to install 10.1.0.3 software and after running root.sh on both nodes, I clicked ok and then the End of installation screen appeared. Under installed products, I see 9i home, 10g home, crs home. Under 10g home and crs home, I see cluster nodes(sunny1pub and sunny2pub) So it looks like the 10g software is installed.

  • ARTADM: libcobrts64.so : cannot open shared object file

    While doing the Tuxedo server startup i am getting error message:
    ARTADM: error while loading shared libraries: libcobrts64.so: cannot open shared object file: No such file or directory.
    Getting the same error message for ARTCNX, ARTSTRN.
    I did verify one of the forum where its mentioned that MF Cobol Server Express need to be present on the linux, which i don't have. However, as per the Tuxedo documentation i have installed Cobol-IT compiler which is also compatible with the Tuxedo. Your inputs would be great help to resolve the issue.

    Please verify your installation as following,
    After installing ART Runtime with Cobol-IT option,
    1) In the ART installation directory you should see directory Cics_RT_CIT and symbolic link Cics_RT pointing to this directory, i.e.
    ls -l /testarea/xcao/art11gR1/Cics_RT
    lrwxrwxrwx 1 xcao units 35 Apr 27 11:04 /testarea/xcao/art11gR1/Cics_RT -> /testarea/xcao/art11gR1/Cics_RT_CIT
    2) All servers should depend on Cobol-IT libraries, e.g.
    ldd /testarea/xcao/art11gR1/Cics_RT/bin/ARTSTRN |grep cob
    libcobit.so.4 => /opt/cobol-it-64/lib/libcobit.so.4 (0x00002b0965f28000)
    libvbisam.so.3 => /opt/cobol-it-64/lib/libvbisam.so.3 (0x00002b096609b000)
    libiconv.so.2 => /opt/cobol-it-64/lib/libiconv.so.2 (0x00002b09661b3000)
    libgmp.so.10 => /opt/cobol-it-64/lib/libgmp.so.10 (0x00002b09663bc000)
    libcitextfh.so.4 => /opt/cobol-it-64/lib/libcitextfh.so.4 (0x00002b0966527000)
    libcobatmis.so => /testarea/xcao/tuxedo11gR1/lib/libcobatmis.so (0x00002b096abfc000)
    In addition, as Mark said, Cobol-IT Enterprise Edition 2.7 or later is required, Cobol-IT Standard Edition is not enough for ART.
    Regards,
    Xin Cao

  • Insufficient Shared Objects Memory Available

    Hi Friends ,
    You must be knowing sample application <b>wdr_test_chat</b> .I have used , executed application many time ....now when I run it and click in Log on ...log on pop up come and I am able to enter name ...but on click ok following dump coming....it is not case that there is problem with code as I have run it so many time already....IS that has to do something to my server ?
    Dump
    The following error text was processed in the system SD8  : Insufficient Shared Objects Memory Available
    The error occurred on the application server q4inpusy007_SD8 _01 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: ATTACHUPDATE70 of program CL_SHM_AREA===================CP
    Method: ATTACH_FOR_UPDATE of program CL_WDR_TEST_CHAT_SHM_AREA=====CP
    Method: ATTACH_FOR_UPDATE of program CL_WDR_TEST_CHAT_SHM==========CP
    Method: LOGIN of program CL_WDR_TEST_CHAT_SHM==========CP
    Method: LOGIN of program CL_WDR_TEST_CHAT==============CP
    Method: ONACTIONLOGIN of program /1BCWDY/CUHRRK26ZJ7PFHMON3IO==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/CUHRRK26ZJ7PFHMON3IO==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
    Method: IF_WDR_ACTION~FIRE of program CL_WDR_ACTION=================CP
    Method: DO_HANDLE_ACTION_EVENT of program CL_WDR_WINDOW_PHASE_MODEL=====CP

    Hi,
    I think in case of shared memeory area the system will allocate each area a maximum of 3MB space. so once you use the full memory the system will show you the error message 'Insufficient Shared Objects Memory Available'.
    I think this can be avoided by freeing the shared memory area after a certian amount of time.
    Regards,
    Ajith V

  • Issue with Shared Objects

    Hi all,
    I've a problem with a program working on Shared Objects technology.
    We have a Job, scheduled in 18 parallelism, and each one writes into the SHM controlled by a SHMA Class.
    At jobs ending, a program reads content from the area and sends an automatic e-mail with the results.
    Everything works well if the writer program is executed on-line.
    Otherwise, in background, seems that nothing is stored in the SHM.
    Here's the code executed by the writer program:
    FORM shared_memory_access  TABLES  it_fehler STRUCTURE rpfausg.
      DATA: errors_reference TYPE REF TO data.
      DATA: lx_pterl00       TYPE REF TO zcx_pterl00_collector.
      TRY.
    * --> Get SHM Access
          CALL METHOD zcl_pterl00_collector_root=>build
            EXPORTING
              invocation_mode = cl_shm_area=>invocation_mode_explicit.
    * --> It's ok?
          IF zcl_pterl00_collector_root=>area_exists EQ 'X'.
    * --> Fill Data:
            GET REFERENCE OF it_fehler[] INTO errors_reference.
            CALL METHOD zcl_pterl00_collector_root=>fill_area_with_data
              EXPORTING
                error_messages_dref = errors_reference.
          ENDIF.
        CATCH zcx_pterl00_collector INTO lx_pterl00.
          MESSAGE lx_pterl00 TYPE 'S' DISPLAY LIKE 'E'. "Non-blocking -> JOBS
      ENDTRY.
    ENDFORM.                    " SHARED_MEMORY_ACCESS
    Here is the section from the class handling the attachment to the SHMA:
    METHOD if_shm_build_instance~build.
      DATA: lx_collector TYPE REF TO zcx_pterl00_collector.
    * --> Automatic building of instance:
      TRY.
          CALL METHOD get_handle_for_update( inst_name ).
        CATCH zcx_pterl00_collector INTO lx_collector.
          MESSAGE lx_collector TYPE 'X'.
        CATCH: cx_shm_no_active_version.
          TRY.
              CALL METHOD get_handle_for_write( inst_name ).
            CATCH zcx_pterl00_collector INTO lx_collector.
              MESSAGE lx_collector TYPE 'X'.
          ENDTRY.
        CATCH: cx_shm_inconsistent.
          zcl_pterl00_collector=>free_area( ).
          TRY.
              CALL METHOD get_handle_for_write( inst_name ).
            CATCH zcx_pterl00_collector INTO lx_collector.
              MESSAGE lx_collector TYPE 'X'.
          ENDTRY.
      ENDTRY.
    ENDMETHOD.
    I cannot explain why multiple jobs do not populate the area...

    Hi Rob,
    if your requirement is to have many (18) active processes all updating the shared object, and very few simply reading the shared object, then versioning is probably not what you require.
    Versioning allows readers to continue to attach and read the active shared object instance while the updater gets their own instance of the shared object. When the updater does a detach_commit the old instance becomes obsolete and all new requests to attach will be diected to the new instance. The old instance will be cleaned up by garbage collection once all of its readers have detached.
    If your programs primarily attach for update then you will decrease performance with versioning because a new instance needs to be created at every attach for update.
    Perhaps you should just retry the attach for update after a small period of time has passed?
    If, on the other hand, you do have lots of other readers of the shared object you may well still find that it is more efficient not to have versioning. I build a web shop catalogue using shared objects and found that versioning severly hampered performance. This was because, once the catalogue was initialised, updaters were pretty rare but readers were constant.
    BTW make sure you keep the locks on the object as short as possible. Do all your preparation work first, then attach for update, update, detach as quick as possible.
    Cheers
    Graham Robbo

  • Linking mutilple  shared objects in JNI

    Is there a way to link in mulitple shared objects in JNI. My problem stems from the fact that my C code needs to be linked with a library also. Whenever I run my java code I get an error saying that the C code needs another libary. Can this be done? I have tried using the
    -lm option to no avail.

    Yes it can be done.
    How, depends on a variety of things which are better answered in a newgroup/list that is specific to your OS and compiler/linker.

  • Clearing a shared object

    I am using a local shared object on my site banner, so the
    animation only plays through once when visitors arrive at the site.
    Is there a way of using clear(); on the lso when visitors
    leave the domain or after say, 24 hours?
    Here's my code:

    that mostly depends upon how you want to retrieve the
    data/time. if you can accept the user's date/time (which should be
    consistant - it may be off by 12 hours, but it will almost always
    be consistantly off), you can use the date object to access the
    date/time. if you need more accuracy, you'll need to use some
    server-side code that will check the date/time at the server.
    which are you going to use? and are you just checking if
    24hours has expired since the sharedobject was last
    accessed?

  • Problem with shared objects synchoronization.

    I encountered a small problem with shared objects.
    I'm working on a program that creates chat rooms of a fixed
    size of 30 users. When the 31th user comes, a new room is created.
    The idea is that the client first connects to the first room
    and checks if it's full by connecting to shared objects. If it is
    full, connection is closed and process is reapeated on a new
    instance of the application.
    I use a function to connect to an instance, which takes as a
    parameter a number (1 for instance room_1, 2 for room_2, etc). The
    function itself creates the necessary Netconnection and
    sharedObject objects.
    If a room is full, Netconnections and sharedObjects are
    closed and function is called again with another number.
    I have no problem for connecting to the first room, but after
    closing the first connection and connecting to the new room, there
    seem to be some problems with the shared objects (especially,
    OnSync doesn't seem to execute again after the connection to the
    shared objects of the new instance).
    I was wondering if you had any ideas what could cause this.
    Is it the use of the same variable names for connecting at two
    different shared objects?
    Here is the function :
    function initStreams(room) {
    client_nc = new NetConnection();
    client_nc.connect("rtmp://192.168.0.4/Elearning/room_"+room);
    in_ns = new NetStream(client_nc);
    in_ns2 = new NetStream(client_nc);
    Replay_video.attachVideo(in_ns);
    out_ns = new NetStream(client_nc);
    out_ns2 = new NetStream(client_nc);
    in_ns.play("my_recorded_stream");
    users_name = SharedObject.getRemote("users_name",
    _root.client_nc.uri, false);
    users_name.connect(_root.client_nc);
    users_language = SharedObject.getRemote("users_language",
    _root.client_nc.uri, false);
    users_language.connect(_root.client_nc);
    users_picture = SharedObject.getRemote("users_picture",
    _root.client_nc.uri, false);
    users_picture.connect(_root.client_nc);
    users_finger = SharedObject.getRemote("users_finger",
    _root.client_nc.uri, false);
    users_finger.connect(_root.client_nc);
    I you need more info, I can post more of the code on the
    forum.
    Any help would be really appreciated

    I don't see any onStatus events in the code you posted above.
    If you're defining the onstatus event outside the function, that's
    the problem. When you define the shared object, you also need to
    define it's onStatus event handler.
    Also, you really should wait for the onStatus event of the
    netConnection before you connect your sharedObjects. If you try to
    connect the SO before the netConnection is established, the SO will
    never connect.

  • Shared objects linkage to binaries

    Hi -
    I included -lsunmath -lfsu -lompstubs as part of compile flags for the creation of a few fortran binaries. Now these library shared objects are part of /opt/SUNWspro/lib directory which is available on a development node. During compile and link it is ok as these shared objects are available locally on the compile node. However, when I move the binaries, thus created, to a runtime node and try to execute them they give a load error. The error is ld.so.1 ..libsunmath.so.1 not found. This, ofcourse, causes the binary to exit abnormally. How do I get around this problem. I cannot load these libraries on runtime environments. Is there any other way to compile and link with these shared objects with running into the above scenario? Your help will be appreciated very much.
    Regards

    You have some choices here:
    1. When you move the binaries, you can also make a copy
    of the libraries that it needs, and put them into an "install
    directory" with your binary. You can specify the directory
    where to find these libraries by using a link-time option
    when you create your binary.
    2. You can also try statically linking your program using
    linker options when you create your binary. This will embed
    the necessary code into your executable.
    Try a google search for "sun studio f90 static linking" or
    something like that, if you want take this path.

  • Shared Objects: How to store and read multiple instances

    Hi,
    Can we store multiple instances of Shared Objects in memory and read the desired instance.
    e.g
    If i execute the below program twice then also it will create only a single instance in the memory.
    Can we create a memory object with a key and then read the instance with the object with key
    data: handle type ref to ZCL_SHM_AREA_XX,
          root   type ref to ZCL_SHM_AREA_ROOT_XX.
    handle = ZCL_SHM_AREA_XX=>attach_for_write( ).
    create object root AREA HANDLE handle.
    root->FORM = 'Termination'.
    handle->set_root( root ).
    handle->detach_commit( ).

    Hi Sameer,
    check my reply to Recursive methods..
    Cheers
    Graham Robbo

  • Shared Objects for Threads

    Hi,
    Currently studying for SCJP exam and wondering is there a different between the following codes
    public class Test extends Thread
    static Object obj = new Object();
    static int x, y;
    public void run()
       synchronized(obj)
         for(;;)
          x++; y++; System.out.println(x+" "+y);
    public static void main(String[] args)
       new Test().start();
       new Test().start();
    }and
    public class Test extends Thread
    Object obj = new Object();
    static int x, y;
    public void run()
       synchronized(obj)
         for(;;)
          x++; y++; System.out.println(x+" "+y);
    public static void main(String[] args)
       new Test().start();
       new Test().start();
    In the first code example, is there a shared object between created threads and the second example, is their still a shared object between threads or is a new object created for each thread?
    Cheers!

    Hi,
    In first case, you are acquiring lock on a static object that is of course shared (basic concept) by all instances(of Test). So, for any thread of any instance(of Test) to execute the synchronized block has to wait till any other thread of any other instance(of Test) comes out of synchronized block. It means, all the instances (of Test) are synchronized. In this scenario, you have infinite for loop within synchronized block and you are starting two threads. The thread which enters the synchronized block first will keep on executing and the other thread will never get chance to enter synchronized block.
    In second case, as you are acquiring lock on an object, all the threads of a particular instance (of Test) will be synchronized. In this scenario, again you have infinite for loop within synchronized block and you are starting two threads on two different instances. Hence, both the threads will keep on executing in parallel.
    I hope, you have already executed both the examples and observed output. And also hope that the above explanation will help you to understand the difference between two scenarios.
    Note: Use System.out.println(Thread.currentThread().getName() + " " + x + " " + y); in your synchronized block to track which thread is printing the output.
    Thanks,
    Mrityunjoy

  • TestStand (Shared Object) in show step in variable tab.

    After selecting show step in variable context (tab) during execution, expanding the selected step I see the following, (plus more):  
    +TS (Shared Object)                              Step Type TEinf (Container)
    What does (Shared Object) mean? I posted previously about changing "InBuff" values on the fly. But something has happened to prevent this and I can't figure out what it is but, I think this shared object property has something to do with it.
    From a TestStand surface scatcher.
    thanks

    Shared object means that all of the properties underneath and including that object really just point back to the original version of the properties. In the case of TS, this means they all point back to the edit time version of the step. Changing the properties under TS at runtime is generally something you should avoid doing because you will be editing the actual edit time version of the step. This also has multithreading consequences because shared properties could potentially be accessed by more than one thread at the same time, thus if one thread is modifying them while another thread is accessing them, you can get unpredictable results. The properties under TS are meant to be read-only at runtime.
    Hope this helps explain things,
    -Doug

Maybe you are looking for

  • Safari quit unexpectedly and now won't open

    I had windows open and then safari quit. Now I'm getting a window that says safari quit unexpectedly okay or reopen, when i click reopen the same window pops up, when i click okay, the window disappears but nothing happens. If I click on Safari again

  • How to sort items in a page of labels

    I have entered company names and addresses onto a Pages label template. They are not from my contacts or address book. They were copied from hard copy documents as I came across them. I want to now have them rearranged on the label template alphabeti

  • Very much regret upgrading to Infinity!

    We were plagued by calls from the company BT use to sell Infinity for over a year, often receiving 2 calls per week! We were quite happy with standard broadband which was fast enough for our BB needs and didn't want to incur any additional monthly co

  • ZCATS_CONF  -  Note 505134: Analysis report for confirmation

    Hello guys The note 505134 tells about checking the consistency of confirmations for networks, maintenance orders or service orders. But in my installation (SAP_APPL  Release 605, level 6) I cannot see this tool. It is a transaction ? Or must I use S

  • Upgrading Portal from OracleAS 9.0.2 to OracleAS 10.1.2.0.2

    Hi I have an Oracle Portal application running on OracleAS 9.0.2 with the latest patches. I wish to upgrade it to OracleAS 10.1.2.0.2. I know that there is an installation option to upgrade my 9.0.2 app server but I'm not very confident that it will