Thread in infinite loop? (help appreciated)

Basically, i'm trying to make a basic traffic simulator, and learn java at the same time, so bare with me...
I want a couple of threads to run concurrently in the applet, but am having touble. Basically one starts inside the run() and works fine, but the other wont...infact nothing after the first thread will run (i.e. if the repaint() goes after the end of catch{}). The source is a bit of a mess with no comments, but its all really basic so should be easy for even the elementary java programmer to understand.
I know the second thread (well what i hope is a second thread) doesn't actually do anything other than output a line that could be done by the first thread, but its just proof of concept for now, i will put stuff in there later.
source, class and html are here:
http://www.soton.ac.uk/~tr403/traff/
also the slider in the bottom right doesn't appear in the browser unless you click on it, but in the applet viewer it comes up...why is this? its at the bottom of my priorities at the mo, but its puzzling, and obviously something really elementary.
Any help MUCH appreciated, its for my dissertation which has got be to handed in on may 11th ;)
This the run bit, initated from the start [method? not sure on terminology yet]
public void run()
              Thread carmove = Thread.currentThread();
               try {
               while (carmove != null){
               Thread.currentThread().sleep(carsptimeout);
               xcount++;
               repaint(0,144,300,5);
               if (xcount == maxlength1){
                    xcount = 0;
            catch (InterruptedException e){}
                 Thread sysline = Thread.currentThread();
               try {
                    while (sysline != null){
                    Thread.currentThread().sleep(carsptimeout);
                    System.out.println(xcount);
               catch (InterruptedException e){}
     }

oh wait whoops sorry this is in tottaly the wrong place...apologies, will repost in correct section.

Similar Messages

  • Stopping a Thread in Infinite Loop

    I've read several articles on how to stop Threads, and all of them point to using Thread.interrupt(). The problem right now is what happens when the thread is in an infinite loop. For example:
    class A implements Runnable
        public void run()
            while(!Thread.currentThread().isInterrupted())
                  while(true);
    //in other class's main method:
    Thread a = new Thread(new A());
    a.start();
    a.interrupt();The a.interrupt() call only sets the isInterrupted flag in Thread, but it does not terminate the thread as a.stop() would. However, stop() throws a ThreadDeath exception that I would not want to have to deal with. Is there any way to stop this infinite loop thread safely?
    Thanks in advance!

    No need to get snitty. You certainly did not make clear that you are not a newbie at programming. Plenty of newbies who barely have a grasp of the language fundamentals post thread questions here. I thought I did address the question at hand. It seems I misunderstood what you were asking.
    The only way to safely stop that inner loop is like so: while (...) {
       while (!done) {
    }where done is volatile, or all access to it is sychronized on the same lock (meaning you'd sync the !done check above as well).
    If you can't do that, and it's stuck at while (true) and you can't modify the body of the inner loop to check done, then you're SOL.
    (I suppose it's conceivable that 1.6 or 6.0 or whatever it's called will introduce some new safe way to stop that thread, but I haven't heard anything about it.)

  • Iphone stuck in infinite loop, HELP!

    my iphone after resetting all settings through settings>general>reset, is stuck in an infinite loop.
    it turns on, shows the apple logo, then about a minute later the loading symbol appears, after 10mins it quickly flashs black and then starts the loop again, i have left it for over 12 hours, to see if it will fix itself, but it wont.
    i cant get it into dfu or recovery mode, it wont even turn off until it runs out of battery and then repeats its loop. when i charge it it just starts the loop again!
    please i really need help, if i cant resolve this problem, im not going to buy the ipad and the iphone 4g as i planned to do so.
    please could anyone help!

    If you can't get your iPhone into DFU or recovery mode, there is a major problem. You can make an appointment at an Apple store if there is one nearby.
    This is a user to user help forum only, so doubtful if any fellow users will lose any sleep over your threat not to purchase an iPad or the next generation iPhone when released if this problem cannot be resolved. If not, more than likely there is a hardware problem or failure. If a problem arises with your PC that you cannot resolve, are you not going to purchase another PC either?

  • PLSQL in Infinite Loop -- Help!

    The PLSQL procedure below seems to go into an infinite loop. I am hoping that someone out there can tell me why? Many thanks in advance!
    create or replace procedure GF_POC_Migration is
    v_subdo_data varchar2(180); /* email address */
    v_subdo_type varchar2(180); /* email, rss, my yahoo, etc */
    v_subdo_created date;
    v_subdo_modified date;
    v_subdo_subs_id number(20); /* POC subscritpion set id */
    v_subs_identifier varchar2(80); /* POC System cookie identifier */
    v_subs_id number(19); /* POC Subscription SET Id */
    v_sub_id number(19); /* POC Subscription Id*/
    v_subs_created date;
    v_subs_modified date;
    v_sub_created date;
    v_sub_modified date;
    v_consumer_id number(19);
    v_client_shopper_id number(19);
    v_client_id number(19);
    v_sequence_nxtval number(19);
    v_als_id number(19); /* Alert Selector Id */
    v_product_name varchar2(100);
    v_category_name varchar2(254);
    /* Sub Delivery Options from the POC System contains all the information for
    the consumers email address. Using this to drive the process of migration -
    consumer by consumer*/
    Cursor SUBDO_CURSOR IS
    select SUBDO_SUBS_ID, SUBDO_DATA, SUBDO_TYPE, t.SUBS_CREATED, t.SUBS_MODIFIED
    from rm_sub_delivery_options s, rm_subscription_sets t
    where s.subdo_data not in (select t.ooe_email from rm_optout_emails t)
    and t.subs_id = s.subdo_subs_id;
    /* Subscription Sets in the POC system relates to RM_CLIENT_SHOPPER in v1.5 */
    Cursor SUBSCRIPTION_SETS_CURSOR IS
    select subs_identifier, subs_created, subs_modified, subs_id
    from rm_subscription_sets t
    where t.subs_id = v_subdo_subs_id;
    Cursor CLIENTS_CURSOR IS
    select client_id from rm_client t
    where identifier='GUESSFACTORY';
    Cursor NXTVAL_GLOBAL_SEQ IS /* Rainmaker's one and only seq # generator in v1.5 */
    Select rm_global_sequence.nextval
    from dual;
    Cursor SUBSCRIPTIONS_CURSOR IS
    select t.sub_id, t.sub_created, t.sub_modified
    from rm_subscriptions t
    where t.sub_subs_id = v_subs_id;
    CURSOR POC_CAT_AND_PRODS_CURSOR IS /* Get the selector via two view joins to POC & v1.5 */
    select als_id, tier3, full_cat_name
    from poc_catsprodssubs poc, v15_categories_mig v15
    where upper(poc.prd_name)=upper(v15.tier3)
    and upper(poc.prd_identifier)=upper(v15.full_cat_name)
    and poc.sub_id = v_sub_id;
    begin
    /*DBMS_OUTPUT.ENABLE(100000000);*/
    OPEN CLIENTS_CURSOR; /* Get the Guess Factory ID the one time */
    FETCH CLIENTS_CURSOR INTO v_client_id;
    CLOSE CLIENTS_CURSOR;
    OPEN SUBDO_CURSOR;
    LOOP
    FETCH SUBDO_CURSOR /* Get the Signup Email, RSS, etc Info */
    INTO v_subdo_subs_id, v_subdo_data, v_subdo_type, v_subdo_created, v_subdo_modified;
    EXIT WHEN SUBDO_CURSOR%NOTFOUND;
    /*dbms_output.put_line('v_subdo_subs_id = ' || v_subdo_subs_id || ' + ' || v_subdo_data);*/
    LOOP /* Each line of RM_SUBSCRIPTION_SETS - need to create a new row in RM_CLIENT_SHOPPER */
    OPEN NXTVAL_GLOBAL_SEQ; /* Get the next seq value */
    FETCH NXTVAL_GLOBAL_SEQ INTO v_sequence_nxtval;
    v_client_shopper_id := v_sequence_nxtval; /* Capture client_shopper_id */
    CLOSE NXTVAL_GLOBAL_SEQ;
    /*dbms_output.put_line('v_clientshopper_id = ' || v_client_shopper_id || ' + ' || v_sequence_nxtval);*/
    /* Get corresponding records from RM_SUBSCRIPTION_OPTIONS */
    OPEN SUBSCRIPTION_SETS_CURSOR;
    FETCH SUBSCRIPTION_SETS_CURSOR
    INTO v_subs_identifier, v_subs_created, v_subs_modified, v_subs_id;
    EXIT WHEN SUBSCRIPTION_SETS_CURSOR%NOTFOUND;
    /*dbms_output.put_line('poc cookie = ' || v_subs_identifier || ' + ' || v_subs_id);*/
    /* Get the Consumer Id */
    OPEN NXTVAL_GLOBAL_SEQ;
    FETCH NXTVAL_GLOBAL_SEQ INTO v_sequence_nxtval;
    v_consumer_id := v_sequence_nxtval;
    /*dbms_output.put_line('v_consumer_id = ' || v_consumer_id || ' + ' || v_sequence_nxtval);*/
    CLOSE NXTVAL_GLOBAL_SEQ;
    /* Start the Client Inserts */
    INSERT INTO RM_CONSUMER (CONSUMER_ID, CHANGE_NUMBER, STATUS, CREATED, MODIFIED)
    VALUES(v_consumer_id, 0,0, v_subs_created, v_subs_modified);
    /* dbms_output.put_line('Insert to Client Shopper' || v_client_shopper_id || ' + ' ||'Consumer Id:' ||v_consumer_id);
    dbms_output.put_line('Also..Client Id' || v_client_id );*/
    INSERT INTO RM_CLIENT_SHOPPER (CLIENT_SHOPPER_ID, CONSUMER_ID, CHANGE_NUMBER, COOKIE_IDENTIFIER,
    CLIENT_ID, STATUS, LAST_KNOWN_CRS_PROD_IDX, SIGNUP_SUCCESS_STEP, SIGNUP_FAILURE_STEP,
    CREATED, MODIFIED)
    VALUES (v_client_shopper_id, v_consumer_id, 5, v_subs_identifier, v_client_id, 2,0,1,0,v_subs_created, v_subs_modified);
    CLOSE SUBSCRIPTION_SETS_CURSOR;
    /* Start handing the SUBSCRIPTIONS: move POC --> v1.5 */
    OPEN SUBSCRIPTIONS_CURSOR;
    OPEN POC_CAT_AND_PRODS_CURSOR; /* I know I shouldn't be opening/closing this but ... */
    LOOP
    FETCH SUBSCRIPTIONS_CURSOR
    INTO v_sub_id, v_sub_created, v_sub_modified; /* Get subscription info from the POC tables */
    EXIT WHEN SUBSCRIPTIONS_CURSOR%NOTFOUND;
    /*dbms_output.put_line('v_sub_id = ' || v_sub_id || ' + ' || v_sub_created);*/
    INSERT INTO RM_SUBSCRIPTION (SUBSCRIPTION_ID, CHANGE_NUMBER, CREATED, MODIFIED)
    VALUES (rm_global_sequence.nextval, 0, v_sub_created, v_sub_modified);
    FETCH POC_CAT_AND_PRODS_CURSOR
    INTO v_als_id, v_product_name, v_category_name; /* Get correct Alert Selector, Product & Category by matching to the v1.5 tables */
    EXIT WHEN POC_CAT_AND_PRODS_CURSOR%NOTFOUND;
    INSERT INTO RM_NEW_ARRIVALS_SUBSCRIPTION (SUBSCRIPTION_ID,ALERT_SELECTOR_ID,
    CLIENT_SHOPPER_ID, IS_PRIMARY, STATUS) /* Populate the v1.5 Alert Selector selections */
    VALUES(rm_global_sequence.currval, v_als_id, v_client_shopper_id, 0, 1 );
    END LOOP; /* Subsrciption */
    CLOSE POC_CAT_AND_PRODS_CURSOR;
    CLOSE SUBSCRIPTIONS_CURSOR;
    END LOOP; /*Sub Scription Sets */
    /* Populate the v1.5 RM_DELIVERY_OPTIONS table */
    INSERT INTO RM_DELIVERY_OPTION (DELIVERY_OPTION_ID, CHANGE_NUMBER, TYPE, DATA, CLIENT_SHOPPER_ID,CREATED, MODIFIED)
    VALUES (RM_GLOBAL_SEQUENCE.NEXTVAL, 0, v_subdo_type, v_subdo_data, v_client_shopper_id, v_subdo_created, v_subdo_modified);
    /*COMMIT;*/
    END LOOP; /* Main Control Loop */
    CLOSE SUBDO_CURSOR;
    END GF_POC_Migration;

    If you cut out all the things that are obviously open/closed etc. and look at your loops...
    BEGIN
       OPEN subdo_cursor;
       LOOP
          FETCH subdo_cursor INTO v_subdo_subs_id, v_subdo_data, v_subdo_type, v_subdo_created, v_subdo_modified;
          EXIT WHEN subdo_cursor%NOTFOUND;
          LOOP
             OPEN subscriptions_cursor;
             OPEN poc_cat_and_prods_cursor;
             LOOP
                FETCH subscriptions_cursor INTO v_sub_id, v_sub_created, v_sub_modified;
                EXIT WHEN subscriptions_cursor%NOTFOUND;
                FETCH poc_cat_and_prods_cursor INTO v_als_id, v_product_name, v_category_name;
                EXIT WHEN poc_cat_and_prods_cursor%NOTFOUND;
             END LOOP;                                          /* Subsrciption */
             CLOSE poc_cat_and_prods_cursor;
             CLOSE subscriptions_cursor;
          END LOOP;  << THERE IS NOTHING TO EXIT THIS LOOP
       END LOOP;
       CLOSE subdo_cursor;
    END gf_poc_migration;

  • Thread in infinite loop, won't allow anything else to happen...help appreci

    Basically, i'm trying to make a basic traffic simulator, and learn java at the same time, so bare with me...
    I want a couple of threads to run concurrently in the applet, but am having touble. Basically one starts inside the run() and works fine, but the other wont...infact nothing after the first thread will run (i.e. if the repaint() goes after the end of catch{}). The source is a bit of a mess with no comments, but its all really basic so should be easy for even the elementary java programmer to understand.
    I know the second thread (well what i hope is a second thread) doesn't actually do anything other than output a line that could be done by the first thread, but its just proof of concept for now, i will put stuff in there later.
    source, class and html are here:
    http://www.soton.ac.uk/~tr403/traff/
    also the slider in the bottom right doesn't appear in the browser unless you click on it, but in the applet viewer it comes up...why is this? its at the bottom of my priorities at the mo, but its puzzling, and obviously something really elementary.
    Any help MUCH appreciated, its for my dissertation which has got be to handed in on may 11th ;)
    This the run bit, initated from the start [method? not sure on terminology yet]
    public void run()
                  Thread carmove = Thread.currentThread();
                   try {
                   while (carmove != null){
                   Thread.currentThread().sleep(carsptimeout);
                   xcount++;
                   repaint(0,144,300,5);
                   if (xcount == maxlength1){
                        xcount = 0;
                catch (InterruptedException e){}
                     Thread sysline = Thread.currentThread();
                   try {
                        while (sysline != null){
                        Thread.currentThread().sleep(carsptimeout);
                        System.out.println(xcount);
                   catch (InterruptedException e){}
         public void stateChanged(ChangeEvent e)
              tempreadout.setText
                   (" " + (slider.getValue()));
              carsptimeout = 100 - (int)slider.getValue();
             public void update(Graphics g)
                  paint(g);
            }

    This sounds like something i can do...not sure how
    its gonna effect the slider at the bottom but will do
    it anyway.Think of your applet as a bunch of cards on top of each other.
    +----------------------+
    | APPLET               |
    |                      |
    |                      |
    |  --------          |
    |  | button |          |
    |  --------          |
    ----------------------Each card call the paint on all its childern. You override the paint, so it it does not call "paint" on its childern. By moving the draw into a different JPanel, which has no childern, the fact that you don't ask for its childer to be drawn does not matter.
    | Applet               |
    | -----------------  |
    | |DrawTraficlights |  |
    | -----------------  |
    |                      |
    |  --------          |
    |  | button |          |
    |  --------          |
    Any ideas on my threads?Redesign.
    Create a class for object type in your world. Only "extend" a different class if that makes sence.
    What is a "sysline"?
    Why is trafic light moving cars forward?

  • Patchadd stuck in infinite loop -HELP!!

    Hi all,
    Iam trying to install some OS patches in SunOS 5.8 machine[sun4u sparc SUNW,Sun-Fire-280R]
    But after the process starts, it seems to get stuck in an endless loop. I get the following messages.
    Checking installed patches...
    Verifying sufficient filesystem capacity (dry run method)...
    After the second line, the process of installing patch does not seem to end.
    I did the install in single mode.
    Rebootted the machine and did an fsck. But didnt help. Tried downloading a patch to patch 'patchadd' , but could not install it as well.
    I tried debugging the patchadd. Here is a debugging trace.
    required utlsa are available
    Checking installed patches...
    Verifying sufficient filesystem capacity (dry run method)...
    + exit_code=0
    + pkgInst=
    + pkgDispList=
    + dryrunFailure=
    + ReqArrCount=0
    + firstTimeThru=yes
    + cd /var/spool/patch/112396-02
    + + pwd
    curdir=/var/spool/patch/112396-02
    + typeset -i pkgInsCtr=0
    + newpkglist= SUNWcsr
    + pkgInst= SUNWcsr
    + newpkglist= SUNWcsr SUNWcsu
    + pkgInst= SUNWcsr SUNWcsu
    + pkglist= SUNWcsr SUNWcsu
    + [[ -f SUNWcsr/pkginfo ]]
    + echo inside. . . .
    inside. . . .
    + /usr/bin/cp /tmp/patchadd-127541250/response.1250 /tmp/patchadd-127541250/response.1250.1
    + [[ yes == no ]]
    + [[ yes == yes ]]
    + echo first time thru
    first time thru
    + [[ no == yes ]]
    + pkgadd -D /tmp/patchadd-127541250/112396-02.1250 -S -n -a /tmp/patchadd-127541250/admin.tmp.1250 -r /tmp/patchadd-127541250/
    response.1250.1 -R / -d . SUNWcsr SUNWcsu
    + 1>> /tmp/patchadd-127541250/pkgaddlog.1250 0< /dev/null 2>& 1
    It seems like it is getting stuck in the pkgadd command .
    Any help on this would be highly appreciated.
    Thanks,
    Vimalnath. A

    HI,
    Make sure the patch doesn't exists in the system.
    Ski

  • Listeners, load a class on startup and creating threads in infinite loop

    This is an identical post to the one I made in the jsp forum. I do this as I know, being a regular here, that there are equally good people(in j2ee web application development) in both these forum, but many of them stick to their particular forums of choice - jsp / servlets.
    I was wondering if there is any means by which I could launch my own class when tomcat starts (in the same jvm).
    1. I need one or more Thread/TimerTask because the requirement is such that the application would have continous data drops (in the form of logs) which has to be picked up, parsed and pushed into a db. Another part of the application reads the data from the db on requests (http) and displays it over the web. The thread has to poll for arrival of new logs and then hand it over to a framework for parsing and inserting the parsed data to a db.
    2. I know that I can possibly use a servlet with a load-on-startup value greater than 1 and code my requirement into the init method. However, using a servlet for a functionality different from servicing http requests has me worried. (valid ?), not to mention the fact that Iam very uneasy about creating threads from within Servlets.
    3. I googled hard and found that I could probably use a tomcat specific context lifecycle listener.
    4. I could also possibly use the servlet api - the ServletContextListener.
    5. I have rejected #2 and settled on either #3 or #4 - the ServletContextListener or Tomcat specific Lifecycle Listener, though the later, as I said binds me to Tomcat (which is ok for me). Are there any other specific (dis)advantages of using either especially when I have to create threads from within them (on context startup)? Other than memory leaks, killing the thread objects & associated resources on context shutdown, is there anything else that I need to watch out for while using threads.
    6. I wonder is there is there a plain startup hook available in tomcat (rather than listeners) - from where I can launch a class that starts a thread in the same jvm as tomcat's ?
    Thanks In Advance,
    Ram.

    Anybody ? Sorry for bumping up.
    Thanks,
    Ram.

  • Help me pls! - Infinite loop!!

    Dear Guys,
    I am totally lost in my codes, pls help, TQ:
    import java.io.*;
    public class opReadLine {
         public opReadLine() {} //class constructor
         public static void main(String args[]) {
              FileReader inFile;
              BufferedReader inData;
              try {
                   inFile = new FileReader("test.cfg");
                   inData = new BufferedReader(inFile);
                   String temp = inData.readLine();
                   do {
                        System.out.println("The UID is: " + temp);
                   } while (temp != "END");
                   inData.close();
              catch (IOException ie) {
              ie.printStackTrace();
    Content of "test.cfg":
    END
    note: there is no blank line above "END"!!
    Rgds,
    Daniel

    Sorry I forgot to state the problem I am facing and the code I actually wanted.
    I want my code to read from a file line by line until it meets the word "END".
    However, I found there is a big syntax problem in:
    do {
    } while (temp != "END");
    The result for the code above is infinite loop of System.out.println("The UID is: " + temp);
    However,
    when I changed the code to:
    do {
    } while (temp == "END");
    it will execute "System.out.println(The UID is: " + temp) once and stops.
    In other words, the code recognizes END, but why when I try to compare with !=, it gives me problem??
    Pls help! TQ

  • Throws infinite-loop error after cycline through Vector - HELP!!!

    public void paint(Graphics g) {
    FontMetrics fm = g.getFontMetrics();
    xpos = (getSize().width - fm.stringWidth(((String[])parseVector.elementAt(kount))[1])) / 2;
    if (ypos >= getSize().height || ypos <= 0) {
    g.drawString("", 0, 0); // CLEAR THE APPLET
    ypos = getSize().height;
    if (kount <= parseVector.size()) {
    kount++;
    } else {
    kount = 0;
    g.drawString(((String[])parseVector.elementAt(kount))[1], xpos, ypos);
    class ScrollNews implements Runnable {
    public void run() {
    while (true) {
    ypos = ypos - 1;
    ParseNews.this.repaint();
    try {
    Thread.sleep(50);
    } catch (InterruptedException e) {}
    I don't know why this breaks after working one time through the Vector parseVector, what am I missing????
    Phil

    public void paint(Graphics g) {
    FontMetrics fm = g.getFontMetrics();
    xpos = (getSize().width -
    fm.stringWidth(((String[])parseVector.elementAt(kount))
    1])) / 2;
    if (ypos >= getSize().height || ypos <= 0) {
    g.drawString("", 0, 0); // CLEAR THE APPLET
    ypos = getSize().height;
    if (kount <= parseVector.size()) {
    kount++;
    } else {
    kount = 0;
    g.drawString(((String[])parseVector.elementAt(kount))[
    ], xpos, ypos);
    class ScrollNews implements Runnable {
    public void run() {
    while (true) {
    ypos = ypos - 1;
    ParseNews.this.repaint();
    try {
    Thread.sleep(50);
    } catch (InterruptedException e) {}
    I don't know why this breaks after working one time
    through the Vector parseVector, what am I missing????
    PhilI think your problem is here:
    while (true) {You have an infinite loop - how will the while loop ever be false?

  • Need help with an infinite loop please

    Can somebody please help me out with displaying text that's been imported from another file onto a JTextArea? this is the code i've been trying to get to work, and it does, but it is stuck in an infinite loop and i can't see why. I've tried adding a counter before the while loop, and displaying and incrementing it inside the loop. The counter gets to 32 (the last line of the file) then goes back to 1 and starts again. Any help, or explanations would be awesome, thanks.
    String line;
         while ((line=reader.readLine())!=null){
              System.out.println(num);
              append(line+" \n");
         }                              

    think you will have to post some more of the code, is that within any sort of loop itself , has it its own method ? is it an event handler ? ..btw the append sould be fine .. is this a subclass of a TextArea ? where is this bit of code ?
    Message was edited by:
    odd_function

  • Help on how to make an infinite loop with the same space on all images

    HI:
    I made a movie clip with infinite  loop in which there are images that move from right to left something simple like a marquee, and each image has a blank space between  them, but between last and first image there is a more space, how I can do to  make all images have an equal space between each one and that the motion never stops.

    Thanks for your time and answers my friend, but I'm still not be able to achieve what I want, I forgot to tell that I'm doing this by layers, let's say, I have 5 images, (in fact I have like 50 images converted to movie clip symbols) each image has it's own layer, layer 1, layer 2, layer 3, layer 4, layer 5, then I put a 200 frame motion tween on all layers at 30 fps, then I arranged layer 1 on the first frame to the frame 200, the second layer from frame 50 to frame 250, third layer from frame 100 to frame 300, fourth layer from frame 150 to frame 350, and fifth layer from frame 200 to frame 400, by this I mean I put a 50 frame of space on each image but if you can see, the last image has a duration from frame 200 to frame 400, and there's nothing on frame 250 where it is supposed to be another image to match the same blank space of all the others, the movie clip restarts on the frame 400, and there's a 150 frames of blank space between the last image and the first image, I put the gotoandplay on the frame 250, but it abruptly restarts the movie.
    Is there another way to do this ?
    Am I doing something wrong ?
    Please I really really need help on this.
    Thanks

  • Need help with infinite loop in recovery mode in Creative Zen 20

    hi,
    I'm having this problem with my Creative Zen 20 GB:
    When I turned it on, it goes immediately to the rescue/recovery mode. Not sure why. Will do that even when I reset the device.
    So, I selected cleanup. After cleanup, it remained showing the menu of the recovery mode. I selected reboot. After reboot, it went back to the rescue/recovery mode. And it goes on and on like an infinite loop.
    Finally, I decided to do a formatAll. Again, it remained in the recovery mode menu after the formatAll action. After reboot, it again went back to the rescue/recovery mode.
    I have never updated the firmware. So, I thought maybe that will help. However, when I connected the device to my PC, the device went to rescue/recovery mode and the PC could not detect the device connected via USB. In short, I am currently not able to do anything at all with the device except charging it.
    Would appreciate help/advise.
    Tks in advance.

    huggiebear wrote:
    I connected the device to the PC and after the PC tried to load the library, it said "Player is not connected".
    What library are you loading? After you have run that reload os option, you need to connect the player to the computer and run the firmware update software. If you haven't download that, you can go to the download section and download it. If all else fail, the player is probably faulty and you would need to get in contact with Customer Support then.
    Jason

  • My ipad is on an infinite loop.  I used ios7 for a few days and then did updates on some of my apps. that's when the infinite loop started.  I have tried pressing the power and home button at the same time, but it doesn't work. Please help!

    my ipad is on an infinite loop.  I used ios7 for a few days and then did updates on some of my apps. that's when the infinite loop started.  I have tried pressing the power and home button at the same time, but it doesn't work. Please help!
    I even tried some hints posted for ios6 (turn off Ipad, holding home button and plugging in power cord at the same time and then releasing the home button)
    I did manage to get a different screen that shows the itunes icon and a power cord, but nothing happens.

    You were on the right track. You got the connect to iTunes screen and you ended to use iTujes to restore your iPad. Try recovery mode again.
    Recovery Mode Instructions
    Disconnect the USB cable from the iPad, but leave the other end of the cable connected to your computer's USB port.
    Turn off iPad: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for iPad to turn off.
    If you cannot turn off iPad using the slider, press and hold the Sleep/Wake and Home buttons at the same time. When the iPad turns off, release the Sleep/Wake and Home buttons.
    While pressing and holding the Home button, reconnect the USB cable to iPad. When you reconnect the USB cable, iPad should power on.
    Continue holding the Home button until you see the "Connect to iTunes" screen. When this screen appears you can release the Home button.
    If necessary, open iTunes. You should see the recovery mode alert that iTunes has detected an iPad in recovery mode.
    Use iTunes to restore iPad.

  • Neep help with infinite loop! Please Help

    I currently have a program that allows a user to enter a password protected site and it will return all the images on that page.
    I�m trying to allow the user to type in the root URL, i.e. http://stage.diabetescontrolforlife.com/ and have the program pull all the images in all of the child directories. i.e. http://stage.diabetescontrolforlife.com/tool.aspx
    I got an inner class similar to the one pulling the <IMG> tag, that pulls the <A> tag. The class adds all the links to a linkList Arraylist. In my main method I call image.getInfo(image.getLinkList()); hoping that I can just pass all the links back through the program and find all the <IMG> tags.
    The problem is that, I get the desired output but it displays in an infinite loop, and the program never ends as it searches linkList over and over for <IMG> tags.
    So, I tried to adding two different Do, While loops.
    Main Method:
    do
                image.getInfo(image.getLinkList());
                test=1;
    }while(test != 1);This one does not change the output. Infinite loop continues.
    Inner Class:
    HTMLEditorKit.ParserCallback callback;
    callback = new HTMLEditorKit.ParserCallback ()
               public void handleStartTag(HTML.Tag tag, MutableAttributeSet attributes, int position)
                            do
                                        if (tag == HTML.Tag.A)
                                                    link = (String)attributes.getAttribute (HTML.Attribute.HREF);
                                                   if(link != null && !link.startsWith("javascript") && !link.startsWith("#") &&        link.startsWith("/"))
                                                                link = root + link;
                                                                linkList.add(link);
                                                               test=1; 
                    }while(test!=1);
    public void handleSimpleTag (HTML.Tag tag,MutableAttributeSet aset,int pos)
    {if (tag == HTML.Tag.IMG )This one never allows the first URL to be checked, and the program just sits there.
    Do you see anything I�m doing wrong, or anyway I can stop the infinite loop?
    I think the problem is that both of the searching tag classes are inner classes but I don�t know how to make them their own classes without messing up the whole password checking.
    Any advice would be helpful!

    HTMLEditorKit.ParserCallback callback;
              callback = new HTMLEditorKit.ParserCallback ()
                public void handleSimpleTag (HTML.Tag tag,MutableAttributeSet aset,int pos)
                        if (tag == HTML.Tag.IMG )
                            src = (String)
                                         aset.getAttribute (HTML.Attribute.SRC);
                            alt = (String)
                                         aset.getAttribute (HTML.Attribute.ALT);
                            height = (String)
                                         aset.getAttribute (HTML.Attribute.HEIGHT);
                            width = (String)
                                         aset.getAttribute (HTML.Attribute.WIDTH);
                            //System.out.println("SRC = " + src);
                            //System.out.println("ALT = " + alt);
                            System.out.println("ROOT2"+root);
                            System.out.println("SRC1"+src);
                            if(src.startsWith("http"))
                            else
                            if(src.startsWith("../"))
                                src = src.replace("../", "");
                                src = root +"/"+ src;
                            else
                            if(src.startsWith("/"))
                                src = root + src;
                            else
                                src = root +"/"+ src;
                            System.out.println("SRC2"+src);
                            altList.add(alt);
                            srcList.add(src);
                            heightList.add(height);
                            widthList.add(width);
                            currentUrl.add(passUrl);
                            if(alt == null)
                                altPresent.add("No");
                            else
                                altPresent.add("Yes");
                            URI uri = null;
                            try
                                if (!uriBase.toString ().endsWith ("/") &&
                                    !src.startsWith ("/"))
                                    src = "/" + src;
                              uri = new URI (src);
                                uri = uriBase.resolve (uri);
                                System.out.println("URL"+passUrl);
                                System.out.println ("uri being " +
                                                    "processed ... " + uri);
                                System.out.println("ROOT3"+root);
                            catch (URISyntaxException e)                           
                               System.err.println ("Bad URI");
                               return;
                            // Convert the URI to a URL so that its input
                            // stream can be obtained.
                            URL url = null;
                            try
                                url = uri.toURL ();
                            catch (MalformedURLException e)
                              System.err.println ("Bad URL");
                                return;
                            //InputStream is;
                            //String filename = url.getFile ();
                            //int i = filename.lastIndexOf ('/');
                            //if (i != -1)
                            //    filename = filename.substring (i+1);
                    @Override
               public void handleStartTag(HTML.Tag tag, MutableAttributeSet attributes, int position)
                            //while(test!=1)
                                System.out.println("TEST"+test);
                            if (tag == HTML.Tag.A)
                                link = (String)
                                             attributes.getAttribute (HTML.Attribute.HREF);
                                if(link != null && !link.startsWith("javascript") && !link.startsWith("#") && link.startsWith("/"))
                                    /*if(link.startsWith("/"))
                                        link = root + link;
                                    else
                                    if(!link.startsWith("http"))
                                        link = root +"/"+ link;
                                    //if(link.contains(root))
                                        link = root + link;
                                       test=1;
                                          linkList.add(link);
              try
                         HttpURLConnection urlConn = null;
                        //URL url = new URL(server);
                        // Build the string to be used for Basic Authentication <username>:<password>
                        String userPassword =  "testmlr" + ":" + "stage1-7000";
                        // Base64 encode the authentication string
                        String encoding = new sun.misc.BASE64Encoder().encode (userPassword.getBytes());
                        //URLConnection
                        urlConn = (HttpURLConnection) url.openConnection();
                        // Enable writing to server ( to write request )
                        urlConn.setDoOutput(true);
                        // Enable reading from server ( to read response )
                        urlConn.setDoInput(true);
                        // Disable cache
                        urlConn.setUseCaches(false);
                        urlConn.setDefaultUseCaches(false);
                        // Set Basic Authentication parameters
                        urlConn.setRequestProperty ("Authorization", "Basic " + encoding);
                       // test(server);
                        BufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
                  new ParserDelegator().parse(in, callback, false);
                  System.out.println(in + "test123412341234");
              catch (ChangedCharSetException e)
                  String csspec = e.getCharSetSpec ();
                 Pattern p = Pattern.compile ("charset=\"?(.+)\"?\\s*;?",
                                             Pattern.CASE_INSENSITIVE);
                  Matcher m = p.matcher (csspec);
                  String charset = m.find () ? m.group (1) : "ISO-8859-1";
                  // Read and parse HTML document using appropriate character set.
    public ArrayList getLinkList()
           return linkList;
       }

  • TS1394 I have 11 software updates.  The machine says in need to retart to install.  I am in an infinite loop where it just keeps restarting and never installing the updates.  Help!

    I have 11 software updates.  The machine says in need to retart to install.  I am in an infinite loop where it just keeps restarting and never installing the updates.  Help!

    If 10.7.0 or later...
    Bootup holding CMD+r, or the Option/alt key to boot from the Restore partition & use Disk Utility from there to Repair the Disk.

Maybe you are looking for

  • Sent Messages can not be read in MAIL, why?

    Up to an hour ago, I could view all my SENT messages in MAIL, suddenly I am getting a message saying "The message from [account] has not been downloaded from the server. You need to take this account online in order to download it." But I AM online!

  • FCP 5 Upgrade From FCE

    I recently bought an FCP 5 upgrade (M9921Z/A) and the Apple website says that it can upgrade from FCE. I know it's old but couldn't afford to buy FC Studio 2 and couldn't find a full-up version of FCP5. I've tried it with both an FCE 2.0 and FCE 3.5

  • Multiple Folders in DCIM when using PC & USB...

    I have an Iphone 4 / 16GB / using 64Bit Windows 7 PC for USB connection... Note: This did not used to happen in version 4.X... Only after upgrading to 5.X this started happening... I take lots of photos and videos on a daily bases of my kids, work, e

  • Number not change in excise invoice print

    hi all, we have a problem with excise invoice print. previously invoice created with number 49, now new number get posted with 49 again. check in J1I9 for number range. it shows current number 49 means print out expected number was 50 but it prints 4

  • Package.jdo in JBuilder

    Hi, The user manual states that "creating and editing package.jdo metadata files for multiple classes is currently not supported in the JBuilder interface." Whenever I make/rebuild/run my project from JBuilder, it executes the enhancer against each o