For-Loop Bug in LV7.1

There is a bug in LabVIEW 7.1 where you have a for-loop, a constant outside
the loop, a constant inside the loop and a subtraction of the two constants.
What you have to do to see the bug is:
- Place a for-loop on the diagram
- Wire a constant with any value to the count terminal
- Place a constant on the diagram outside the for-loop, use any postive
number
- Place a constant inside the for-loop, use any positive number
- Place a substract-icon inside the for-loop
- Wire the constant outside the loop to the substract-icon
- Wire the constant inside the loop to the substract-icon
- Wire the result of the substraction to the output of the loop and disable
indexing
- Wire the input of the constant outside the loop directly to another output
of the
loop and disable indexing
- Probe the output of the subtract.
- Run VI
What you will see is that the output constant is treated as 0
Same thing with addition, multiplication, division...
When you change the outside constant to a control it works.
When you remove the direct output from the outside constant through the loop
then it works.
This has been submitted to NI as a bug report, so hopefully there will be a
fix soon.

Hi,
Isn't this exactly the same bug as the bug reported a few days ago ("Major
bug in LabVIEW math", by damsem)?
It was painfull enough the first time...
Regards,
Wiebe.
"Konima" wrote in message
news:[email protected]..
> There is a bug in LabVIEW 7.1 where you have a for-loop, a constant
outside
> the loop, a constant inside the loop and a subtraction of the two
constants.
>
> What you have to do to see the bug is:
>
> - Place a for-loop on the diagram
> - Wire a constant with any value to the count terminal
> - Place a constant on the diagram outside the for-loop, use any postive
> number
> - Place a constant inside the for-loop, use any positive number
> - Place a substract-icon inside the for-loop
> - Wire the
constant outside the loop to the substract-icon
> - Wire the constant inside the loop to the substract-icon
> - Wire the result of the substraction to the output of the loop and
disable
> indexing
> - Wire the input of the constant outside the loop directly to another
output
> of the loop and disable indexing
> - Probe the output of the subtract.
> - Run VI
>
> What you will see is that the output constant is treated as 0
> Same thing with addition, multiplication, division...
>
>
> When you change the outside constant to a control it works.
> When you remove the direct output from the outside constant through the
loop
> then it works.
>
> ----
> This has been submitted to NI as a bug report, so hopefully there will be
a
> fix soon.
>
>

Similar Messages

  • Bug in conditional for loop with an empty array

    There appears to be a bug in the for loop with a conditional terminal.
    If an empty array is wired to an auto-indexed array input tunnel, an output array tunnel has one element instead of zero.
    The array constant on the left is empty.
    Top loop without the conditional terminal produces an empty array.
    The bottom loop with a never true conditional terminal produces an array with one element
    Using LabVIEW version 8.5
    Message Edited by TrevMrgn on 05-05-2009 02:01 PM
    Solved!
    Go to Solution.
    Attachments:
    For loop bug.png ‏3 KB

    Creating the example from scratch, I do not see the error.
    Neither do I.
    If I add one or more elements to the array (constant or control), then delete them all (using 'Delete Element') the bottom array has one element.
    Nup. Still empty.
    If I empty the array (using 'Empty Array') both are empty.
    Yep.
    Also if I create an empty array using 'initialise array' with zero elements, I get one element.
    Nup. Still empty.
    'Show constant folding' does not appear to change the behaviour, but including a random operation in the loop does.
    Agreed that constant folding doesn't cause any odd behaviour. Introducing a random operation (adding two constants) in the loop doesn't either.
    I've tried all your methods here Trevor, but I can't replicate this behaviour in 8.5.1 under WinXP SP3. Sorry!
     Maybe somebody else will be able to help, or find a useable workaround.
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

  • BUG: 10.1.3..36.73 Internal Compile Error with enhanced for loop/generics

    I get the following compiler error when using the Java 5 SE enhanced for loop with a generic collection.
    Code:
    public static void main(String[] args)
    List<Integer> l = new ArrayList<Integer>();
    l.add(new Integer(1));
    printCollection(l);
    private static void printCollection(Collection<?> c)
    for (Object e : c)
    System.out.println(e);
    Error on attempting to build:
    "Error: Internal compilation error, terminated with a fatal exception"
    And the following from ojcInternalError.log:
    java.lang.NullPointerException
         at oracle.ojc.compiler.EnhancedForStatement.resolveAndCheck(Statement.java:2204)
         at oracle.ojc.compiler.StatementList.resolveAndCheck(Statement.java:4476)
         at oracle.ojc.compiler.MethodSymbol.resolveMethod(Symbol.java:10822)
         at oracle.ojc.compiler.RawClassSymbol.resolveMethodBodies(Symbol.java:6648)
         at oracle.ojc.compiler.Parser.resolveMethodBodies(Parser.java:8316)
         at oracle.ojc.compiler.Parser.parse(Parser.java:7823)
         at oracle.ojc.compiler.Compiler.main_internal(Compiler.java:978)
         at oracle.ojc.compiler.Compiler.main(Compiler.java:745)
         at oracle.jdeveloper.compiler.Ojc.translate(Ojc.java:1486)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildGraph(UnifiedBuildSystem.java:300)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildProjectFiles(UnifiedBuildSystem.java:515)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildAll(UnifiedBuildSystem.java:715)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.run(UnifiedBuildSystem.java:893)

    Install the Service Update 1 patch for JDeveloper (using the help->check for updates), and let us know if this didn't solve the problem.

  • Problem with continue in a for loop

    Hi all
    I have a variable of type Node[] which contains nodes like Text,ImageView and SVGPath etc...
    now i want to filter that group which means i want to separate the Text nodes for that i used a for loop as
    var abc:Node[];
    var abcsize=sizeof abc;
    var textarray:Text[]=for(i in abc){
    if(i.toString()=="Text"){
       i as Text;  //casting Node to Text
                     }//if
               else{
                      continue;     //if the node is not of type Text then i am skipping that one
                     }//else
          }//forwhen i am trying to compile this i am getting the compilation error as
    Note: An internal error has occurred in the OpenJFX compiler. Please file a bug at the
    Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues)
    after checking for duplicates.  Include in your report:
    - the following diagnostics
    - file 1.2.3_b36
    - and if possible, the source file which triggered this problem.
    Thank you.
        else{
    An exception has occurred in the OpenJavafx compiler. Please file a bug at the Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues) after checking for duplicates. Include the following diagnostic in your report and, if possible, the source code which triggered this problem.  Thank you.
    java.lang.ClassCastException: com.sun.tools.javac.tree.JCTree$JCContinue cannot be cast to com.sun.tools.javac.tree.JCTree$JCExpression
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:568)
            at com.sun.tools.javafx.comp.JavafxToJava.visitBlockExpression(JavafxToJava.java:2320)
            at com.sun.tools.javafx.tree.JFXBlock.accept(JFXBlock.java:83)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:565)
            at com.sun.tools.javafx.comp.JavafxToJava.translateAsValue(JavafxToJava.java:575)
            at com.sun.tools.javafx.comp.JavafxToJava.visitIfExpression(JavafxToJava.java:3595)
            at com.sun.tools.javafx.tree.JFXIfExpression.accept(JFXIfExpression.java:48)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:565)
            at com.sun.tools.javafx.comp.JavafxToJava.visitBlockExpression(JavafxToJava.java:2320)
            at com.sun.tools.javafx.tree.JFXBlock.accept(JFXBlock.java:83)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:565)
            at com.sun.tools.javafx.comp.JavafxToJava.translateAsValue(JavafxToJava.java:575)
            at com.sun.tools.javafx.comp.JavafxToJava$5.addElement(JavafxToJava.java:3007)
            at com.sun.tools.javafx.comp.JavafxToJava.visitForExpression(JavafxToJava.java:3212)
            at com.sun.tools.javafx.tree.JFXForExpression.accept(JFXForExpression.java:50)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:565)
            at com.sun.tools.javafx.comp.JavafxToJava.translateAsValue(JavafxToJava.java:575)
            at com.sun.tools.javafx.comp.JavafxToJava.translateNonBoundInit(JavafxToJava.java:1861)
            at com.sun.tools.javafx.comp.JavafxToJava.translateDefinitionalAssignmentToValueArg(JavafxToJava.java:1876)
            at com.sun.tools.javafx.comp.JavafxToJava.translateDefinitionalAssignmentToSetExpression(JavafxToJava.java:1917)
            at com.sun.tools.javafx.comp.JavafxToJava.visitVarScriptInit(JavafxToJava.java:1976)
            at com.sun.tools.javafx.tree.JFXVarScriptInit.accept(JFXVarScriptInit.java:67)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToStatement(JavafxToJava.java:598)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToStatement(JavafxToJava.java:628)
            at com.sun.tools.javafx.comp.JavafxToJava.visitBlockExpression(JavafxToJava.java:2306)
            at com.sun.tools.javafx.tree.JFXBlock.accept(JFXBlock.java:83)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToStatement(JavafxToJava.java:598)
            at com.sun.tools.javafx.comp.JavafxToJava.access$700(JavafxToJava.java:89)
            at com.sun.tools.javafx.comp.JavafxToJava$FunctionTranslator.makeRunMethodBody(JavafxToJava.java:2164)
            at com.sun.tools.javafx.comp.JavafxToJava$FunctionTranslator.methodBody(JavafxToJava.java:2224)
            at com.sun.tools.javafx.comp.JavafxToJava$FunctionTranslator.doit(JavafxToJava.java:2279)
            at com.sun.tools.javafx.comp.JavafxToJava.visitFunctionDefinition(JavafxToJava.java:2292)
            at com.sun.tools.javafx.tree.JFXFunctionDefinition.accept(JFXFunctionDefinition.java:93)
            at com.sun.tools.javafx.comp.JavafxToJava.translateGeneric(JavafxToJava.java:500)
            at com.sun.tools.javafx.comp.JavafxToJava.translate(JavafxToJava.java:509)
            at com.sun.tools.javafx.comp.JavafxToJava.visitClassDeclaration(JavafxToJava.java:1261)
            at com.sun.tools.javafx.tree.JFXClassDeclaration.accept(JFXClassDeclaration.java:141)
            at com.sun.tools.javafx.comp.JavafxToJava.translateGeneric(JavafxToJava.java:500)
            at com.sun.tools.javafx.comp.JavafxToJava.translate(JavafxToJava.java:521)
            at com.sun.tools.javafx.comp.JavafxToJava.visitScript(JavafxToJava.java:1147)
            at com.sun.tools.javafx.tree.JFXScript.accept(JFXScript.java:89)
            at com.sun.tools.javafx.comp.JavafxToJava.translateGeneric(JavafxToJava.java:500)
            at com.sun.tools.javafx.comp.JavafxToJava.translate(JavafxToJava.java:517)
            at com.sun.tools.javafx.comp.JavafxToJava.toJava(JavafxToJava.java:691)
            at com.sun.tools.javafx.main.JavafxCompiler.jfxToJava(JavafxCompiler.java:728)
            at com.sun.tools.javafx.main.JavafxCompiler.jfxToJava(JavafxCompiler.java:699)
            at com.sun.tools.javafx.main.JavafxCompiler.compile2(JavafxCompiler.java:785)
            at com.sun.tools.javafx.main.JavafxCompiler.compile(JavafxCompiler.java:685)
            at com.sun.tools.javafx.main.Main.compile(Main.java:624)
            at com.sun.tools.javafx.main.Main.compile(Main.java:312)
            at com.sun.tools.javafx.Main.compile(Main.java:84)
            at com.sun.tools.javafx.Main.main(Main.java:69)
    ERROR: javafxc execution failed, exit code: 4
    D:\work\javaFX\javaFX_workspace\Book_fix\nbproject\build-impl.xml:143: exec returned: -1Any one please help

    - This is a real bug in the compiler, obviously. I wonder if I haven't meet it already, or something similar. Maybe you should report it.
    - The problem is that your code is incorrect anyway: the branch with continue doesn't return a value, so cannot be used in the list building. Well, at least that's what I suppose which confuses the compiler. You can try and return null (which will be discarded) instead of using continue.
    - But your code can be much more efficient, compact and perhaps even more readable, using the powerful JavaFX sequence comprehension:
    var seqMixed = [ 1, "one", Text { content: "Ichi" }, Circle {}, 2, "two", Text { content: "Ni" } ];
    println(seqMixed);
    var seqFiltered = seqMixed[ obj | obj instanceof Text ];
    println(seqFiltered);
    seqFiltered = seqMixed[ obj | not (obj instanceof Text) ];
    println(seqFiltered);

  • Audio Looping bug in rendered output

    I've hit a recent issue where I'm getting audio looping / stuttering bugs in the rendered output. Doesn't happen at the start of the clip, but elsewhere if I fade everything down to black / nothing, and then fade up again into the next clip, the audio loops / stutters during that fade in. Using "Constant Power" to bring up the audio from nothing to full. Clip plays fine in Premiere, just the final output has the issue. Have encoded audio as both WAV and AC3, same issue.
    Curiously, if I output a WAV file only (no video) straight from Premiere, it is clean. That's how I'm now working around this, and coding the AC3 track in Audacity when required. Also (even more curiously!) I recently installed Audition, I'm wondering if that has messed anything up in Premiere. Audition wasn't actually used in any of these corrupt projects (and the project I used Audition for was fine as far as I am aware), but I've never had it installed until 2 or 3 weeks ago.
    Anyone else hit this, or know how to fix it? Between this and the video render issue I posted a couple of months back (still not resolved), I'm rapidly losing faith in Adobe's encoding tools.
    I can post some example clips if anyone wants a listen. Reminds me of the XDCAM looping bug that existed a while back, although the scenario there was somewhat different (audio at the end of the clip looped, and my current video is AVCHD from a Sony NX5, not XDCAM).
    Premiere Pro CC 7.2.1 (4)
    Media Encoder CC 7.2.0.43 (64-bit)
    Audition 6.0 Build 732 (64-bit)

    Hi  madmaxmovies,
    Thanks for posting on Adobe forums,
    Please follow suggestion provide in this link http://forums.adobe.com/message/5997457
    Thanks,
    Sandeep

  • Config data refnums invalidate​d by for loop

    I have found the following problem with LabVIEW 7.0. This only occurs when running the application as built with the application builder and does not appear to be a problem in the development environment.
    Given an open refnum for a config file one can loop through several read key operations while passing the data and the refnum to outputs on the for loop. If you disable indexing on the refnum output of the for loop you should get a usable refnum out. What happens instead when you try to close the refnum is an error indicating that the refnum is invalid. If you simply route the refnum around the loop avoiding the for loop output altogether this doesn't happen. It appears that somehow, going through the indexing output of the f
    or loop invalidates or changes the refnum when in a built application using the runtime.
    If anyone can reproduce this or prove me wrong it would be helpful. This bug cost me days of chasing down why my "major app" would only work when in development but fail when built. The lack of debug capability in a built app of course leant to the effort that it took to track this down.
    Thanks,

    Hello, i'm french so scuse for my writting...
    I don't find where put this question so i writte here.
    I want to do a soft who's objective is to writte config data (open config data + write key + close..).
    you can find it in the join piece.
    this soft run correctly but when i do an exe with the application builder, when i try to run the exe, that saying me error 7 about the Nex file in Open config data...
    How can i solve this problem???
    Tanks for all....
    Attachments:
    chconfexe.vi ‏32 KB

  • LabVIEW 6.1 If For Loop count terminal is zero then value going through the loop is not passed on to the output of the loop

    Hello, one of our customers just encountered an execution error in a vi running under LabVIEW 6.1, which doesn't exist under LabVIEW 5.1 or 6.01. I have a simple vi that has two encapsulated For Loops. Two string arrays go in, one goes out of the outer loop. Inside the outer loop the first array is indexed. The string which results from this indexing is compared with all other strings from the second string array in the inner loop. If it matches one of the strings of the second array, it is not outputted, otherwise this string goes through the inner For Loop to the output of the inner loop and from there to the output of the outer loop. The count
    terminal of the outer/inner loop is connected to the Array Size of the first/second string array. If the second array is empty, that means that the element in test from the first arry cannot match anything from the second array, so the element in test is send to the output of the inner loop and from there to the output of the outer loop. This works fine in LabVIEW 5.1 and 6.01, but NOT in LabVIEW 6.1. In LabVIEW 6.1 the inner loop is never executed if the count value is zero (which is correct), but the data line running through the loop is not executed either, which is different to what LabVIEW 5.1 and 6.01 do. There, the input string is sent to the output of the inner loop correctly even if the loop counter is zero. The solution is easy - I just have to connect the output of the outer loop to the data line BEFORE it enters the inner loop. But: I don't know if this is a LabVIEW 6.1 bug or if it is supposed to be a feature, but it brings some incompatibility in programming between the
    different LabVIEW versions.
    Best regards,
    Gabsi

    Hi,
    When a for-loop runs zero times, all outputs are 'undefined' (and should
    be).
    Besides, how would LV know what the output of a not executed routine should
    be?
    It might be handled differently in LV5 and LV6, which is unfortunate. In
    both cases, the result is undefined.
    It's not a bug. It's just something that should be avoided in any LV
    version.
    > The solution is easy - I just have to connect the
    > output of the outer loop to the data line BEFORE it enters the inner
    > loop. But: I don't know if this is a LabVIEW 6.1 bug or if it is
    In some cases this does the trick. But if the data is changed in the inner
    loop, this will effect the results if the N is not zero.
    Technically, I think the output in this construction is also 'undefined'.
    But LV handles this as expected / desired.
    Another solution is to use a shift register. If N is zero, the input is
    directly passed through to the output.
    Regards,
    Wiebe.
    "Gabs" wrote in message
    news:[email protected]...
    > LabVIEW 6.1 If For Loop count terminal is zero then value going
    > through the loop is not passed on to the output of the loop
    >
    > Hello, one of our customers just encountered an execution error in a
    > vi running under LabVIEW 6.1, which doesn't exist under LabVIEW 5.1 or
    > 6.01. I have a simple vi that has two encapsulated For Loops. Two
    > string arrays go in, one goes out of the outer loop. Inside the outer
    > loop the first array is indexed. The string which results from this
    > indexing is compared with all other strings from the second string
    > array in the inner loop. If it matches one of the strings of the
    > second array, it is not outputted, otherwise this string goes through
    > the inner For Loop to the output of the inner loop and from there to
    > the output of the outer loop. The count terminal of the outer/inner
    > loop is connected to the Array Size of the first/second string array.
    > If the second array is empty, that means that the element in test from
    > the first arry cannot match anything from the second array, so the
    > element in test is send to the output of the inner loop and from there
    > to the output of the outer loop. This works fine in LabVIEW 5.1 and
    > 6.01, but NOT in LabVIEW 6.1. In LabVIEW 6.1 the inner loop is never
    > executed if the count value is zero (which is correct), but the data
    > line running through the loop is not executed either, which is
    > different to what LabVIEW 5.1 and 6.01 do. There, the input string is
    > sent to the output of the inner loop correctly even if the loop
    > counter is zero. The solution is easy - I just have to connect the
    > output of the outer loop to the data line BEFORE it enters the inner
    > loop. But: I don't know if this is a LabVIEW 6.1 bug or if it is
    > supposed to be a feature, but it brings some incompatibility in
    > programming between the different LabVIEW versions.
    > Best regards,
    > Gabsi

  • Opening PDF in IE "breaking" for loop

    Hi,
    I have a dynamic PDF that is uploaded to a website.  When the PDF opens, the user has to fill in certain fields before clicking the "Next" button.  Upon clicking the Next button, I have a JavaScript function that sets certain fields access to required and then runs a for loop to check if any are empty.  The next event is setting those fields access back to optional. Lastly, a popup window refers the user to the empty fields (fields are shaded red, but not their borders).
    The problem occurs for one user who is using IE9 and has Reader X installed on his machine.  It only occurs when he opens it directly with his browser, if he downloads it to his desktop first he encounters no problem.  But using the browser makes filling in the fields on Page 1 glitchy, and then the loop doesn't work properly when he hits "Next".  The event setting the fields back to optional doesn't seem to be firing, and the popup never comes up.  So he's left with fields with red borders-which should not be happening.
    Any idea what could be causing this bug only when accessing via browser? I can't replicate the problem on any of my browsers, even after disabling Adobe add-ons in IE. 
    Thanks for any suggestions!

    Hi,
    I have a dynamic PDF that is uploaded to a website.  When the PDF opens, the user has to fill in certain fields before clicking the "Next" button.  Upon clicking the Next button, I have a JavaScript function that sets certain fields access to required and then runs a for loop to check if any are empty.  The next event is setting those fields access back to optional. Lastly, a popup window refers the user to the empty fields (fields are shaded red, but not their borders).
    The problem occurs for one user who is using IE9 and has Reader X installed on his machine.  It only occurs when he opens it directly with his browser, if he downloads it to his desktop first he encounters no problem.  But using the browser makes filling in the fields on Page 1 glitchy, and then the loop doesn't work properly when he hits "Next".  The event setting the fields back to optional doesn't seem to be firing, and the popup never comes up.  So he's left with fields with red borders-which should not be happening.
    Any idea what could be causing this bug only when accessing via browser? I can't replicate the problem on any of my browsers, even after disabling Adobe add-ons in IE. 
    Thanks for any suggestions!

  • [svn:fx-trunk] 11999: Fixed: ASC-3889 - Using setting in a for loop causes Verify error

    Revision: 11999
    Revision: 11999
    Author:   [email protected]
    Date:     2009-11-19 11:37:09 -0800 (Thu, 19 Nov 2009)
    Log Message:
    Fixed: ASC-3889 - Using setting in a for loop causes Verify error
    Notes: emit pop after callstatic to a void function to balance the stack.
    Reviewer: jodyer+
    Testing: asc,tamarin,flex checkin tests
    Ticket Links:
        http://bugs.adobe.com/jira/browse/ASC-3889
    Modified Paths:
        flex/sdk/trunk/modules/asc/src/java/macromedia/asc/semantics/CodeGenerator.java

    Blacklisting the ahci module does indeed get rid of the error. Would be nice to figure out why it was conflicting with the ahci module though.
    I have not yet tried the 173xx drivers, but the latest drivers for the Quadro FX 580 are the 256.53 drivers according to nvidia.
    Posted at the nV forums (http://www.nvnews.net/vbulletin/showthread.php?t=155282), so we'll see what they suggest.

  • [svn:fx-trunk] 11530: Fix ASC-3790 ( conditional expression in for loop causes verifier error) r=jodyer

    Revision: 11530
    Author:   [email protected]
    Date:     2009-11-06 13:23:05 -0800 (Fri, 06 Nov 2009)
    Log Message:
    Fix ASC-3790 (conditional expression in for loop causes verifier error) r=jodyer
    Ticket Links:
        http://bugs.adobe.com/jira/browse/ASC-3790
    Modified Paths:
        flex/sdk/trunk/modules/asc/src/java/macromedia/asc/parser/ConditionalExpressionNode.java

  • Error CreateImage in for loop array

    Hi,
    I would like to dynamically create images inside a for loop. It dependent on the array_size that the sevlets will send. Snapshots of code:
    for (int i = 0; i < ARRAY_SIZE; i++)
    img[i] = Image.createImage("\"/nike" + (i+1) + ".png\"");
    }Error:
    java.io.IOException
         at javax.microedition.lcdui.ImmutableImage.getImageFromStream(+15)
         at javax.microedition.lcdui.ImmutableImage.<init>(+20)
         at javax.microedition.lcdui.Image.createImage(+8)
         at SlidesCanvas.createImages(+138)
         at SlidesCanvas.<init>(+146)
         at ListSlides.commandAction(+113)
         at javax.microedition.lcdui.Display$DisplayAccessor.commandAction(+282)
         at javax.microedition.lcdui.Display$DisplayManagerImpl.commandAction(+10)
         at com.sun.midp.lcdui.DefaultEventHandler.commandEvent(+68)
         at com.sun.midp.lcdui.AutomatedEventHandler.commandEvent(+47)
         at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+250)
    Is this a known bug in CreateImage? Or am i doing it in a wrong way?

    Herlena
    I tried this, it works.
    for (int i = 0; i < ARRAY_SIZE; i++) {
        img[i] = img.createImage("nike" + (i+1) + ".png");
    Hope your problem is solved, Darryl

  • Enhanced for-loop by java5 needs to be more  enhanced?

    Hi, all of you,
    I often need to iterate a collection. Sometimes I need to iterate a subset of a collection. Then I have found the enhanced for-loop is not enough.
    Before Java 5, you did the following:
    for(int i=0;i<collection.size();i++) {
    Object object = collection.get(i);
    doSomething(object);
    }Thanks to Java 5, you can do the following:
    for(Object object:collection) {
    doSomething(object);
    }However, before Java 5, I have the flexibility to skip the first two lines by purpose, as follows
    for(int i=2;i<collection.size();i++) {
    Object object = collection.get(i);
    doSomething(object);
    }What should I do the same thing with Java 5?
    Kind regards.
    Pengyou

    pengyou wrote:
    JoachimSauer wrote:
    masijade. wrote:
    uncle_alice wrote:
    Or, if the collection is a List: for (Object obj : theList.subList(2, theList.size())) {
    doSomething(obj);
    Ah, yeah, I keep forgetting about that. ;-)
    Actually, I just never think about it. ;-)I think you're not alone. I find that subList() is severly under-used. It simplifies a lot of operations (ever tried someList.subList(0, someIndex).clear()? Try it).The solution is nice except it might throw IndexOutOfBoundsException.Which probably means a bug somewhere else. The way to avoid runtime exceptions is to write code that doesn't put you into situations where they'll arise, not to avoid them being thrown

  • Parallelized for loop. Searching for a one-line solution

    Hi.
    In an usual day I do a lot of for loops inside of command line. But I noted that my loops don't use the full power of my dual core processor, they only use one processor.
    A lot of the loops I do have independent interactions in the sense that a interaction code don't need the results of another interaction. This is the simplest problem in multiprocessing, I only need to execute N process in parallel.
    I'm searching for a one-line solution that I can use in place of a 'for i in *.txt; do echo $i;done'. With one-line I means that can be used as one-line but the implementation can be longer. And can be in any programming language.
    For now I'm using the following small python solution (the smallest I could get)
    #!/usr/bin/env python
    # -*- coding: utf-8 -*-
    from multiprocessing import Pool
    from glob import glob
    from subprocess import call
    def f(x):
    call(['asy', '-f', 'png', '-render=0', x])
    pool = Pool(processes=4)
    pool.map(f, glob('*.asy'))
    But I like something that can be integrated in my "shell life". Anyone know a solution for my problem?

    http://stackoverflow.com/questions/3816 … ash-script
    http://www.mail-archive.com/bug-bash@gn … 05820.html
    Last edited by karol (2009-11-23 00:30:34)

  • Endless "Stream Overlap" Error Loop Bug Crashes Encore

    Endless "Stream Overlap" Error Loop Bug Crashes Encore.
    This is the 4 th time I have reproduced the bug.
    I burn a Disk image .. and upon completion the "Disk Info" resets to zero bytes under the Build Menu and when checking the Timelines Window the Dialog Box pops up with the "Stream Overlap" Error.
    Has anyone else had this issue?
    I have read other forum post .. and there is nothing relevant.
    I had to rebuild the project twice from scratch.
    I'm waiting for my Master Collection 5.5 .. maybe it is fixed in it.

    NOTE: There is a issue with Premiere Pro Dynamically Linking with After Effects with file corrupting I am experiencing as well.
    Someone offered a solution to rename my files to just words. ( No numbers or other characters )
    It still crashes .. and there is still file corruption ... but a "Linked Composition" can be found by "Edit Original" .. whereas it was not found before I changed the filename.
    This is a beginning to find the source of the nested bugs.
    I am wondering if this filesystem problem is core to the "Stream Overlap" problem noted here.
    I have have not reached tech support on the Encore side of this problems as of yet.
    This type of file system also has a terrible result for dated files:
    On the Mac ( Standard Finder ) :
    2011.1.1
    2011.1.2
    2011.1.9
    2011.1.10
    2011.1.11
    is treated in Adobe Encore as well as other Adobe Suite Master Collection Apps ( On the Mac Platform ) as:
    2011.1.1
    2011.1.10
    2011.1.11
    2011.1.2
    2011.1.9
    This make NO logical sense at all .. and must be some old DOS filesystem?
    Timecode
    Datestamp
    Numbered Outlines
    Are all very important ways to organize files / video.
    I am surprised that Adobe did not address this years ago.
    I have had two Adobe users mention a file system problem that has been known.
    Maybe it is the cause of my issues? ... Adobe is mixing two incompatible filesystems on a root level on the Mac platform only. ( Doesn't work with the Mac Finder? )

  • Zero iteration for loop

    Hi folks,
    There's an old behavior that I'm pretty used to, but it still occasionally bites me (usually with references).  It happened again today, and it got me to wondering if it's really intended behavior.
    If you pass a value into a zero iteration for loop, then send it out the other side, the value exiting the for loop is returned to default, not the value you fed in (see simple.vi, LV7.1).
    Any ideas?
    Joe Z.
    Attachments:
    simple.vi ‏11 KB

    This is expected behavior...the workaround is to use shift registers to pass the value through instead of tunnels.  I believe this is discussed in the LabVIEW Help.
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

Maybe you are looking for

  • How to change Default editor in Linux for PL/SQL Programming

    Deare friends , I am using oracle 8i (8.1.6) on RedHat Linux 7.2 , But i donot know how to change default editor for modify editor on sql prompt say ex:- In winodow SQL> ED it open nope pad to modify sql and pl/sql statement while in linux SLQ > ED i

  • How to Change attachment URL on a Purchase Req?

    Attachments in the EBP shopping carts are transferred to an ITS server and are linked to a back end R/3 Purchase Requisition.  Note that the attachments are physically stored on ITS server and the link (URL) to the attachment and Purchase Req is stor

  • Redundant duplicates in Modified folder

    Hello all, I've recently started using iPhoto (ver. 6) primarily for its entry-level editing options and as a nice way to see all my photos in central location whilst retaining search and categorisation functions. I keep all my media on a partition o

  • DVD Studio Pro Broken since 10.5.5 installation

    Every I play any video in DVD Studio Pro the image turns green. Ever since 10.5.5 was installed. I have an ATI X1900 for G5. Anyone know what's going on?

  • To check the transport request of SAPScript layout

    Hi Experts, I'd like to ask how to check the transport request assigned to SAPScript layout created in SE71. Im using SAP version 4.5b.Thanks! Best Regards, Kurtt