Menu

#59 Very rarely an image being optimized through command line doesn't close the FileOptimizer window

15.x
closed
Nikkho
None
2022-07-17
2018-11-08
Devedse
No

The tool I wrote fires off FileOptimizer multiple times to optimize different images on my system. However for some reason when I walked to my pc this morning (after kicking it off yesterday evening) and I saw that one window of FileOptimizer was still open. (See attached image)

It also states in the title bar that 0/1 images are optimized even though the image is optimized.

1 Attachments

Discussion

  • Nikkho

    Nikkho - 2018-11-16

    Can you share your tool so I can reproduce the issue?

     
  • Devedse

    Devedse - 2018-11-16

    Hey, yes sure, you can download it here from the releases page:
    https://github.com/devedse/DeveImageOptimizerWPF

     
  • Devedse

    Devedse - 2018-11-16

    Make sure that in the configuration you activate parallelization, and yeah quick note, it took literally a full night of optimizing with 8 threads, going through 1000's of images to encounter this.

     

    Last edit: Devedse 2018-11-16
  • Nikkho

    Nikkho - 2019-02-02

    Shall we close the ticket?

     
  • Devedse

    Devedse - 2019-05-01

    Hi Nikkho, I still have it happening quite often when running my tool which kicks of your tool on my images. Sometimes it simply doesn't close and stays at 0 / 1 files. E.g.
    Image

    Somehow it just seems that when the state of an Image is set to "Done" the complete counter is not updated always.

     

    Last edit: Devedse 2019-05-01
  • Devedse

    Devedse - 2019-05-01

    From doing a bit of investigation it seems to go to this line of code:
    Image2

    I'm not sure if it should go in there as there's only 1 item in the grid.

     

    Last edit: Devedse 2019-05-01
  • Devedse

    Devedse - 2019-05-02

    Doing some more investigation it seems that this happens if you kick off FileOptimizerFull multiple times at once in parallel. Could it be due to writing back to the config file? (E.g. the total number of files optimized)

     
  • Devedse

    Devedse - 2020-07-30

    Hi @nikkho, I know it's been a while, but this issue is still happening. Especially if you run the tool in parallel it quickly happens quite often:

     
  • Devedse

    Devedse - 2020-07-30

    To easily run your tool in parallel you can install my DeveImageOptimizer using chocolatey:
    https://chocolatey.org/packages/DeveImageOptimizerWPF

    It then kicks off FileOptimizerFull with an x number of instances in parallel.

     
  • Devedse

    Devedse - 2022-03-04

    @Nikkho, not sure if this is still on your list but I've since worked around the issue in my own application by calling the optimizers directly.

     
  • Nikkho

    Nikkho - 2022-03-04

    Sorry. I forgot about that issue. It was on my list, but did not take a look to it.
    I tried to reproduce the problem systematically and this is not happening. It only happens sometimes and when you run serveral instances at once. It has nothing to do with that line, since this is only composing a text, not dividing.

    The issue, I guess, is that FO is showing a MessageBox, and thus it will not be closed until de Messagebox is closed.

    Can you try spawining the instances something like:
    FileOptimizer64.exe /AllowMultipleInstances=true /BeepWhenDone=false image.png

     
  • Nikkho

    Nikkho - 2022-03-04

    To prevent that issue I have implemented that FO automatically disables BeepWhenDone when lauched via commandline: https://sourceforge.net/p/nikkhokkho/code/1687/

     
  • Nikkho

    Nikkho - 2022-03-04
    • status: open --> accepted
    • assigned_to: Nikkho
    • Milestone: 12.x --> 15.x
     
  • Nikkho

    Nikkho - 2022-07-17
    • status: accepted --> closed
     
  • Devedse

    Devedse - 2022-07-17

    Hey I saw you closed this ticket. Is it resolved now?

     

Log in to post a comment.

MongoDB Logo MongoDB