1.3 not respecting the aspect ratio set: new bug?

I import a lot of scanned images, crop and straighten them and set a new aspect.
I work with: Pentium 4, Windows, 1200x1600 monitor (portrait).
I noticed with 1.3 what never happened to me with 1.2, as follows:
a. select an image in Develop
b. select crop overlay
c. select 2:3 aspect
d. straigthen the image (as example, by 1,00)
e. drag one of the corners, reducing the image size
f. the dragged corner 'jumps' a little and the gets reduced, visually showing a different aspect. Check the cropped dimensions and realise that the aspect is really not anymore 2:3. But 2:3 is shown selected!
What I do to counteract this, is selecting again 2:3 aspect, then the aspect is corrected, but the corners change how I did not intend.
I finally move the corners again and I crop as I will with the 2:3 aspect unchanged.
Does this happen to anyone else?
I consider this a quite annoying bug, am I right?
Thanks
Stefano

Thanks Steve,
I appreciate a lot, that you tried to reproduce the behaviour of Lightroom 1.3 on my PC, which runs Windows XP Home Edition Service Pack 2.
Well, it looks it happens just to me...
Anyway, if an Adobe technician reads that, here is what I see, mentioning a specific case:
- tiff imported image
size 7598x5082
- go to Develop page
- select Crop overlay
it shows locked aspect ratio
it shows Aspect: Original
- select Aspect: 2x3
size becomes 7598x5065 (I read that, moving the mouse over the thumb in the bottom panel)
- rotate the image by entering 1 in Straighten
the size becomes 7430x4953
- drag one (anyone) corner reducing the image size
while dragging, the dragged corner visibly 'jumps' increasing the reduction
- as example, the size is then 7350x4717 (not any more 2x3)
but it always shows Aspect: 2x3 !!!
The consequence of this behaviour is that after every rotating and resizing the set aspect ratio gets lost, even if otherwise stated by the shown aspect value.
I am then obliged to apply the Aspect: 2x3 again, which works, but which changes the position of the corners, therefore forcing me to set them again as I liked.
Perhaps what I wrote might be useful for Adobe people to correct this in a next version.
Thanks!
Stefano

Similar Messages

  • Clips lose pixel aspect ratio setting after relinking

    hi there,
    after reopening a project from a backup drive I had to relink all my media.
    no problem with that...
    but after relinking all aspect ratios were lost. files are 2048x1536 anamorph (manually) set to an aspect of 1.33 and then scaled down to 1920x1080.
    generally all settings were intact - the aspect ratio setting however was not. all clips had a square pixel setup after relinking.
    is this a bug?
    thanks!

    hi there,
    after reopening a project from a backup drive I had to relink all my media.
    no problem with that...
    but after relinking all aspect ratios were lost. files are 2048x1536 anamorph (manually) set to an aspect of 1.33 and then scaled down to 1920x1080.
    generally all settings were intact - the aspect ratio setting however was not. all clips had a square pixel setup after relinking.
    is this a bug?
    thanks!

  • Setting the aspect ratio of an image

    Hi
    Is it possible to specify the aspect ratio of an image? I have a bunch of video shots in my library and they all have non-square pixels so would like to "set" their aspect ratio.
    Thanks upfront!

    If you are using an analog camera, you can set the aspect ratio in MAX. This will correct for non-square pixels.
    If you are using a digital camera, I don't think there is a way to fix it during acquisition. You could resample the image to correct the ratios, but that would be a slow, time consuming process.
    One other possibility is that your computer monitor is in a mode which is not a standard 4x3 configuration. For example 640x480 and 800x600 are 4:3 ratios. 1200x1024 is not, which tends to distort your displayed images.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Set the aspect ratio

    Hello,
    I have an old iBook G4 (aspect ratio 4:3) hooked up to a TV screen (aspect ratio 16:9). This means the TV always gets the 4:3 output and is incredibly annoying.
    Using the open source MPlayer I am able to set the aspect ratio of movie files to 16:9, meaning they are distorted when viewing on the iBook screen but appear correctly on the TV screen.
    However, MPlayer is not as good a player as QT and tends to corrupt the rendering... is it possible to set the aspect ratio of a movie in QT? This could also be solved if it were possible to set the aspect ratio of the entire display on the iBook when the video-out cable is plugged in.

    no resolution... doesn't seem possible.

  • The aspect ratio of this file is  not support by DVD. Possible slideshow error?

    hello everyone,
    I will try to give as much information as possible.  Dont scream at me if i forget anything.  For starters, I just learned how to use Adobe Encore CS4.  I taught my self between reading the  help files and videos I found on the web.   I am an amateur when it comes to DVD authoring (could have alot to do with my problem).  Im an animator and I am making a DVD to show my demo reel, drawings, and i have a storyboard to final comparison video.  I designed all of my menus in photoshop.  I have one transition that was animated in after effects that was imported using dynamic link.  My demo reel is a mov file at 640x360 widescreen, half the size of HD 720p.  The comparison video is a premiere file from dynamic link (same size as the demo reel). There is some background music for the menus. Then I have 3 slideshows, and i believe this is where the error is coming from.  Most of the artwork has the same dimensions but there are some that are larger or smaller.  Some are jpg, but most are PSD files.  The slide show is set to manual advance with music in the background. I have no transition effects on the slideshow.  When building the DVD, i believe when it says "starting project" after all the importing was done,i get the error
    The aspect ratio of this file is  not support by DVD. PGC info: name= Figure Drawing (name of the slideshow and a menu button) ref=Fpgc, time=234.2340s
    I just tried to build the DVD without the slideshow and I still get the error. Possibly a menu issue? I have no idea. Ive ran into errors before but I was able to get through the others.  I just cant seem to find a solution to this error. Even after searching the forums for similar problems. Hopefully, the solution is simple. If more info is needed let me know.  I really need this DVD to send out for jobs!! Thanks everyone.
    Brandon

    When doing SlideShows, whether in Encore (somewhat limited), or in PrPro, it is always better to re-size outside of these programs, prior to Import. I use Photoshop (PS) to do this, and use an Action to get everything in the proper Mode, Color Space, Size - everything. I always do a Save_As and use .PSD files. I also Save a working version, incase I have Flattened, etc., for Import into the NLE/authoring app.
    JPEG's *should* work fine too, though there is the JPEG compression to deal with. Might not be an issue, but for max quality, I start with RAW images, process to .PSD's, and then work from copies of these, to get my still Assets ready for PrPro, or En.
    I either size exactly to my Project Preset, or to exactly what I need, if say I will pan across a zoomed out image. In a major Project, I may have sub-folders with 4 different sizes of image - based precisely on what I will need to do with that/those image(s). If I will not need to do any animation on any images, then I use that Project Preset (including the correct PAR) and they work perfectly. This also eliminates any unnecessary overhead on the system.
    Good luck,
    Hunt

  • I have an image that I removed from its back ground and I would like to scale the bottom portion of the image because its to wide but not have that effect the top portion of the image which is the correct with. but also keep the aspect ratio correct? how

    I have an image that I removed from its back ground and I would like to scale the bottom portion of the image because its to wide but not have that effect the top portion of the image which is the correct width. but also keep the aspect ratio correct, keep it looking as natural as possible (its a piece of jewlery) ? how can I begin to do this.

    The area circled in red is to wide (the width) the necklace's width is as wide as the models entire chest. And also the length of the necklace it's to long it should come down to the clevage area on the model/woman.

  • HT1338 I have a problem with the aspect ratio of photos as they appear on iPhoto.  They are not correct.  On the original photo people were fat and squat.  I tried rotating and they became long and narrow.  Neither correct.

    I have a problem with the aspect ratio of photos as they appear on iPhoto.  They are not correct.  On the original photo people were fat and squat.  I tried rotating and they became long and narrow.  Neither correct.  Any suggestions?

    Sounds more like a problem with your Display Resolution than iPhoto.
    Go to: Apple / System Preferences / Displays and in the Resolutions list select,
    1280 x 800 if you have a 13" MacBook Pro
    1400 x 900 if you have a 15" MacBook Pro
    1920 x 1200 if you have a 17" Macbook Pro

  • How can I change the aspect ratio of an image display

    I am snapping a sequence of images and using imgPlot to diplay the images. However, due to my camera specifications [it's a Pulnix 9701 with Pixel Size 11.6μm (H) X 13.3μm (V)], the image I get displayed is elongated in the horizontal direction, i.e. if I snap an image of a square, I get a rectangle on my computer display.
    How can I change the aspect ratio of the display on my computer? The only parameters I have seen so far just control what portion of the image is acquired or diplayed, but none actually changes the aspect ratio.
    Thanks in advance for any help.

    If you are using an analog camera, you can set the aspect ratio in MAX. This will correct for non-square pixels.
    If you are using a digital camera, I don't think there is a way to fix it during acquisition. You could resample the image to correct the ratios, but that would be a slow, time consuming process.
    One other possibility is that your computer monitor is in a mode which is not a standard 4x3 configuration. For example 640x480 and 800x600 are 4:3 ratios. 1200x1024 is not, which tends to distort your displayed images.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • IDVD is producing DVDs which chop the edges off my video.  I have tried changing the aspect ratio between 4:3 and 16:9 but it hasn't helped.  My TV is definitely on the correct settings.  How can I solve this?

    iDVD is producing DVDs which chop the edges off my video.  I have tried changing the aspect ratio between 4:3 and 16:9 but it hasn't helped.  My TV is definitely on the correct settings.  How can I solve this?

    One way to to put the videos into an iDVD slideshow
    and set iDVD's Slideshow preferences to always scale slides to TV Safe Area. 
    However, some users have reported that the audio quality using this method is lessened.  I've not noticed it but then I don't have a good ear when it comes to that sort of thing. If you add more than one video in the same slideshow do not select any transition.
    OT

  • Everytime I open itunes the cover flow size returns to default. How Can I lock the aspect ratio?

    Whenever I shut down my computer and restart it, the aspect ratio of the images in itunes coverflow reset to their default size. How can I keep them where I set them.

    I have an issue somewhat like that, except it doesn't happen when I shut down or restart my computer. Mine resets each time I click the green resize button (using an iMac) to minimize iTunes to the mini player. Oddly enough, if I resize the cover flow, switch to a different view (ie. library without cover flow) and then hit the resize button to switch to mini player, upon maximizing iTunes again, I can switch back to the cover flow and it will have stayed the same size. Obviously I'm not going to go through that process each time I want to minimize iTunes to mini player, but when I simply minimize it when in cover flow view, as you mentioned in your post, it resets the aspect ratio each time. Clearly this isn't a massive issue as I'm still able to use all the other functions of iTunes perfectly fine, but I have to admit it is very annoying and has been persistent for the last few hours. Please if you've found a fix let me know, however I noticed you are using Windows 7 so we likely have two completely different issues.

  • OM-D: how to view entire 4:3 RAW file when aspect ratio set in-camera to 3:2?

    When shooting RAW, the OM-D records 4:3 files no matter what the aspect ratio is set to.  If you set it to 3:2 (for example), the camera records some sort of metadata to communicate this information to Lightroom, which honors the setting.  So far, so good.
    My question is, is there any way to override that setting? I have a photo shot at 3:2, but I can see from the in-camera preview that it'd be a better shot with the whole thing. But I can't figure out how to get LR 4.1rc2 to show me the whole thing!
    Thanks,
    Ben

    Unfortunately, there is no way in LR directly. You may be able to restore the settings directly in the raw file using exiftool (tags "aspectratio" and "aspectframe", there are instructions in some forums I think), but it is generally not advisable to manipulate original raws that way (at least, a backup should be made).
    See also:
    http://feedback.photoshop.com/photoshop_family/topics/lightroom_4_1_rc_trouble_with_canon_ 5d_mark_iii_aspect_ratio
    http://feedback.photoshop.com/photoshop_family/topics/importing_orf_files_does_not_import_ all_image_area

  • Export to Media Encoder Changes the Aspect Ratio

    Hi,
    How can I create an animation at a ratio of 720x576 (or any other size) without Premiere Pro changing it the moment I send it to export to make the animation?
    I have a brief for an animation at 720x576, I have created a sequence of images for the animation - at 720 x 576 - I have created a sequence in Premiere Pro CS4 at a size of 720x576 -  it looks okay except for vertical black bars at either side - but the moment I export it to the media encoder and it renders it out - the image is all crunched up as if the height is 720 and the width is 576 - wrong!
    (P.S. I used Premiere Pro CS2 at Uni and it was fine because I could tell Premiere to use or not use Square Pixels and I could tell it a custom pixel ratio and it would do as I said - CS4 seems to ignore me or just not give me any of the options I need.)
    Help?
    I have searched in Faq's and around the Forum but found nothing that seems to relate to my problem.

    As Ann states, if one gets letterboxing, or pillarboxing, there is a mis-match. It can be in the Aspect Ratio, (pixel x pixel dimensions of the Frame Size), or the PAR (Pixel Aspect Ratio). These MUST match 100%. If you have Square Pixels in your animation, then you MUST choose Square Pixels in your Sequence setting. If you do not find an exact match in the normal Presets, you will want to choose Desktop, where you CAN adjust almost all attributes for the Sequence to match your source footage.
    Good luck,
    Hunt

  • Resize a native window content mantain the aspect ratio..

    Hello,
    I'm using this code top open a native window and load an external SWF into it.
    var tableWindow:NativeWindow;
    var options:NativeWindowInitOptions = new NativeWindowInitOptions();
    options.systemChrome = NativeWindowSystemChrome.STANDARD;
    options.type = NativeWindowType.UTILITY;
    tableWindow = new NativeWindow(options);
    tableWindow.title = 'MyWin';
    tableWindow.width = 600;
    tableWindow.height = 500;
    tableWindow.stage.color = 0x000000;
    tableWindow.stage.scaleMode = StageScaleMode.NO_SCALE;
    tableWindow.stage.align = StageAlign.TOP_LEFT;
    tableWindow.addEventListener(NativeWindowBoundsEvent.RESIZING, resizeDisplay, false, 0, true);
    tableWindow.addEventListener(Event.CLOSE, closeWin);
    tableWindow.activate();
    after opening a window i load the swf into it:
    var loader:Loader = new Loader();
    var context:LoaderContext;
    context = new LoaderContext();
    context.allowCodeImport = true;
    context.applicationDomain = new ApplicationDomain();
    loader.load(new URLRequest("app:/myswf.swf"), context);
    loader.contentLoaderInfo.addEventListener(Event.INIT, loadFlash);
    I have several problems.. if i use a ScaleMode different than NO_SCALE in main swf and/or in the loaded SWF the file is shown wrong. I have a correct window but the swf is displayed HUGE into the window.. so i've decided to use NO_SCALE as ScaleMode
    Is there a way to mantain the aspect ratio of the window AND (more important) resize ALSO the swf loaded into it?
    Thank you

    I rarely do Flex but I've done a lot of AIR for AS projects and I find their windows to have this bizarre behavior as well.
    I think 2 things are important in my limited experience. To keep aspect ratio I set it to NO_BORDER. This maintains the aspect ratio but also allows resizing.
    Second on my main class I explicitly set the main SWF to a height and width:
    e.g.
    package yada {
         [SWF(width=xxx,height=xxx)]
         public class MyApp extends.....
    If I didn't set that in the AS3 code explicitly (the XML didn't matter at all) the SWF would be the original size. Now your content should be at the size you specify in your window and allow resize.
    Lastly, you're already paying attention to resizing:
    tableWindow.addEventListener(NativeWindowBoundsEvent.RESIZING, resizeDisplay, false, 0, true);
    I think you need to handle that manually. As the user intends to grow or shrink the window you need to override their resize and set the height and width explicitly based on what they try to do, forcing the outer windows size to always be a proper aspect ratio.

  • Please watch and see if you can tell me how to correct the aspect ratio

    http://www.youtube.com/watch?v=shiFprOnbK4
    This is an unfinished std. def video hence this issue I ran into which is just a fun video for my youth group kids I teach at my church. I am editing it in final cut pro 7 and if you see at about 35 seconds the aspect ratio changes whatever its doing with the picture there.
    I have never ran into this problem before so I don't know if its something I may have selected on the camera accidentally or done wrong in FCP but I shot all the video the same day of course for this event of ours and all the other video is fine an in 16:9 or what was called the "letterbox" option on my Panasonic DVX100B.
    Please help me correct it if you know how. Thank you very much in advance.

    I can't watch the video as well. Not quite sure what trouble your having
    Aspect ratios can be tricky and there are a few spots you can mess them up. First I would check to make sure that your sequence settings are the same aspect ratio as your original footage. I would also make sure your exporting with the correct aspect ratio as well. (If you’re using the quicktime conversion option. Sometimes depending on your settings options like 16:9 are not turned on by default and you need to check them before exporting.)
    Also if you can change the aspect ratio in FCP regardless of your sequence's aspect ratio is. Under your distort tab there is a aspect ratio option. +33 will make your footage 4:3 and -33 will make your footage anamorphic. However this will only stretch your footage. This method is only useful for when you can to place 4:3 footage into a 16:9 sequence without it appearing distorted and stretched

  • Why ScheduledThreadPoolExecutor is not respecting the delay?

    I have a Customized implementation for ScheduledThreadPoolExecutor using which I am trying to execute a task for continuous execution. The problem I have faced here with the implementation is, some tasks executed continuously where as two of them are not respecting the delay and executed continuously. I am using the scheduleWithFixedDelay method.
    Even I have tried reproducing, but I couldn't.
    Here is my customized implementation.
    package com.portware.utils.snapmarketdata.test;
    import java.util.Collections;
    import java.util.HashSet;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Set;
    import java.util.concurrent.Executors;
    import java.util.concurrent.Future;
    import java.util.concurrent.RejectedExecutionHandler;
    import java.util.concurrent.ScheduledFuture;
    import java.util.concurrent.ScheduledThreadPoolExecutor;
    import java.util.concurrent.ThreadFactory;
    import java.util.concurrent.ThreadPoolExecutor;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.atomic.AtomicInteger;
    import com.indigo.utils.Log;
    * To schedule the tasks in timely manner.
    public class TestScheduledExecutorService  {
      private static String CLASS_NAME = TestScheduledExecutorService.class.getName();
      protected final ThreadPoolExecutor executor;
      static int totalCount = 0;
      public static void main(String[] args) throws InterruptedException {
        TestScheduledExecutorService executorService = new TestScheduledExecutorService("Test", 10, null);
        final AtomicInteger integer = new AtomicInteger();
        final Set<Integer> testSet = new HashSet<Integer>();
        for (int i = 0; i < 10; i++) {
          testSet.add(i);
        Iterator<Integer> iterator = testSet.iterator();
        synchronized (testSet) {
        while(iterator.hasNext()) {
          integer.set(iterator.next());
          executorService.submitTaskForContinuousExecution(new Runnable() {
          @Override
          public void run() {
              System.out.println(Thread.currentThread().getName()+" Hello : "+integer.get() + " count value is:"+totalCount++);
        }, integer.toString());
        while (true) {
          synchronized (TestScheduledExecutorService.class) {
            TestScheduledExecutorService.class.wait();
      private static class MyRunnableTask implements Runnable{
        ScheduledFuture<?> future;
         * The task to be run.
        private Runnable runnable;
         * The number of attempt.
        private int count;
         * Maximum attempts configured under TCA configuration.
        private int maximumAttempts;
        private String id;
        public MyRunnableTask(Runnable runnable, int maximumAttempts, String id) {
          this.runnable = runnable;
          this.maximumAttempts = maximumAttempts;
          this.id = id;
        @Override
        public void run() {
          if (count >= maximumAttempts) {
            this.future.cancel(true);
            System.out.println("Cancelling the task with id :"+id+" after count :"+count);
            return;
          count++;
          this.runnable.run();
         * Return the number of attempt.
         * @return
        public int getCount() {
          return count;
      private void submitTaskForContinuousExecution(Runnable runnable, String id){
        int numOfAttempts = 10;
        MyRunnableTask runnableTask = new MyRunnableTask(runnable, numOfAttempts, id);
        int interval = 1;
        ScheduledFuture<?> scheduleWithFixedDelay = this.scheduleWithFixedDelay(runnableTask, 0, TimeUnit.SECONDS.toMillis(interval), TimeUnit.MILLISECONDS);
        if(id != null) {
          /*System.out.println("Submitted the task for continuous execution for the ticket id :"+id+"  with maximum attempts : "+numOfAttempts
              + " and interval : "+ interval);*/
          runnableTask.future = scheduleWithFixedDelay;
       * Creates an Executor Service to provide customized execution for tasks to be scheduled.
       * @param threadName is the name that shows in logs.
       * @param maximumThreads is the number of threads can be created.
       * @param rejectedExecutionHandler is if the Queue reaches it's maximum capacity and all the executor gives
       * the tasks to rejectedExecutionHandler.
      public TestScheduledExecutorService(String threadName, int maximumThreads, RejectedExecutionHandler rejectedExecutionHandler) {
        this.executor = createExecutor(threadName, maximumThreads, rejectedExecutionHandler);
      protected ThreadPoolExecutor createExecutor(String threadName, int minimumThreads, RejectedExecutionHandler rejectedExecutionHandler) {
        ThreadPoolExecutor threadPoolExecutor = new ScheduledThreadPoolExecutor(minimumThreads)
          @Override
          protected void beforeExecute(Thread t, Runnable r) {
            TestScheduledExecutorService.this.beforeExecute(t, r);
            this.purge();
          @Override
          protected void afterExecute(Runnable r, Throwable t) {
            TestScheduledExecutorService.this.afterExecute(r, t);
        if(rejectedExecutionHandler != null) {
          threadPoolExecutor.setRejectedExecutionHandler(rejectedExecutionHandler);
        }else{
          threadPoolExecutor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
        threadPoolExecutor.setThreadFactory(new TestThreadFactory(threadName, threadPoolExecutor));
        threadPoolExecutor.setKeepAliveTime(120, TimeUnit.SECONDS);
        threadPoolExecutor.allowCoreThreadTimeOut(true);
        return threadPoolExecutor;
       * Executes the task repeatedly with the given delay
       * @param task
       * @param initialDelay
       * @param delay
       * @param unit
       * @return
      public ScheduledFuture<?> scheduleWithFixedDelay(Runnable task, int initialDelay, long delay, TimeUnit unit) {
        return ((ScheduledThreadPoolExecutor)executor).scheduleWithFixedDelay(task, initialDelay, delay, unit);
       * To provide threads with specific features.
      protected static class TestThreadFactory implements ThreadFactory {
        private ThreadFactory threadFactory = Executors.defaultThreadFactory();
        private ThreadPoolExecutor threadPoolExecutor;
        private String groupName;
        public TestThreadFactory(String groupName, ThreadPoolExecutor threadPoolExecutor) {
          this.groupName = groupName;
          this.threadPoolExecutor = threadPoolExecutor;
        @Override
        public Thread newThread(Runnable r) {
          Thread thread = threadFactory.newThread(r);
          int activeCount = this.threadPoolExecutor.getPoolSize();
          activeCount++;
          thread.setName(this.groupName+"-"+activeCount);
          thread.setDaemon(true);
          return thread;
       * Performs initialization tasks before starting this thread.
       * @param thread
       * @param runnable
      protected void beforeExecute(Thread thread, Runnable runnable){
       * Performs tasks after execution of this runnable.
       * @param thread
       * @param runnable
      protected void afterExecute(Runnable runnable, Throwable t){
       * Initiates an orderly shutdown in which previously submitted
       * tasks are executed, but no new tasks will be
       * accepted. Invocation has no additional effect if already shut
       * down.
      public void shutdown() {
        if(this.executor != null) {
          Log.notice(CLASS_NAME, "shutdown", "Shutting down Executor Service");
          this.executor.shutdown();
       * Attempts to stop all actively executing tasks, halts the
       * processing of waiting tasks, and returns a list of the tasks
       * that were awaiting execution. These tasks are drained (removed)
       * from the task queue upon return from this method.
       * <p>There are no guarantees beyond best-effort attempts to stop
       * processing actively executing tasks.  This implementation
       * cancels tasks via {@link Thread#interrupt}, so any task that
       * fails to respond to interrupts may never terminate.
      public List<Runnable> shutdownNow() {
       if(this.executor != null) {
         Log.notice(CLASS_NAME, "shutdownNow", "Immediately shutting down Executor Service");
         try {
          return this.executor.shutdownNow();
        } catch (Exception e) {
          Log.notice(CLASS_NAME, "shutdownNow", e.getMessage());
       return Collections.emptyList();
       * Returns a Future for the given runnable task.
      public Future<?> submit(Runnable runnable) {
        if(this.executor != null) {
          return this.executor.submit(runnable);
        return null;
    Is there any possibility for the continuous execution or not?

    I have a Customized implementation for ScheduledThreadPoolExecutor using which I am trying to execute a task for continuous execution. The problem I have faced here with the implementation is, some tasks executed continuously where as two of them are not respecting the delay and executed continuously. I am using the scheduleWithFixedDelay method.
    Even I have tried reproducing, but I couldn't.
    Here is my customized implementation.
    package com.portware.utils.snapmarketdata.test;
    import java.util.Collections;
    import java.util.HashSet;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Set;
    import java.util.concurrent.Executors;
    import java.util.concurrent.Future;
    import java.util.concurrent.RejectedExecutionHandler;
    import java.util.concurrent.ScheduledFuture;
    import java.util.concurrent.ScheduledThreadPoolExecutor;
    import java.util.concurrent.ThreadFactory;
    import java.util.concurrent.ThreadPoolExecutor;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.atomic.AtomicInteger;
    import com.indigo.utils.Log;
    * To schedule the tasks in timely manner.
    public class TestScheduledExecutorService  {
      private static String CLASS_NAME = TestScheduledExecutorService.class.getName();
      protected final ThreadPoolExecutor executor;
      static int totalCount = 0;
      public static void main(String[] args) throws InterruptedException {
        TestScheduledExecutorService executorService = new TestScheduledExecutorService("Test", 10, null);
        final AtomicInteger integer = new AtomicInteger();
        final Set<Integer> testSet = new HashSet<Integer>();
        for (int i = 0; i < 10; i++) {
          testSet.add(i);
        Iterator<Integer> iterator = testSet.iterator();
        synchronized (testSet) {
        while(iterator.hasNext()) {
          integer.set(iterator.next());
          executorService.submitTaskForContinuousExecution(new Runnable() {
          @Override
          public void run() {
              System.out.println(Thread.currentThread().getName()+" Hello : "+integer.get() + " count value is:"+totalCount++);
        }, integer.toString());
        while (true) {
          synchronized (TestScheduledExecutorService.class) {
            TestScheduledExecutorService.class.wait();
      private static class MyRunnableTask implements Runnable{
        ScheduledFuture<?> future;
         * The task to be run.
        private Runnable runnable;
         * The number of attempt.
        private int count;
         * Maximum attempts configured under TCA configuration.
        private int maximumAttempts;
        private String id;
        public MyRunnableTask(Runnable runnable, int maximumAttempts, String id) {
          this.runnable = runnable;
          this.maximumAttempts = maximumAttempts;
          this.id = id;
        @Override
        public void run() {
          if (count >= maximumAttempts) {
            this.future.cancel(true);
            System.out.println("Cancelling the task with id :"+id+" after count :"+count);
            return;
          count++;
          this.runnable.run();
         * Return the number of attempt.
         * @return
        public int getCount() {
          return count;
      private void submitTaskForContinuousExecution(Runnable runnable, String id){
        int numOfAttempts = 10;
        MyRunnableTask runnableTask = new MyRunnableTask(runnable, numOfAttempts, id);
        int interval = 1;
        ScheduledFuture<?> scheduleWithFixedDelay = this.scheduleWithFixedDelay(runnableTask, 0, TimeUnit.SECONDS.toMillis(interval), TimeUnit.MILLISECONDS);
        if(id != null) {
          /*System.out.println("Submitted the task for continuous execution for the ticket id :"+id+"  with maximum attempts : "+numOfAttempts
              + " and interval : "+ interval);*/
          runnableTask.future = scheduleWithFixedDelay;
       * Creates an Executor Service to provide customized execution for tasks to be scheduled.
       * @param threadName is the name that shows in logs.
       * @param maximumThreads is the number of threads can be created.
       * @param rejectedExecutionHandler is if the Queue reaches it's maximum capacity and all the executor gives
       * the tasks to rejectedExecutionHandler.
      public TestScheduledExecutorService(String threadName, int maximumThreads, RejectedExecutionHandler rejectedExecutionHandler) {
        this.executor = createExecutor(threadName, maximumThreads, rejectedExecutionHandler);
      protected ThreadPoolExecutor createExecutor(String threadName, int minimumThreads, RejectedExecutionHandler rejectedExecutionHandler) {
        ThreadPoolExecutor threadPoolExecutor = new ScheduledThreadPoolExecutor(minimumThreads)
          @Override
          protected void beforeExecute(Thread t, Runnable r) {
            TestScheduledExecutorService.this.beforeExecute(t, r);
            this.purge();
          @Override
          protected void afterExecute(Runnable r, Throwable t) {
            TestScheduledExecutorService.this.afterExecute(r, t);
        if(rejectedExecutionHandler != null) {
          threadPoolExecutor.setRejectedExecutionHandler(rejectedExecutionHandler);
        }else{
          threadPoolExecutor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
        threadPoolExecutor.setThreadFactory(new TestThreadFactory(threadName, threadPoolExecutor));
        threadPoolExecutor.setKeepAliveTime(120, TimeUnit.SECONDS);
        threadPoolExecutor.allowCoreThreadTimeOut(true);
        return threadPoolExecutor;
       * Executes the task repeatedly with the given delay
       * @param task
       * @param initialDelay
       * @param delay
       * @param unit
       * @return
      public ScheduledFuture<?> scheduleWithFixedDelay(Runnable task, int initialDelay, long delay, TimeUnit unit) {
        return ((ScheduledThreadPoolExecutor)executor).scheduleWithFixedDelay(task, initialDelay, delay, unit);
       * To provide threads with specific features.
      protected static class TestThreadFactory implements ThreadFactory {
        private ThreadFactory threadFactory = Executors.defaultThreadFactory();
        private ThreadPoolExecutor threadPoolExecutor;
        private String groupName;
        public TestThreadFactory(String groupName, ThreadPoolExecutor threadPoolExecutor) {
          this.groupName = groupName;
          this.threadPoolExecutor = threadPoolExecutor;
        @Override
        public Thread newThread(Runnable r) {
          Thread thread = threadFactory.newThread(r);
          int activeCount = this.threadPoolExecutor.getPoolSize();
          activeCount++;
          thread.setName(this.groupName+"-"+activeCount);
          thread.setDaemon(true);
          return thread;
       * Performs initialization tasks before starting this thread.
       * @param thread
       * @param runnable
      protected void beforeExecute(Thread thread, Runnable runnable){
       * Performs tasks after execution of this runnable.
       * @param thread
       * @param runnable
      protected void afterExecute(Runnable runnable, Throwable t){
       * Initiates an orderly shutdown in which previously submitted
       * tasks are executed, but no new tasks will be
       * accepted. Invocation has no additional effect if already shut
       * down.
      public void shutdown() {
        if(this.executor != null) {
          Log.notice(CLASS_NAME, "shutdown", "Shutting down Executor Service");
          this.executor.shutdown();
       * Attempts to stop all actively executing tasks, halts the
       * processing of waiting tasks, and returns a list of the tasks
       * that were awaiting execution. These tasks are drained (removed)
       * from the task queue upon return from this method.
       * <p>There are no guarantees beyond best-effort attempts to stop
       * processing actively executing tasks.  This implementation
       * cancels tasks via {@link Thread#interrupt}, so any task that
       * fails to respond to interrupts may never terminate.
      public List<Runnable> shutdownNow() {
       if(this.executor != null) {
         Log.notice(CLASS_NAME, "shutdownNow", "Immediately shutting down Executor Service");
         try {
          return this.executor.shutdownNow();
        } catch (Exception e) {
          Log.notice(CLASS_NAME, "shutdownNow", e.getMessage());
       return Collections.emptyList();
       * Returns a Future for the given runnable task.
      public Future<?> submit(Runnable runnable) {
        if(this.executor != null) {
          return this.executor.submit(runnable);
        return null;
    Is there any possibility for the continuous execution or not?

Maybe you are looking for