Unexpected output sequence and NPE

Compile given code under Eclipse (tested on Eclipse 3.1.0, WebsphereStudio6) and then run on IBM JVM (tested on 1.4.1, 1.4.2)
Under WSAD6 after few seconds I got output sequence:
Leaving try1;0
In finally1;0
Leaving try1;0
In finally1;0
Leaving try1;0
In finally1;0
but it's imposiible if you look on the code... (or I'am ignorant in java)
If program is runned under Eclipse or standalone IBM JVM (only runned, compiled under Eclipse!!!), porogram throws NPE after few seconds and JVM is terminated.
Could anybody explain this ??
Is this bug??
For me, this is a problem, beacuse I'm working now under application, that is runnign on Websphere Application Server, and of course I'm using WSAD as IDE. And in this program I have found place, where my code hangs'up - it's going in infinite loop without any reason.
import java.io.File;
import java.io.FileOutputStream;
import java.io.PrintStream;
import org.apache.log4j.Logger;
public class FinallyTest {
     private static IMyLogger log = new MyLogger(FinallyTest.class);
     public static void someMethod(String text){
               int count = 0;
               int code = -1;
               while (count < 2 && (code == -1 || code == 2)) {
                    count++;
                    try {
                              System.out.println("Entering try:"+count+";"+code);
                              System.out.println("Do something"+count+";"+code);
                              if (log.isDebugEnabled()) {
                                   System.out.println("Leaving try"+count+";"+code);
                         code = 0;
                    } finally {
                         if (log.isDebugEnabled()) {
                              System.out.println("In finally"+count+";"+code);
               if (log.isDebugEnabled()) {
                    System.out.println("Outering");
               if (code == 0) {
                    if (log.isDebugEnabled()) {
                         System.out.println("Before return:"+count+";"+code);
                    return;
               throw new RuntimeException(null+"a");
     public static void main(String[] args) throws Exception {
          File f = new File("out.txt");
          PrintStream ps = new PrintStream(new FileOutputStream(f));
          System.setOut(ps);
          for (;;){
               someMethod("any text");
interface IMyLogger {
     public boolean isDebugEnabled();
class MyLogger  implements IMyLogger{
     private Logger logger;
     MyLogger(Class clazz) {
          this.logger = Logger.getLogger(clazz.getName());
     public boolean isDebugEnabled() {
          return logger.isDebugEnabled();
}btw: log4j is needed, tested on 1.2.6 and 1.2.8

for (;;){
    someMethod("any text");
}is not source of problem!!! Infinite loops is created in method someMethod, You can change for (;;) with for (int x=1; x<10000; x++) if You wish.
Here is another simplified version (without log4j. Run this code please:
public class FinallyTest {
     private static IMyLogger log = new MyLogger(FinallyTest.class);
     public static void someMethod(String text){
               int count = 0;
               int code = -1;
               while (count < 2 && (code == -1 || code == 2)) {
                    count++;
                    try {
                              System.out.println("Entering try:"+count+";"+code);
                              System.out.println("Do something"+count+";"+code);
                              if (log.isDebugEnabled()) {
                                   System.out.println("Leaving try"+count+";"+code);
                         code = 0;
                    } finally {
                         if (log.isDebugEnabled()) {
                              System.out.println("In finally"+count+";"+code);
               if (log.isDebugEnabled()) {
                    System.out.println("Outering");
               if (code == 0) {
                    if (log.isDebugEnabled()) {
                         System.out.println("Before return:"+count+";"+code);
                    return;
               throw new RuntimeException(null+"a");
     public static void main(String[] args) throws Exception {
          for (int x=1; x<10000; x++){
               someMethod("any text");
interface IMyLogger {
     public boolean isDebugEnabled();
class MyLogger  implements IMyLogger{
     MyLogger(Class clazz) {
     public boolean isDebugEnabled() {
          return Priority.DEBUG.isGreaterOrEqual(Priority.DEBUG);
class Priority {
  int level;
  public final static int DEBUG_INT = 10000;
  final static public Priority DEBUG = new Priority(DEBUG_INT);
  protected  Priority(int level) {
    this.level = level;
  public boolean isGreaterOrEqual(Priority r) {
    return level >= r.level;
}

Similar Messages

  • Changing "2 Outputs" to "1 Stereo" To Match Sequence and Clips

    I'm using Final Cut Pro 6.0.4 on a Macbook Pro. I initially posted this question on the wrong forum I think (Final Cut Pro X) but can't figure out how to just move it here, so I am posting it here.
    My footage is:
    1440x810, 29.7 fps, MPEG-4 Video Compressor, 44.1 KHz aud rate, 32-bit floating point.
    The audio is set at "1 stereo."
    My sequence is:
    1440x810, 29.7 fps, MPEG-4 Video Compressor, 44.1 KHz aud rate, 32-bit floating point.
    The audio is set at "2 outputs."
    When I drop footage into the sequence, it says the audio needs to be rendered. The only thing that doesn't match between the sequence and the footage is the Audio Outputs. I did select to have my sequence match clip settings when prompted. I've looked through sequence settings and nothing changed it, and  I cannot for the life of me figure out how to change "2 outputs" to "1 stereo" (or vice versa) without having to re-compress all the footage and then re-import it.
    I also tried the "Match Audio Outputs" command, but nothing changed when I did that either.
    I have this problem every time I edit and usually just resort to re-compressing the footage, but that can take days and I'd like to avoid that.
    Am I missing something?

    I didn't record the footage, I'm just the editor. I can ask Julie & Brandy (the people in the video) what camera they used if that's important, though? They sent it to me as mov files on a disc.
    These are the clip properties (is this visible? it looks so small in my window but the screenshot i took is way larger, hopefully it will expand)
    These are the sequence properties:
    Also, even though it says 16-bit there, it says 32-bit on the browser:

  • Purchase Order and GR document Output Determination and creating own logo o

    Can anyone let me know the process of output determination of PO and GR documents.
    Also let me know the way to incorporate my own logo on the documents

    Hi sudip
    For the logo on documents, you have to take help of ABAP ppl.
    Output of Purchase Order
    1. Condition Table
    SPRO > Material Management> Purchasing -> Message -> Output Control->Condition Tables->Define Condition Table for Purchase Order
    Select: 
    Purchasing Doc. Type,
    Purch. Organization,
    Vendor
    2. Access Sequences
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Access Sequences->Define Condition Table for Purchase Order
    3. Message Type
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Types->Define Message Type for Purchase Order
    *4. Message Determination Schemas*
    4.1. Message Determination Schemas
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Schema->Define Message Schema for Purchase Order-> Maintain Message Determination Schema
    4.2. Assign Schema to Purchase Order
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Schema->Define Message Schema for Purchase Order-> Assign Schema to Purchase Order
    5. Partner Roles per Message Type
    SPRO -> Material Management-> Purchasing -> Message -> Output Control-> Partner Roles per Message Type ->Define Partner Role for Purchase Order
    6. Condition Record
    Navigation Path: SAP Menu-> Logistics -> Material Management -> Purchasing-> Master data->Messages-> Purchase Order-> MN04-> Create
    Now you create PO (ME21N) and save it. Go to ME22N and print the PO by giving output type.
    Output of GR
    After setting table, access sequence and output type for GR,run MB02 transaction, enter material document number. Double click one line item and select messages. Separate screen will be opened to configure outputs. Give the required fields and save the document. 
    Now Run MB90, you can take printout. Output Type: WE03 or WE01 or WE02

  • Output determination and Printer determination for  both PO and GR

    Dear all,
    Can anyone please help me in congiguring the output determination and printer determination for  both PO and GR. please give me detailed configuration including the paths as i am stuck with the configuration.
    Thanks & Warm Regards
    Somashekar Anand

    hi Somashekar
    follow he steps
    Output of Purchase Order
    1. Condition Table
    SPRO > Material Management> Purchasing -> Message -> Output Control->Condition Tables->Define Condition Table for Purchase Order
    Select:
    Purchasing Doc. Type,
    Purch. Organization,
    Vendor
    2. Access Sequences
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Access Sequences->Define Condition Table for Purchase Order
    3. Message Type
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Types->Define Message Type for Purchase Order
    *4. Message Determination Schemas*
    4.1. Message Determination Schemas
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Schema->Define Message Schema for Purchase Order-> Maintain Message Determination Schema
    4.2. Assign Schema to Purchase Order
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Schema->Define Message Schema for Purchase Order-> Assign Schema to Purchase Order
    5. Partner Roles per Message Type
    SPRO -> Material Management-> Purchasing -> Message -> Output Control-> Partner Roles per Message Type ->Define Partner Role for Purchase Order
    6. Condition Record
    Navigation Path: SAP Menu-> Logistics -> Material Management -> Purchasing-> Master data->Messages-> Purchase Order-> MN04-> Create
    Now you create PO (ME21N) and save it. Go to ME22N and print the PO by giving output type.
    Output of GR
    After setting table, access sequence and output type for GR,run MB02 transaction, enter material document number. Double click one line item and select messages. Separate screen will be opened to configure outputs. Give the required fields and save the document. Now Run MB90, you can take printout. Output Type: WE03 or WE01 or WE02
    Reward points if helpful
    Thanks and regards
    Ravikant Dewangan

  • Output Control and Copy Control

    I have the following problem.
    My client has a copy control for transfering data from a quotation to a different type of quotation. The quotation (old one) has a sold-to-party and a ship-to-party. These two partners are copied to the new quotation. If for any reason the ship - to - party is changed, then while printing an output for the quotation, the old ship - to - part is being printed.
    What should I do?

    Hi Stilianos,
    Please go to NACE t-code and check your output condition records regarding of your access sequence and output type.  condition record may effect your ship-to  like your problem.
    Moreover, check your routines maintained properly your copy control partner item routine and copying requirement to your copy control item level from SD>Sales and distribution>Sales>Maintain Copy Control for Sales Documents > Copying control: Sales doc to sales doc.
    I hope these will be helpful for your issue. Additionally, please share with us the progress about it.
    Regards,
    Sinan

  • Output Determination and and print of delivery list

    Hi All,
    I want to do output determination in delivery (VL02N) and get the printout of delivery note.
    Could you please suggest the above process in steps including the the maintenance of condition record.
    Regards
    Rahul

    Hi,
    Print output can be obtained through the Condition Technique.
    Steps are as follows.
    1.SPRO-IMG- Sales & Distribution- Basic Functions- Output
    2.Maintain output condition table for Sales documents.(T/code-V/57)
    3. Maintain output types.(T/code-V/30)
    4.Maintain Access Sequence.
    5.Assign output types to Partner Function.
    6.Maintain Output Determination.
    7.Assign output determination.(T/code-V/69).
    8.Allocate Sales Document Header i.e Choose Sales Document type and assign output determination procedure.
    9.Maintain condition record.T/code V V11.(For Sales order) and *V V21 for Deliver Documents* and V V31 for Invoices.
    Specify your output type and click on Key combination Maintain the details like bellow
    Sales Document Partner Function Medium Despatch Time Language
    Select condition line item then click on communication,specify output device(LP01) then Tick(Check print immediately) and save it.
    Then goto VA01 raise the Sales order go to extras-output-edit check condition record values are copied or not.(save it and exit)
    Go to VA02-Extras-output-Header-Print preview and check the result.and VL02n to see output for delivery documents.
    If u need further clarification, Plz revert
    Regards,
    Jaiprakash.P.Tikoti

  • Define Output type and Local destination per user

    Hi Gurus,
    Nowadays us have defined Output type by Sales Organiztion/Order Type (S_TCODE = VV11).
    Is possible define Output type and Local destination per user?. How to do?.
    thanks and best regards,
    Wilson

    Hi Wilson
    As per my understanding of requirement: you want output type and Local destination for each SAP End user (i.e. who is processing sales order) not the customer. If this is the requirement, we have two solution for it:
    1) If for a particular region/sales district customer are contacting to one particular destination, then create access sequence with output type/order type/sales district. Means for one sales district one Local destination. If sales district is big area and you have many local destination with in that, then you can divide it into regions.
    2) Ask your ABAPer to create a Z table and maintain Local destination for all Users. And amend the print program such that before saving the output entry into NAST table, based on SY-UNAME(user's id), fetch the printer (local destination) from Z table and update the NAST table accordingly.
    As per my observations, option 2 is simpler and more effective.
    try and revert.

  • Sequence and Capture Settings Help Needed

    Hi there...
    Need some advice on setting my Sequence and Capture Settings in FCP 6.0.4.
    I have a Sony HDR-SR1 (AVCHD) and I know I how to bring the footage in through "Log and Transfer", but I'm not sure what I should be bring the footage in as.
    Should I capture with HDV, or can I bring the footage in as ProRes 422 (HQ)? Once captured, should the Sequence be set to HDV - 1080i/60, or should it be set to the ProRes setting? Or, does AIC still play a factor in this and I should choose that?
    Correct me if I'm wrong, but if I bring in as HDV, the file size will be very large. But if I bring it in at ProRes 422, the filesize will be smaller, but how much will I lose in compression?
    Also, does anyone know if I'm stuck shooting 1080i/60 or can I get 1080i/50 or 720p/24/25/30?

    The orginal footage is not DV, it is DVCPRO 25. I am capturing in the DV setting because of the length of the footage. The DVCPRO deck doesn't have a firewire output.

  • Sequence and Capture Settings Match, Still Need To Render

    I am capturing my video footage through a AJA Kona board using the SDI input. I have set my capture setting in FCP to 525 29.97 DV, and have set my sequence setting to match, also 525 29.97 DV. Yet when I overwrite the footage to the the sequence it needs to be rendered. I was under the impression that if the sequence and capture settings match I would not have to render. Is this not true?

    The orginal footage is not DV, it is DVCPRO 25. I am capturing in the DV setting because of the length of the footage. The DVCPRO deck doesn't have a firewire output.

  • Convert the output sequence of complex FFT

    I am using complex FFT to do IQ demodulation.
    the input X of complex FFT  is  cos(x)+i*sin(x). abs(FFT(X)) is the frequency response of input X. I need to convert the output sequence the format
    FROM: DC f....Nyquist Frequency...–f
    TO: -Fre_nyquist ...DC... Fre_nyquist
    Is there any function I can use to do this convertion? thanks

    Just use "rotate array" from the array palette (LabVIEW 7.1 or lower) and rotate by n/2.
    If you have LabVIEW 8.0, simply wire a TRUE to the "shift?" input for a DC centered spectrum.
    LabVIEW Champion . Do more with less code and in less time .

  • Greetings, I am working in Final Cut Pro 7. In the timeline some clips show as offline. I tried going to sequence and reconnecting to media but it does not work. I can still see the video in the timeline and work with it. It just has the red box.

    Greetings, I am working in Final Cut Pro 7. In the timeline some clips show as offline. I tried going to sequence and reconnecting to media but it does not work. I can still see the video in the timeline and work with it. It just has the red box. Thanks! Olga

    If the clips are not actually missing, you could try to refresh the timeline by using cmd-0 and then going to the timeline options tab. Then select name only where it says "thumbnail display". Press ok to accept the change, then repeat the process to add thumbnails back to your timeline.

  • How can I avoid this message and the crash that follows? -"the program has unexpectedly stopped working and will close"

    I am working on some books that I have had no problem creating in Indesign  and this week, I was doing something and got an error message and had the program crash while I was working on something and lose my unsaved work. It happens all of a sudden and has been frustrating. Thought it was an installation issue, but this also happens on the newest version of CS6.
    The original files (“books”) were created in CS4.
    What I’m doing is copying a template for the appendix that was established in the first book into all subsequent books.
    Here is the process that I used on CS4 for the first 10 books –
    1.       open a file that already has the completed new appendix.
    2.       Open a file that needs the new appendix
    3.       Select the appendix pages from the pages menu in the completed file and “move” them to the new file.
    4.       Voila!
    When I started using CS5 this worked for one book. Now the last book is giving me an error message during step 3. So, I select the pages I want to move and click “move” and then I get a message that says “the program has unexpectedly stopped working and will close”. This is the same message I got with CS6.

    Same problem here. Firefox keeps freezing, sometimes for 5 minutes, then either starts working again really slowly or I get the plug-in error crash. This last time I copied what windows said about the error. This is the info:
    Problem signature:
    Problem Event Name: APPCRASH
    Application Name: plugin-container.exe
    Application Version: 1.9.2.3814
    Application Timestamp: 4c12b3be
    Fault Module Name: ntdll.dll
    Fault Module Version: 6.0.6002.18005
    Fault Module Timestamp: 49e03821
    Exception Code: c0000005
    Exception Offset: 00048b02
    OS Version: 6.0.6002.2.2.0.768.3
    Locale ID: 1033
    Additional Information 1: ca4b
    Additional Information 2: 0db6cc4f646c2246ddf8a462e3add7af
    Additional Information 3: 5b21
    Additional Information 4: e5b7e758762c24b02e09abea0b4585f4
    Don't know what it means or if it will help solve the issue, but thought I would share it.
    All I know is that I am about to do something I never thought I would, switch to Chrome.

  • MacBook Pro battery had accumulated more than a 1000 charges, and stopped functioning unexpectedly. Went and got the battery replaced. Just saw that SMC Firmware 1.6 update deals with this. Possible to get my money back?

    MacBook Pro battery had accumulated more than a 1000 charges, and stopped functioning unexpectedly. Went and got the battery replaced. Just saw that SMC Firmware 1.6 update deals with this. Possible to get my money back?

    The firmware update corrects an error that may occur, however the techs would have checked the condition of the battery prior to installing a new one.  If the battery was questionable, the firmware update was really not too important.
    You can check the battery condition by going to the apple, left side of the menu bar, About This Mac, More Info, System Report, Hardware, Power and see what it says about Cycle Count, Condition, Capacity: Condition anything but Normal needs to be checked and may need to be replaced.
    The cycle count of 1,000 charge cycles is the typical life of a Lithium-Ion battery, the point at which the capacity drops to 80% of the as built capacity.

  • What is the correct way to use Version Informatio​n from the sequence and from the deployment tool

    I seem to be missing something in how the various version numbers are supposed to be used.    My end goal is to log and possibly display in the UI the version of the sequence and which installer version was used to inspect a UUT.   I have gotten most of the way there using:
     How Can I Programmatically Query the Sequence File Version of My TestStand Sequence? 
    and logging this into the report with a function which contains:
    Parameters.UUT.AdditionalData.SetValString("Test Version",1,RunState.SequenceFile.Data.Version),
    Parameters.UUT.AdditionalData.SetFlags("",0,PropFl​ags_IncludeInReport)
    The "Deployment Version" in the TestStand Deployment Utility auto incrementing the 3rd position of a version number  while the sequence auto increment is working on the 4th.   
    My first question is are these 2 version numbers in anyway supposed to be related to each other?   As it seems to me you would want those 2 reversed, I can make several installers based on sequence version X, making changes to what supporting files are also installed.
    If they are not related as I suspect that they are not.  How do I programatically grabed the installer version and also log that into the result report?   
    is there an option to perform a custom deployment build step to log the deployment version before it builds and then reference that log at runtime of the test?

    Hi,
    The sequence file version and deployment versions are not related.
    You can build the installer with whatever version you want using the command line :
    https://decibel.ni.com/content/docs/DOC-38947
    Hope this helps,
    Ravi

  • Project renames sequence and all clips in the sequence when a clip is added

    My project is renaming my sequences and the clips in those sequences whenever I add a clip. For example, I have a sequence called "dance section 2", which contains 20 some-odd clips with various names. When I add a clip named "drop from above", the name of the sequence is changed to "drop from above", and the name of every other clip in the sequence is also changed to "drop from above" (video, audio, stills, everything). When I add a clip named "spins", all the names are changed to "spins".
    The name of the sequence is changed in both the timeline and the browser, but the names of the other clips are changed only in the timeline. In the browser, they keep their old names. The exception to this is the last clip added before the name changer. For example, if I add "drop from above" to the sequence, and then add "spins", the clip named "drop from above" is renamed "spins" in the browser as well as in the timeline, but the other clips are renamed only in the timeline.
    The clips in the sequence also keep their original content - so the sequence looks the same as it did before, but all the names of the clips are changed.
    This is only happening in one project. All of my other projects are working fine.
    I've tried restarting and deleting preferences. I've also looked at the autosave vault for the project. The backup projects saved after a certain time all behave the same way, and the projects before that time all behave normally. I can't imagine what would have caused this, though, since I've been working on this project all day and nothing's happened to my computer or hard drive or anything.
    Also, there are no freeze frames at the beginnings of my sequences (I read another thread with a somewhat similar issue and getting rid of freeze frames seemed to help that person).
    I'm in FCP 7.0 on a Macbook Pro.
    Thanks in advance for your help!

    Welcome to the discussions...
    I've had this happen. My guess is that it's related to round-tripping to/from Color, but I can't be sure. IMHO, the sequence is corrupted. I just dealt with it for a while, then rebuilt it by making changes from an earlier version.
    Sorry I don't have a better solution, but at least you know you're not alone.
    Patrick

Maybe you are looking for