Release of G'MIC 2.9

David, using GIMP 2.10.18 I have problems with my pink wrapper! Same build of the plugin runs on 2.10.14 (build from Gimp.org) smooth. Still with 2.10.18 (MacPorts build, build from gimp.org still not ready) “Pink Operator” hangs and stops with time out. “Pink Operator binary” works fluently!

Is there a change in the GIMP plugin interface from …14 to …18? Are perhaps images stored or used with 16bit per pixel? Trying “Pink Operator” -> “Wshedtopo” and with several other entries I get a corrupted preview or time out!

How many seconds do you allow before timeout, when calling split_preview?

120 !

With the 2.10.14 version results are coming in a second, in 2.10.18 only the binary processing pink routines are working. Thats the reason to think about pixel representation!

Something is completely wrong!

Or something with multi-threading? There is an apply_channel call inside!

Doing Apply, I get an error message

Perhaps it has some meaning for you?

It seems to work for me…
There have been a slight change in the way the command parallel works, in case an error occurs in one of the threads. Now, an abort signal is sent to all running threads to make them stop asap.
Command apply_timeout uses precisely this mechanism.

By the way, sometimes the timeout is coming immediately!

I’ve pushed a filter update, could you try please ?

Typo in convolve and correlate text: should 'sum_input_channels=0' be channel_mode=1?

1 Like

Indeed!

Hmm, a new build and update don’t show any difference with Gimp 2.10.18

Still now Gimp 2.10.14 is equal to 2.10.18. So to say an adjustment to the worse!

I have found some problems: Gimp …18 seems to be more (or less) aware on pixel representation! I think if the plugin returns an image with different pixel size to gimp it will make sometimes trouble.

In my case, sometimes output file.pnk resulted in a format with float numbers or long integer which were either not well accepted by pink binaries or by gimp. A late regression of output of pnk file format with type option. I will further look into that and will try to correct that. At least these things are quite new since the base functions were tested and did not show such behavior !

I can confirm the timeout in GIMP 2.10.14 using the latest plugin. When I select pink operator from the menu, I see two flashes of consoles opening and closing followed by the timeout notice in preview window.

I can confirm this within Krita myself.

@afre and @Reptorian, do you have the PINK binaries installed so that the filter has a chance to succeed ? Otherwise, I’m not surprised you get a preview timeout!

Flashing happens often under Windows calling “execute” command! The cmd.exe does that!

Still don’t hesitate to install Pink binaries, math morphology could enrich your things considerably!

@KaRo, anyway, we still have to figure out what is going on with the timeout issue.
Could you make some test with command apply_timeout, from the command line and from the plug-in to see if this is working as expected?

The todays latest build of the plugin, update, corrected Pink Operator, shows again differences in Gimp 2.10.18 and 2.10.14.

Under …14 “Pink Test operator Bianca” works, not under …18 (immediate time out)! Up to now, I have not found the breaking point in fx_karo_pink_bianca!

David, seemingly the timeout message appears also in cases where an x call breaks without the necessary time used!

Still I have not fully understood the problem with temporarily used long integer or float images inside the plugin! Just with “Bianca” there is a last x call to label (from pink) resulting in a P8 pnk file (integer 32bit). Could it be that something is with the dynamic use of memory space?

In “Pink Operator” I have rounded the images for input to pink routines to prepare byte files. Most of the binaries used accept only 8bit pixels. Again still it surprises me that it works with one build and not in another!

First trial with apply_timeout with cli

gmic apply_timeout “repeat 50 sp rm. done”,1
[gmic]-0./ Start G’MIC interpreter.
[gmic]-0./ Apply command ‘repeat 50 sp rm. done’ on image [], with a timeout of 1 seconds.
[gmic] *** Error in ./apply_timeout/*if/*local/ *** G’MIC encountered a fatal error (images (0) and images names (1) have different size). Please submit a bug report, at: https://github.com/dtschump/gmic/issues

  1. trial with the same image

gmic apply_timeout “repeat 1000 sp 0 rm. done”,1
[gmic]-0./ Start G’MIC interpreter.
[gmic]-0./ Apply command ‘repeat 1000 sp 0 rm. done’ on image [], with a timeout of 1 seconds.
[gmic] *** Error in ./apply_timeout/*if/*local/ *** G’MIC encountered a fatal error (images (0) and images names (1) have different size). Please submit a bug report, at: https://github.com/dtschump/gmic/issues

  1. trial with cli

gmic apply_timeout “repeat 10000 osteo done”,1 rm
[gmic]-0./ Start G’MIC interpreter.
[gmic]-0./ Apply command ‘repeat 10000 osteo done’ on image [], with a timeout of 1 seconds.
[gmic] *** Error in ./apply_timeout/*if/*local/ *** G’MIC encountered a fatal error (images (0) and images names (1) have different size). Please submit a bug report, at: https://github.com/dtschump/gmic/issues

/Users/karo $ gmic osteo apply_timeout “repeat 10000 osteo done”,1 rm
[gmic]-0./ Start G’MIC interpreter.
[gmic]-0./ Load osteoblast nucleus example image
[gmic]-1./ Apply command ‘repeat 10000 osteo done’ on image [0], with a timeout of 1 seconds.
[gmic] *** Error in ./ *** Command ‘apply_timeout’: Time out (1 seconds) for command ‘repeat 10000 osteo done’.

No image selected seems to offend!

Trial with Gimp

…14 works without stopping


…18 is interesting, with timeout 2 sec it does not stop either, still the result:

**** Error from me, forgot the rm. Both are similar but no timeout!

The examples with the ‘fatal error’ are interesting.
I cannot reproduce this on my machine (i.e. it works here).
Could you try compiling gmic with make debug, with the address sanitizer enabled ?

I’ll see sanitizer?

Still one trial with Gimp: Have set fx_karo_pink : karos_about

Result from Gimp

[gmic]-1./ Start G’MIC interpreter.
[gmic]-1./fx_karo_pink_bianca_preview/gui_split_preview/ Import custom commands from expression ‘_split_preview : -fx_karo_pink_bianca 5,60,5,1,0,1,0,50,50 k[0]’ (1 new, total: 4221).
[gmic]-1./fx_karo_pink_bianca_preview/gui_split_preview/ Set local variable ‘is_movable=1’.
[gmic]-1./fx_karo_pink_bianca_preview/gui_split_preview/ Set multiple variables ‘posx=50’, ‘posy=50’.
[gmic]-1./fx_karo_pink_bianca_preview/gui_split_preview/ Set multiple variables ‘pw=360’, ‘ph=503’.
[gmic]-1./fx_karo_pink_bianca_preview/gui_split_preview/*repeat/*local/ Set local variable ‘is_timeout=0’.
[gmic]-1./fx_karo_pink_bianca_preview/gui_split_preview/*repeat/*local/*local/ Apply command ‘_split_preview’ on image [0], with a timeout of 02 seconds.
[gmic]-1./fx_karo_pink_bianca_preview/gui_split_preview/*repeat/*local/*local/ Set local variable ‘is_timeout=1’.
[gmic]-2./fx_karo_pink_bianca_preview/gui_split_preview/*repeat/*local/*if/ Keep image [1] (1 image left).
[gmic]-1./fx_karo_pink_bianca_preview/gui_split_preview/ Discard definition of custom command ‘_split_preview’ (1 found, 4220 commands left).
[gmic]-1./ End G’MIC interpreter.

Need some help. What should I do?

Actually

(lldb) run – apply_timeout “repeat 50 sp rm. done”,1
Process 20952 launched: ‘/Users/karo/sw/gmic/src/gmic’ (x86_64)
[gmic]-0./ Start G’MIC interpreter.
[gmic]-0./ Subtract image [].
[gmic]-0./ Apply command ‘repeat 50 sp rm. done’ on image [], with a timeout of 1 seconds.
[gmic] *** Error in ./apply_timeout/*if/*local/ *** G’MIC encountered a fatal error (images (0) and images names (1) have different size). Please submit a bug report, at: https://github.com/dtschump/gmic/issues
Process 20952 exited with status = 255 (0x000000ff)

Maybe this helps?

(lldb) run v 2 apply_timeout “repeat 50 sp rm. done”,1
Process 24383 launched: ‘/Users/karo/sw/gmic/src/gmic’ (x86_64)
[gmic]-0./ Start G’MIC interpreter.
[gmic]-0./ Set verbosity level to 2.
[gmic]-0./ Apply command ‘repeat 50 sp rm. done’ on image [], with a timeout of 1 seconds.
[gmic]-0./apply_timeout/*if/*local/ Input image at position 0, with values (46,47,97,112,112,108,121,95,116,105,1(…)2,105,102,47,42,108,111,99,97,108,47) (1 image 27x1x1x1).
[gmic]-1./apply_timeout/*if/*local/ Set local variable ‘id=2468’.
[gmic]-1./apply_timeout/*if/*local/ Remove image [0] (0 images left).
[gmic]-0./apply_timeout/*if/*local/ Store image [] as variable ‘initial’
[gmic]-0./apply_timeout/*if/*local/ Set global variable ‘__done2468=0’.
[gmic]-0./apply_timeout/*if/*local/ Set global variable ‘__is_timeout2468=0’.
[gmic]-0./apply_timeout/*if/*local/ Execute 2 commands ‘repeat 50 sp rm. done __done2468=1,do (…)$__done2468 break fi wait 100 while 1’ in parallel and wait thread termination immediately.
[gmic]-0./apply_timeout/*if/*local/*thread1/*do/ Wait for 100 milliseconds according to display window [].
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Input sample image ‘fruits’ (1 image 600x400x1x3).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Remove image [0] (0 images left).
[gmic]-0./apply_timeout/*if/*local/*thread1/*do/ Wait for 100 milliseconds according to display window [].
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Input sample image ‘dog’ (1 image 1024x685x1x3).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Remove image [0] (0 images left).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Input sample image ‘barbara’ (1 image 512x512x1x1).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Remove image [0] (0 images left).
[gmic]-0./apply_timeout/*if/*local/*thread1/*do/ Wait for 100 milliseconds according to display window [].
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Input sample image ‘chick’ (1 image 1024x682x1x3).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Remove image [0] (0 images left).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Input sample image ‘portrait9’ (1 image 800x800x1x3).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Remove image [0] (0 images left).
[gmic]-0./apply_timeout/*if/*local/*thread1/*do/ Wait for 100 milliseconds according to display window [].
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Input sample image ‘portrait1’ (1 image 800x800x1x3).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Remove image [0] (0 images left).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Input sample image ‘inside’ (1 image 750x500x1x3).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Remove image [0] (0 images left).
[gmic]-0./apply_timeout/*if/*local/*thread1/*do/ Wait for 100 milliseconds according to display window [].
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Input sample image ‘mandrill’ (1 image 512x512x1x3).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Remove image [0] (0 images left).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Input sample image ‘elephant’ (1 image 640x480x1x3).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Remove image [0] (0 images left).
[gmic]-0./apply_timeout/*if/*local/*thread1/*do/ Wait for 100 milliseconds according to display window [].
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Input sample image ‘gmicky’ (1 image 600x601x1x3).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Remove image [0] (0 images left).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Input sample image ‘barbara’ (1 image 512x512x1x1).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Remove image [0] (0 images left).
[gmic]-0./apply_timeout/*if/*local/*thread1/*do/ Wait for 100 milliseconds according to display window [].
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Input sample image ‘portrait1’ (1 image 800x800x1x3).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Remove image [0] (0 images left).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Input sample image ‘greece’ (1 image 750x500x1x3).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Remove image [0] (0 images left).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Input sample image ‘cameraman’ (1 image 256x256x1x1).
[gmic]-1./apply_timeout/*if/*local/*thread0/*repeat/ Remove image [0] (0 images left).
[gmic]-0./apply_timeout/*if/*local/*thread1/*do/*if/ Set global variable ‘__is_timeout2468=1’.
[gmic]-0./apply_timeout/*if/*local/*thread1/*do/*if/ *** Error ***
[gmic]-0./apply_timeout/*if/*local/ *** Error in ./apply_timeout/*if/*local/*thread1/*do/*if/ ***
[gmic]-0./apply_timeout/*if/*local/ Remove image [] (0 images left).
[gmic]-0./apply_timeout/*if/*local/ Input image from variable ‘initial’, at position 0. (1 image 1x4x1x1).
[gmic]./apply_timeout/*if/*local/ *** Error *** G’MIC encountered a fatal error (images (0) and images names (1) have different size). Please submit a bug report, at: https://github.com/dtschump/gmic/issues

Process 24383 exited with status = 255 (0x000000ff)