JNI_CreateJavaVM trouble; returns -4

Hello all,
Has anyone seen a problem with the JNI_CreateJavaVM function returning a -4? This problem is happening on one our client machines that has Windows Server 2003, SP1 installed. This problem only shows up when using a web client. Console applications work fine and not all web clients running on different machines are getting this error. The client is running the OS on VMWare. I have been able to replicate the problem under SP2 only. Currently, I think that there must be some patch that was applied that is causing the problem because the error doesn't happen on other machines. Hmmmm.
Appreciate any help,
Wes

Yah - no fun.
Better post some relevant code - maybe folks can help.

Similar Messages

  • Hi I have trouble returning a completed PDF form to sender - it looses my filled in info - how do I solve this?

    Hi I have trouble returning a completed PDF form to sender - it looses my filled in info - how do I solve this?

    Are there any dialog boxes popping up behind your Yahoo screen?
    I have intermittent problems attaching files in Yahoo mail and this is usually the reason.  I'm also using an iMac (10.7.3) and this is likely the problem.
    It is generally a Yahoo issue rather than a Mac problem.

  • Under what circumstances JNI_CreateJavaVM will return 0

    Hello all,
    Can any one please tell me "under what cicumstances JNI_CreateJavaVM returns 0" ?
    The following code segment returns 0.
    when I try to debug the code segment using VC++ 6.0. jdk 1.4.1 ON WINDOWS 2000 Prof. The debugger first shows status = -1 but once JNI_CreateJavaVM is executed the status changes to 0.
    // ----- code segment ----------------
    JavaVMOption options[3];
    JavaVMInitArgs vm_args;
    JavaVM *jvm;
    JNIEnv *env;
    options[0].optionString = "-Djava.compiler=NONE";
    options[1].optionString = "-Djava.class.path=CLASSPATH";
    options[2].optionString = "-verbose:jni";
    vm_args.version=JNI_VERSION_1_4;
    vm_args.options = options;
    vm_args.nOptions = 3;
    vm_args.ignoreUnrecognized = JNI_FALSE;
    int status = -1;
    status = (jint)JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
    if (status < 0)
    printf("\nERROR : Creating JVM with status : %d.\n");
    else if (status == JNI_ERR)
         printf("\nERROR : Creating Java Virtual Machine (JVM).\n");
    else if (status == 0)
    printf("\nJVM status is 0.\n\n");
    else
    printf("\nVM is created.");
    Please help I could not get any clue.
    Thanks.

    Hello folks,
    Now it is ok, it was not ststus=0 but it was some junk number
    forget it

  • Trouble returning String from JNI method

    I'm a JNI newbie who is going through the SUN online book on JNI and have put together the 2nd program example (right after "helloworld"), but it is not working right. It is supposed to prompt you for a string, then returns the string that you type in. Right now it compiles without error, but it returns only the first word that I type, not the whole sentence. What am I doing wrong?
    Here's the code:
    Prompt.java
    package petes.JNI;
    public class Prompt
        private native String getLine(String prompt);
        static
            System.loadLibrary("petes_JNI_Prompt");
        public static void main(String[] args)
            Prompt p = new Prompt();
            String input = p.getLine("Type a line: ");
            System.out.println("User typed: " + input);
    }petes_JNI_Prompt.h
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class petes_JNI_Prompt */
    #ifndef _Included_petes_JNI_Prompt
    #define _Included_petes_JNI_Prompt
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class:     petes_JNI_Prompt
    * Method:    getLine
    * Signature: (Ljava/lang/String;)Ljava/lang/String;
    JNIEXPORT jstring JNICALL Java_petes_JNI_Prompt_getLine
      (JNIEnv *, jobject, jstring);
    #ifdef __cplusplus
    #endif
    #endifpetes_JNI_Prompt.c
    #include <jni.h>
    #include <stdio.h>
    #include "petes_JNI_Prompt.h"
    JNIEXPORT jstring JNICALL Java_petes_JNI_Prompt_getLine
      (JNIEnv *env, jobject this, jstring prompt)
         char buf[128];
         const jbyte *str;
         str = (*env)->GetStringUTFChars(env, prompt, NULL);
         if (str == NULL)
              return NULL;  /*  OutOfMemoryError already thrown */
         printf("%s", str);
         (*env)->ReleaseStringUTFChars(env, prompt, str);
         // assume here that user will ty pe in 127 or less characters
         scanf("%s", buf);
         return (*env)->NewStringUTF(env, buf);
    }Thanks in advance!
    /Pete

    OK, I have something that works now by substituting fgets for scanf. I have two other questions:
    1) Do I need to free the memory created in buf? Will it allocate memory every time the method is run? Or will it allocate only once on creation, and so is no big deal?
    2) A minor question: When I run this program in eclipse, the prompt string is displayed in the console only after the input string is entered and displayed. It works fine when I run it from the command line however. I have a feeling that this is a problem with how Eclipse deals with native methods and perhaps nothing I can fix. Any thoughts?
    Thanks
    Pete
    Addendum, the updated code:
    #include <jni.h>
    #include <stdio.h>
    #include "petes_JNI_Prompt.h"
    JNIEXPORT jstring JNICALL Java_petes_JNI_Prompt_getLine
      (JNIEnv *env, jobject this, jstring prompt)
         char buf[128];
         const jbyte *str;
         str = (*env)->GetStringUTFChars(env, prompt, NULL);
         if (str == NULL)
              return NULL;  /*  OutOfMemoryError already thrown */
         printf("%s", str);
         (*env)->ReleaseStringUTFChars(env, prompt, str);
         //scanf("%s", buf);
         fgets(buf, 128, stdin);
         return (*env)->NewStringUTF(env, buf);
    }Message was edited by:
    petes1234

  • ArrayCollection trouble *returns*

    Hello!
    Is there anyway I can have an ArrayCollection or plain Array with this structure?
    myVar[1]['red']
    myVar[1]['yellow']
    myVar[1]['green']
    myVar[2]['red']
    myVar[2]['yellow']
    myVar[2]['green']
    etc
    1. Can such data types start at different values than 0?
    2. Multiple keys with the same value.
    3. Prevent AC from 'indexing' the data like myVar[0][1]['red'], myVar[1][1]['yellow'] etc.
    I'd greatly appreciate any help with this.
    Thank you!

    Hello,
    Have you thought give it a try to use Dictionary in a Dictionary?
    For example at key myVar[1]  you would have stored another dictionary, and myVar[1]['red'] would return the value of the inside Dictionary.
    Claude Bur.

  • Trouble returning to leopard while installing windows xp

    I went and used boot camp to install windows xp and everything when great, i formtted the partition to 32 GB; however, when i got to windows setup I forgotten I needed the product key and i can't find my xp disc product key. So now i just want to exit the installion and get back to my 200GB partition of mac os!
    The problem with getting back is that once i restart or boot up the computer only allows me to choose to boot from the disc(xp cd) or let it run until it gets to windows setup where i get stuck on product key again!
    I can't force my disc out of my mac pro , i've tried appleoption+pr and it doesn't work either......
    How to i get back to just normal mac os ...?
    Message was edited by: SammiOO

    thank you, now i feel like an idiot for not doing that first .... = ..=

  • CAML query to return multi-user field from a Sharepoint list

    I have a list in SharePoint that contains a field of type Multi-User which can contain 1 to many user names. I'm having trouble returning a string containing anything when more then 1 user is selected in the field.  Can someone point me in the right
    direction?

    You can't query on a Mutli-user field using a "contains" filter - using the GUI. 
    However, you can change the CAML for the query using SharePoint Designer.
    E.g. In my view, I want to return a list of documents where the Contributor field (a multi-user field) contains the user "Warner".
    In the GUI, I create the view, but I'm not allowed to use the filter "Contains", so I use "Equals" instead. Of this won't work unless the only user is "Warner". So I open SharePoint Designer, and I change the query used on that view from Eq to Contains.
    Original query:
    <View Name="{D0E65C04-0A53-4C26-9004-68B3CFF1F11A}" MobileView="TRUE" Type="HTML" DisplayName="Warners Documents" Url="/Shared Documents/Forms/Warners Documents.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/dlicon.png?rev=23" >
    <Query>
    <Where>
    <Eq>
    <FieldRef Name="Contributors"/>
    <Value Type="Text">Warner</Value>
    </Eq>
    </Where>
    </Query>
    <ViewFields>
    <FieldRef Name="DocIcon"/>
    <FieldRef Name="LinkFilename"/>
    <FieldRef Name="Modified"/>
    <FieldRef Name="Editor"/>
    <FieldRef Name="Contributors"/>
    </ViewFields>
    <RowLimit Paged="TRUE">30</RowLimit>
    <Aggregations Value="Off"/>
    <JSLink>clienttemplates.js</JSLink>
    <XslLink Default="TRUE">main.xsl</XslLink>
    <Toolbar Type="Standard"/>
    </View>
    New Query:
    <View Name="{D0E65C04-0A53-4C26-9004-68B3CFF1F11A}" MobileView="TRUE" Type="HTML" DisplayName="Warners Documents" Url="/Shared Documents/Forms/Warners Documents.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/dlicon.png?rev=23" >
    <Query>
    <Where>
    <Contains>
    <FieldRef Name="Contributors"/>
    <Value Type="Text">Warner</Value>
    </Contains>
    </Where>
    </Query>
    <ViewFields>
    <FieldRef Name="DocIcon"/>
    <FieldRef Name="LinkFilename"/>
    <FieldRef Name="Modified"/>
    <FieldRef Name="Editor"/>
    <FieldRef Name="Contributors"/>
    </ViewFields>
    <RowLimit Paged="TRUE">30</RowLimit>
    <Aggregations Value="Off"/>
    <JSLink>clienttemplates.js</JSLink>
    <XslLink Default="TRUE">main.xsl</XslLink>
    <Toolbar Type="Standard"/>
    </View>
    This now works.
    However, the SharePoint team probably put this restriction in place for a reason. Possibly a performance related reason, due to the query performed on the SQL server, so use this method with caution.
    Regards, Matthew
    MCPD | MCITP
    My Blog
    View
    Matthew Yarlett's profile
    See my webpart on the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here:
    Upload and Crop User Profile Photos

  • Returning records from binary file

    Hi,
    I am having trouble returning all the records from a binary file. As my knowledge is limited, I haven't been able to devise a method for counting the records and then displaying them one by one.
    Any help you can provide is appreciated. Here is the basis of my code:
    FileInputStream in = new FileInputStream("stud.bin");
    ObjectInputStream s = new ObjectInputStream(in);
    //System.out.println(s.available());
    String studentFile = (String)s.readObject();
    String gpaFile = (String)s.readObject();
    classRoll.addStudent (studentFile, gpaFile);
    System.out.println(studentFile + " has a GPA of " + gpaFile);
    System.out.flush();
    classRoll.addStudent("andy", "4.5");
    s.close();
    System.out.println(classRoll);

    are these files in text format? You should use BufferedReader class- or some native, file component of the java.io API to retrieve the values. ObjectInputStreams are meant to exchange Object instances between resources, in other words you take a specific class, generalize it and then put it in a stream. You should not use ObjectStream for retrieving IO values because you are basically taking a specific class, making it general and then converting it back to a specific class. You should only use an ObjectInputStream when you need to send a current Object to some resource (often a remote resource) that does not have access to it.
    Do some thing like:
    FileInputStream f = new FileInputStream("file");
    BufferedReader in = new BufferedReader(new InputStreamReader(f));
    while(true) {
    String line = in.readLine();
    if (line == null)
    break;
    The above code is not necessarily the best, but it might help give you a sense of how to solve the problem. You should probably stick to the java.io API excusivly and avoid the ObjectStream class for this particular problem.

  • Tell me it's not true... only 1 app at a time???

    I never even thought to ask before purchasing. Seemed like a no-brainer, like not bothering to ask if your new car comes with a steering wheel.
    There's no way that Apple would have omitted something so basic as multitasking. There's got to be a way. If I can't browse on Safari while listening to Pandora, then this thing's going back.

    ...things that are ridiculously obvious...
    I always used to think it was "ridiculously obvious" that someone would at least read a serious review of a device like this before buying it. "1 app at a time" was made crystal clear at the first announcement on Jan. 27.
    But after reading various posts here I have stopped assuming that.
    If it turns out that the iPad does not meet your needs after all, I think there is still a shortage of them in many areas, so you should not have any trouble returning or reselling it.

  • Update iTunes (10.2.1 to 10.5)

    Hello everybody. After update iTunes (10.2.1 to 10.5) my Windows (Xp SP2) starting work very slow (open My computer 5 - 7 seconds). When I deleted iTunes all starting work good again. When i installed iTunes again troubles returned. Anybody having idea what is bad? Sorry for my poor English.

    Go to support.microsoft.com/fixit
    In section 2 click on: Install or upgrade software or hardware
    Then click on the title in section 3: Fix problems with programs that cannot be installed or uninstall
    This link may get you there:  http://support.microsoft.com/mats/Program_Install_and_Uninstall/
    Let it run and then try to download it again

  • More than 4GB RAM in 2008 Macbook Pro 17"?

    Does anyone know of a way to get the 2008 Macbook Pro 17" to be able to recognize 8GB RAM instead of the maximum spec of 4GB? Or is it simply a hardware limitation of the board?

    When a Mac has RAM-related problems, the most common manifestations are 1) failure to boot, accompanied by some number of beeps on startup, and 2) kernel panics. Other symptoms are possible, but these are the ones you're most likely to see.
    If you do experience any trouble with 6GB of RAM installed, remove and replace the 4GB module you've installed with the original 2GB module you removed, then repeat as exactly as possible the sequence of operations that led up to the problem. Yes, it may be very hard if not impossible to reconstruct that sequence, particularly if you've been running the computer for a long time when the problem suddenly arises. Still, it's worth trying, to see whether the problem still occurs with the original RAM in place. If it does, you obviously can't blame it on 6GB of RAM. If it doesn't, perhaps you can; further testing is probably in order if you have the time and energy to do it. If you don't, you may want to return the RAM and just get along with 4GB and a stable, dependable computer. Any vendor from whom you will want to consider buying RAM will give a lifetime warranty on it and will explicitly warrant that it's Mac-compatible. Buy from such a vendor and you shouldn't have any trouble returning it if it doesn't work out for you.
    It's also possible that 6GB will work just fine for you except when you try to run some particular app or combination of apps. In that case, you'll have to decide whether you can live with that limitation.

  • Retrieving a UDT object from a Java Stored Procedure

    I am really having trouble returning a UDT object (AttributeUDT) from a Java stored procedure. I am using Oracle 8.1.6 and JDeveloper 3.2.2. I have successfully used JPublisher to create the Java source code files for my UDT, now I would like to use that in coordination with my Java stored procedure. I've loaded the Java stored procedure into the database using the Deployment option in JDeveloper. However, when it loads the procedure, it translates the 3rd parameter to an OBJECT type, thus making the stored procedure invalid. I can use SQL Navigator to correct the package by changing the OBJECT reference to AttributeUDT (my UDT data type). Unfortunately, my Java stored procedure still does not work. Any help would be greatly appreciated! Thanks in advance for your time!
    In the example below, could anyone please tell me:
    1. How do I register the OUT variable for the UDT?
    2. Is it correct to use the casted call to getObject to retrieve my UDT object?
    3. Is it valid to use the UDT data type in the java stored procedure method signature?
    The call to the Java stored procedure:
    OracleCallableStatement cs3 = (OracleCallableStatement)conn.prepareCall( "{ call sandbox.getQualifiersV3( ?, ?, ?) }");
    cs3.registerOutParameter( 1, Types.VARCHAR);
    cs3.registerOutParameter( 2, Types.VARCHAR);
    cs3.registerOutParameter( 3, ???????);
    cs3.execute();
    System.out.println( "ID: " + cs3.getString( 1));
    System.out.println( "Prompt: " + cs3.getString( 2));
    AttributeUDT attributes = (AttributeUDT)cs3.getObject( 3);
    System.out.println( "Table id: " + attributes.getLogicalTableId());
    System.out.println( "Element id: " + attributes.getElementId());
    cs3.close();
    ===========================================
    The Java stored procedure:
    public static void getQualifiersV3( String ids[], String prompts[],
    AttributeUDT attributes[]) throws SQLException {
    OracleConnection conn = (OracleConnection)new OracleDriver().defaultConnection();
    Statement stmt = conn.createStatement();
    OracleResultSet rs = (OracleResultSet)stmt.executeQuery(
    "SELECT * "
    + "FROM VPS_ABOK_QUALIFIERS "
    + "WHERE qualifier_id = 2001");
    rs.next();
    ids[0] = rs.getString( 1);
    prompts[0] = rs.getString( 2);
    attributes[0] = (AttributeUDT)rs.getCustomDatum( 3, AttributeUDT.getFactory());
    rs.close();
    stmt.close();
    null

    Sounds like your C2 REF TYP1 attribute may be null. Unfortunately you neglected to say where in your code the NullPointerException occurs.

  • Java Step Types with Java Virtual Machine higher than java-6u16?

    Documentation of Java steps says, that these steps are tested with java version 6 update 16. I am talking about the java step types that can be found in directory <TestStand Public>\TestStand 2010\Examples\Java. 
    If I install another java version, e. g. java 7, step "Start JVM" will exit with an error "-4" and error message "Could not launch JVM.". While Debugging source code of JavaCall.dll, I figured the failing code line out:
    "fpCreateJVM(&jvm,(void**)&env,&vm_args);" is the execution of function "JNI_CreateJavaVM" and returns error code -4.
    Till now I could not find out, why the jvm does not start. I guess -4 means "Insufficient memory to create the JVM." (http://zone.ni.com/reference/en-XX/help/370052J-01/tssuppref/infotopics/java_steps_errors/)
    Has anyone an advice for me?

    This post gave me a hint: http://stackoverflow.com/questions/3400292/jni-enomem-from-jni-createjavavm-when-calling-dll-that-us...
    Though my development computer has enough ram, jvm is started within the Teststand process which offers limited memory. I changed JavaCall.c and added parameter "-Xmx64m" to the jvm creation call. Now it works with jre 7.
    Because memory space Teststand offers to the jvm is different on different computers, an implementation would be nice that checks how much memory is available and then passes the calculated <MEM> as parameter "-Xmx<MEM>m". Here is an example implementation: https://forums.oracle.com/forums/thread.jspa?threadID=1546540

  • VERY slow mobile Hotspot connection?

    I recently purchased the 4510L LTE mobile hotspot as it was that or dial up. I have been getting download speeds that generally cap out at about 100 KBps. That seems very slow for this area, with 3G coverage. I am always at 3 or 4 bars of service and am unsure if this is standard for that or if I am for some reason getting incredibly slow internet.

    MyUnluckyDay wrote:
    Yes, I have tried to move it around the house and that helped in a very very small way. I just don't think my area is really cut out for this type of service, I recently discovered that there is one company that offers DSL and hopefully I can get that. I luckily still have time on my 14 days and hope that I don't have any trouble returning and canceling my service.
    Thanks to the community member for your input.
    Hi MyUnluckyDay,
    Have you kept trying to use your mobile hotspot to see if the speeds improved? Are you using a laptop with the connection that has an Anti Virus program running at the time slow speed occurs? If so, please try clearing the cache on your web browser and disable your Anti Virus program and retry using the hotspot to see if this improves the speed of your connection. Speeds can vary depending on what your doing on the connection such as downloading a large application or streaming videos, etc.  Also, there was a software update released on September 1st that can help with the connection issues. Here is a direct link to our website that will provide steps on how to obtain the software update. I hope these suggestions can help with your concerns.  

  • Functions for multi-phase catalog access, with retries...

    See Catalog:action & Catalog:privateAction below.
    These functions support iterative catalog access, to divide catalog updates into chunks...
    Also, they support retries to deal with contention in case another plugin task is already accessing the catalog.
    -- private method:
    function Catalog:_isAccessContention( qual )
        local found = qual:find( "LrCatalog:with", 1, true ) or 0 -- return position or zero, instead of position or nil.
        if found == 1 then -- problem reported by with-catalog-do method.
            local found2 = qual:find( "already inside", 15, true )
            if found2 == nil then
                found2 = qual:find( "was blocked", 15, true ) -- Lr4b
            end
            if found2 then
                -- problem is due to catalog access contention.
                Debug.logn( 'catalog contention:', str:to( qual ) )
                return true
            else
                return false
            end
        else
            return false
        end
    end
    -- private method:
    function Catalog:_action( catFunc, tmo, name, func, ... )
        local t = { ... }
        local tries = math.max( math.ceil( tmo * 2 ), 1 )
        local sts, msg
        local function _func( context )
            sts, msg = func( unpack( t ) )
        end
        local count = 10000000 -- ten million max, for sanity.
        repeat
            local s, other
            if name then
                s, other = LrTasks.pcall( catFunc, catalog, name, _func )
            else
                s, other = LrTasks.pcall( catFunc, catalog, _func )
            end
            if s then -- no error thrown
                if sts then
                    return true -- all done.
                elseif str:is( msg ) then
                    return false, "Unable to complete catalog update - " .. msg
                else
                    -- continue
                    count = count - 1                       
                end
            else
                if self:_isAccessContention( other ) then
                    tries = tries - 1
                    if tries == 0 then
                        return nil, "Unable to access catalog for " .. str:to( tmo ) .. " seconds."
                    else
                        LrTasks.sleep( math.random( .1, 1 ) ) -- sleep for half second, plus or minus.
                    end
                else
                    return nil, "Catalog access function error: " .. str:to( other )
                end
            end
        until count == 0
        return nil, "Program failure"
    end
    --- Wrapper for named/undoable catalog:withWriteAccessDo method - divide to conquor func.
    --  @param tmo (number) max seconds to get in.
    --  @param name (string) undo title.
    --  @param func (function) divided catalog writing function: returns sts, msg = true when done; false if to be continued; nil, error message if trouble.
    --  @param ... (any) passed to func - often a table containing photo start index.
    --  @usage example:<br>
    --           local function catalogAction( t )<br>
    --               if t.i > #photos then<br>
    --                   return true -- done, no errors (although should pre-check for photos to process).<br>
    --               else<br>
    --                   local k = math.min( t.i + 1000, #photos )<br>
    --                   while ( t.i <= k ) do<br>
    --                       -- do something to photos[t.i]<br>
    --                       -- if trouble, return nil, msg.<br>
    --                       t.i = t.i + 1
    --                   end<br>
    --                   if t.i > #photos then<br>
    --                       return true -- done, no errors.<br>
    --                   else<br>
    --                       return false -- continue, no errors.<br>
    --                   end<br>
    --               end<br>
    --           end<br>
    --           local sts, msg = cat:action( 10, "Test", catalogAction, { i=1 } )<br>
    --           if sts then<br>
    --               -- log successful message.<br>
    --           else<br>
    --               -- print error message...<br>
    --           end<br>
    function Catalog:action( tmo, name, func, ... )
        return self:_action( catalog.withWriteAccessDo, tmo, name, func, ... )
    end
    --- Wrapper for un-named catalog:withPrivateWriteAccessDo method - divide to conquor func.
    --  @param tmo (number) max seconds to get in.
    --  @param func (function) divided catalog writing function: returns sts, msg = true when done; false if to be continued; nil, error message if trouble.
    --  @param ... (any) passed to func.
    function Catalog:privateAction( tmo, func, ... )
        return self:_action( catalog.withPrivateWriteAccessDo, tmo, nil, func, ... ) -- no name.
    end
    Note: These functions were changed a bit after further testing and integration - consider them for example purposes only. The released version of these functions will be available shortly as part of the Elare Plugin Framework:
    https://www.assembla.com/spaces/lrdevplugin/
    PS - After some mods, the final version allows me to write code like this which I find convenient (still not released yet at assembla.com):
    local coll
    local s, m = cat:update( 10, "Assure Folder Collection", function( context, phase )
        if phase == 1 then
            coll = catalog:createCollection( folder:getName(), parent, true )
            return false -- keep going.
        elseif phase == 2 then
            coll:removeAllPhotos()
            return false -- keep going.
        elseif phase == 3 then
            coll:addPhotos( folder:getPhotos() )
            return true -- done (same as returning nil).
        else
            app:error( "bad phase" )
        end
    end )
    if s then
        app:logVerbose( "Assured collection: ^1", coll:getName() )
        return coll
    else
        return nil, m
    end
    or
    local photos = catalog:getAllPhotos()
    local s, m = cat:update( 10, "Update Photos", function( context, phase )
         local i1 = (phase - 1) * 1000 + 1
         local i2 = math.min( phase * 1000, #photos )
         for i = i1, i2 do
            local photo = photos[i]
            -- do something with photo that writes catalog.
        end
        if i2 < #photos then
            return false -- keep going
        end
    end )
    if s then
        app:logVerbose( "Photos updated..." )
        return true
    else
        return false, m
    end

    Hi Vladimir,
    You can see the outside & inside of DevMeta for complete details, but in a nutshell , there are few things the "background" task does, including:
    1. Check if the develop settings of the currently viewed photo have changed, if so update metadata for the library panel view (and Library Filter, and Smart Collections...) - this is what I call: Auto-Update.
    2. Check if user has edited the metadata - in which case it updates the develop settings of the active photo (called Live-Edit).
    The posted function makes sure none of my other plugins complain if they can't get at the catalog while DevMeta has it (which usually does not happen, but sometimes does). However, other peoples plugins will occasionally fail if they assume the catalog to be free for them all the time (and they have DevMeta running). There is at least one other fellow doing something similar, so I'm not the only plugin developer with the "bright idea" of doing things in the background that require catalog access.
    Rob

Maybe you are looking for

  • ServletException When Deploying Web Service Application to WL 10.3.1

    I'm attempting to deploy a web service application to WebLogic 10.3.1 built using the ANT jwsc task. The majority of the build is being done by Maven to produce and EAR file which contains the web service application WAR file, but I'm using ANT for t

  • Creating dynamic text in the picture

    I created a picture where the background has a gradient color and i putting some data base information in between the picture? i try using firework to slice out as a HTML so in order for me to put the text but i will not have the background color.. c

  • Counting line breaks

    Hello, I have a text field which can display up to 4 lines in Arial, size 9. I want to change the font size when there are more than 4 lines in it. Is there a way to count carriage returns in a field? e.g. IF string.count(:RECIPES, "<cr><lf>") > 3 TH

  • PTSpy - trying to find an object in the Portal

    Hello, PTSpy is throwing this error: -2147024891 - Current User does not have sufficient permission to object with id = 202 (full error at the end) I looked above to the sql and ran the query - of course nothing is found: Create query: '/* QUERY_USER

  • Enable disk use in itunes not showin...help plz

    Hi I'm having a problem. I am trying to "enable disk use" in itunes (latest itunes 10.6.3. for my ipod 5.1.1. its not showing up under "options" in itunes. Please help>... thanx