Re: [darktable-dev] Win version: Error when opening a RAW file from Lightable

2018-01-02 Thread David Houlder

I've been looking at this today and I've got a theory.

Could the LRU eviction case in dt_dev_pixelpipe_cache_get() (
https://github.com/darktable-org/darktable/blob/release-2.4.0/src/develop/pixelpipe_cache.c#L172
) be causing a use-after-free on &input in dt_dev_pixelpipe_process_rec() ?

That "input" pointer is set by a recursive call ...
    if(dt_dev_pixelpipe_process_rec(pipe, dev, &input, &cl_mem_input, 
&input_format, &roi_in,

g_list_previous(modules), g_list_previous(pieces), pos - 1))
  return 1;
https://github.com/darktable-org/darktable/blob/release-2.4.0/src/develop/pixelpipe_hb.c#L718
... and in some cases it gets it from dt_dev_pixelpipe_cache_get() in 
that recursive call

https://github.com/darktable-org/darktable/blob/release-2.4.0/src/develop/pixelpipe_hb.c#L659
... which is followed by potentially more recursion and thus presumably 
several more calls to dt_dev_pixelpipe_cache_get() as it goes deeper, 
any of which has the potential to free() (or cause an overwrite of) 
anything it previously returned.


After the recursion,  dt_dev_pixelpipe_cache_get() is called again...
    if(!strcmp(module->op, "gamma"))
(void)dt_dev_pixelpipe_cache_get_important(&(pipe->cache), hash, 
bufsize, output, out_format);

    else
  (void)dt_dev_pixelpipe_cache_get(&(pipe->cache), hash, bufsize, 
output, out_format);

https://github.com/darktable-org/darktable/blob/release-2.4.0/src/develop/pixelpipe_hb.c#L740

Then we have...
    module->process(module, piece, input, *output, &roi_in, roi_out);
https://github.com/darktable-org/darktable/blob/release-2.4.0/src/develop/pixelpipe_hb.c#L1628
... (and several other potential calls in the opencl case) by which time 
&input may have been freed.


I see there are mutexes around all the cache accesses too, which implies 
that some other thread might be accessing the cache, in which case maybe 
that thread is causing an LRU eviction.


Any thoughts?

cheers
David

On 30/12/17 03:26, Tobias Ellinghaus wrote:

Am Freitag, 29. Dezember 2017, 05:47:43 CET schrieb Alex Delaforce:

Hi all,
this is my first bug report through the dev list  - please let me know if I
am not following the correct protocol

Version
DT 2.4.0 - Windows version

Action
Open DT, then double click on CR2 file shown top left on the lighttable
display
OR
Open DT, then click on CR2 file shown top left on the lighttable display
then select darkroom from top right link

Doesnt happen every time - seems to be related to

- after DT has recently been opened, once I get a photo in the darkroom
mode successfully the fault doesn't seem to recur during the session.

- may be a particular couple of photos - CR2s, doesn't seem to occur with
JPEG

The error dialogue box is
Error!
An unhandled exception occured.
Backtrace will be written to  etc.

A  couple of the backtrace files are attached.

Thanks. We have reports about that crash since a while but so far we have no
idea what might be causing it, and Windows doesn't give us very useful
backtraces either.

Should you be able to find a reliable set of steps to reproduce it we would be
more than happy to hear them.


Thanks Devs for your excellent work.
Alex

Tobias


___
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org



[darktable-dev] New module: mosaic

2018-01-02 Thread Jefferson Ferreira
Hello,

I finish my first module called "mosaic". This module creates a mosaic over
the image to hide some confidential information (use masks to restrict the
area).

- link to download the module
https://www.dropbox.com/s/i9sn3lrek67m56p/mosaic.c?dl=0

-
​ copy this file to /src/iop


- in /src/iop/CMakeLists.txt, add the red line below:

add_iop(finalscale "finalscale.c")
add_iop(globaltonemap "globaltonemap.c")
add_iop(bilat "bilat.c")

add_iop(denoiseprofile "denoiseprofile.c")
add_iop(defringe "defringe.c")
add_iop(ashift "ashift.c")
add_iop(hazeremoval "hazeremoval.c")
add_iop(mosaic "mosaic.c")
​

- recompile and installing the darktable

​Best regards.​

-- 
Jefferson Ferreira

___
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org



[darktable-dev] Disable tone-curve generation in darktable-chart

2018-01-02 Thread Aurélien PIERRE
Happy New Year and thanks to the devs for the 2.4 candy T

I began using darktable-chart with a Spyder ColorChecker. By the way,
the option "always use LittleCMS" has to be off when you output the .pfm
LAB file to the tool, otherwise it doesn't open the image.

The dtstyle produced includes a tone curve and coefficients for the LUT.
In my case, the tone curve is almost linear, with small (unconsitents)
bumps. These bumps appear to come from numerical errors and don't make
sense, so I disabled the tone curve, but now some luma values of the LUT
patches are a little off the theoretical target. I had to adjust them
individually, using the absolute target color, which is not what you
want to do on 48 patches.

I wonder if there is any ways to prevent darktable-chart from generating
tone curves and force it to only adjust the LUT ?

Thank you !

-- 

*Aurélien PIERRE*
aurelienpierre.com 


☎ Canada : +1 514 756 2207


Ce message a reçu une signature cryptographique par clé privée OpenPGP
attachée en PJ sous forme d'une somme de contrôle qui garantit
l'identité de son émetteur et l'intégrité du message entre son émission
et sa réception. Ce mode d'authentification a valeur légale, d'après
l'article 1316-1 du Code Civil modifié par la loi n° 2000-230 du 13 mars
2000, et d'après la directive européenne 1999/93/CE du 13 décembre 1999.
Une signature invalide ou inexistante d'un message provenant de cette
adresse peut être la conséquence d'un piratage. Merci de chiffrer tout
message contenant des informations sensibles et/ou confidentielles avec
votre clé privée et ma clé publique, via le protocole OpenPGP, gratuit
et opensource. Je décline toute responsabilité en cas de divulgation
d'informations confidentielles non chiffrées advenant une intrusion dans
ma boîte de courrier électronique.


___
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org



Re: [darktable-dev] Disable tone-curve generation in darktable-chart

2018-01-02 Thread Pascal Obry

Aurélien,

> The dtstyle produced includes a tone curve and coefficients for the
> LUT. In my case, the tone curve is almost linear, with small
> (unconsitents) bumps. These bumps appear to come from numerical
> errors and don't make sense, so I disabled the tone curve, but now
> some luma values of the LUT patches are a little off the theoretical
> target. 

I think this is because the Spyder ColorChecker does not have enough
gray gradient in it. I had the same issue, I then switched to a it8
target and I do not have this issue now.
 
-- 
  Pascal Obry /  Magny Les Hameaux (78)

  The best way to travel is by means of imagination

  http://www.obry.net

  gpg --keyserver keys.gnupg.net --recv-key F949BD3B
___
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org



Re: [darktable-dev] New module: mosaic

2018-01-02 Thread Pascal Obry
Le mardi 02 janvier 2018 à 12:38 -0200, Jefferson Ferreira a écrit :
> I finish my first module called "mosaic". This module creates a
> mosaic over the image to hide some confidential information (use
> masks to restrict the area).

Why using a gaussian mask over confidential information isn't enough?
I'm not sure to understand the purpose of this module.
 
> - link to download the module
> https://www.dropbox.com/s/i9sn3lrek67m56p/mosaic.c?dl=0
> 
> - copy this file to /src/iop
> 
> - in /src/iop/CMakeLists.txt, add the red line below:
> 
> add_iop(finalscale "finalscale.c")
> add_iop(globaltonemap "globaltonemap.c")
> add_iop(bilat "bilat.c")
> add_iop(denoiseprofile "denoiseprofile.c")
> add_iop(defringe "defringe.c")
> add_iop(ashift "ashift.c")
> add_iop(hazeremoval "hazeremoval.c")
> add_iop(mosaic "mosaic.c")
> 
> - recompile and installing the darktable

Sounds wrong to distribute a new module. Can you do a commit and a
pull-request? Using some random code download on same random server is
certainly not something I would do anyway.

Regards,

-- 
  Pascal Obry /  Magny Les Hameaux (78)

  The best way to travel is by means of imagination

  http://www.obry.net

  gpg --keyserver keys.gnupg.net --recv-key F949BD3B
___
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org



Re: [darktable-dev] New module: mosaic

2018-01-02 Thread Aurélien PIERRE
because I'm able to deconvolve it :-P

*Aurélien PIERRE*
aurelienpierre.com 


Le 2018-01-02 à 12:44, Pascal Obry a écrit :
> Le mardi 02 janvier 2018 à 12:38 -0200, Jefferson Ferreira a écrit :
>> I finish my first module called "mosaic". This module creates a
>> mosaic over the image to hide some confidential information (use
>> masks to restrict the area).
> Why using a gaussian mask over confidential information isn't enough?
> I'm not sure to understand the purpose of this module.
>  
>> - link to download the module
>> https://www.dropbox.com/s/i9sn3lrek67m56p/mosaic.c?dl=0
>>
>> - copy this file to /src/iop
>>
>> - in /src/iop/CMakeLists.txt, add the red line below:
>>
>> add_iop(finalscale "finalscale.c")
>> add_iop(globaltonemap "globaltonemap.c")
>> add_iop(bilat "bilat.c")
>> add_iop(denoiseprofile "denoiseprofile.c")
>> add_iop(defringe "defringe.c")
>> add_iop(ashift "ashift.c")
>> add_iop(hazeremoval "hazeremoval.c")
>> add_iop(mosaic "mosaic.c")
>>
>> - recompile and installing the darktable
> Sounds wrong to distribute a new module. Can you do a commit and a
> pull-request? Using some random code download on same random server is
> certainly not something I would do anyway.
>
> Regards,
>


___
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org

Re: [darktable-dev] New module: mosaic

2018-01-02 Thread Maurizio Paglia
In data martedì 2 gennaio 2018 19:29:54 CET, Aurélien PIERRE ha scritto:
> because I'm able to deconvolve it :-P
> 
> *Aurélien PIERRE*
> aurelienpierre.com 
> 
> 
> 
> Le 2018-01-02 à 12:44, Pascal Obry a écrit :
> > Le mardi 02 janvier 2018 à 12:38 -0200, Jefferson Ferreira a écrit :
> >> I finish my first module called "mosaic". This module creates a
> >> mosaic over the image to hide some confidential information (use
> >> masks to restrict the area).
> > 
> > Why using a gaussian mask over confidential information isn't enough?
> > I'm not sure to understand the purpose of this module.
> > 
> >> - link to download the module
> >> https://www.dropbox.com/s/i9sn3lrek67m56p/mosaic.c?dl=0
> >> 
> >> - copy this file to /src/iop
> >> 
> >> - in /src/iop/CMakeLists.txt, add the red line below:
> >> 
> >> add_iop(finalscale "finalscale.c")
> >> add_iop(globaltonemap "globaltonemap.c")
> >> add_iop(bilat "bilat.c")
> >> add_iop(denoiseprofile "denoiseprofile.c")
> >> add_iop(defringe "defringe.c")
> >> add_iop(ashift "ashift.c")
> >> add_iop(hazeremoval "hazeremoval.c")
> >> add_iop(mosaic "mosaic.c")
> >> 
> >> - recompile and installing the darktable
> > 
> > Sounds wrong to distribute a new module. Can you do a commit and a
> > pull-request? Using some random code download on same random server is
> > certainly not something I would do anyway.
> > 
> > Regards,
> 
> ___
> darktable developer mailing list
> to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org


I think this function is not exactly related to raw development but rather a 
more generic operation that an image manipulation software (like GIMP) can 
take care.
Maurizio

___
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org



Re: [darktable-dev] New module: mosaic

2018-01-02 Thread Tobias Ellinghaus
Am Dienstag, 2. Januar 2018, 19:29:54 CET schrieb Aurélien PIERRE:
> because I'm able to deconvolve it :-P

I'd like to challenge that claim. Please deconvolve this image:

https://houz.org/tmp/img_0001.pfm

> *Aurélien PIERRE*
> aurelienpierre.com 
> 
> 
> 
> Le 2018-01-02 à 12:44, Pascal Obry a écrit :
> > Le mardi 02 janvier 2018 à 12:38 -0200, Jefferson Ferreira a écrit :
> >> I finish my first module called "mosaic". This module creates a
> >> mosaic over the image to hide some confidential information (use
> >> masks to restrict the area).
> > 
> > Why using a gaussian mask over confidential information isn't enough?
> > I'm not sure to understand the purpose of this module.

Tobias

[...]

signature.asc
Description: This is a digitally signed message part.


Re: [darktable-dev] New module: mosaic

2018-01-02 Thread Aurélien PIERRE
Am Dienstag, 2. Januar 2018, 19:29:54 CET schrieb Aurélien PIERRE:
>> because I'm able to deconvolve it :-P
> I'd like to challenge that claim. Please deconvolve this image:
>
> https://houz.org/tmp/img_0001.pfm
Never challenge the power of my algorithms :
https://photo.aurelienpierre.com/wp-content/uploads/sites/3/2018/01/img_0001.jpg
>> *Aurélien PIERRE*
>> aurelienpierre.com 
>>
>> 
>>
>> Le 2018-01-02 à 12:44, Pascal Obry a écrit :
>>> Le mardi 02 janvier 2018 à 12:38 -0200, Jefferson Ferreira a écrit :
 I finish my first module called "mosaic". This module creates a
 mosaic over the image to hide some confidential information (use
 masks to restrict the area).
>>> Why using a gaussian mask over confidential information isn't enough?
>>> I'm not sure to understand the purpose of this module.
> Tobias
>
> [...]


___
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org

Re: [darktable-dev] New module: mosaic

2018-01-02 Thread Mark Feit

Maurizio Paglia wrote:


I think this function is not exactly related to raw development but rather a
more generic operation that an image manipulation software (like GIMP) can
take care.
The same argument could be made about the watermark, framing, liquefy 
and spot removal modules.


--Mark

___
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org



Re: [darktable-dev] New module: mosaic

2018-01-02 Thread François Tissandier
He has a point here... :-)

Le 2 janv. 2018 20:31, "Mark Feit"  a écrit :

> Maurizio Paglia wrote:
>
>>
>> I think this function is not exactly related to raw development but
>> rather a
>> more generic operation that an image manipulation software (like GIMP) can
>> take care.
>>
> The same argument could be made about the watermark, framing, liquefy and
> spot removal modules.
>
> --Mark
>
> 
> ___
> darktable developer mailing list
> to unsubscribe send a mail to darktable-dev+unsubscribe@list
> s.darktable.org
>
>

___
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org



Re: [darktable-dev] New module: mosaic

2018-01-02 Thread Tobias Ellinghaus
Am Dienstag, 2. Januar 2018, 20:11:36 CET schrieb Aurélien PIERRE:
> Am Dienstag, 2. Januar 2018, 19:29:54 CET schrieb Aurélien PIERRE:
> >> because I'm able to deconvolve it :-P
> > 
> > I'd like to challenge that claim. Please deconvolve this image:
> > 
> > https://houz.org/tmp/img_0001.pfm
> 
> Never challenge the power of my algorithms :
> https://photo.aurelienpierre.com/wp-content/uploads/sites/3/2018/01/img_0001
> .jpg

Awesome, close enough! :D

> >> *Aurélien PIERRE*
> >> aurelienpierre.com 
> >> 
> >> 
> >> 
> >> Le 2018-01-02 à 12:44, Pascal Obry a écrit :
> >>> Le mardi 02 janvier 2018 à 12:38 -0200, Jefferson Ferreira a écrit :
>  I finish my first module called "mosaic". This module creates a
>  mosaic over the image to hide some confidential information (use
>  masks to restrict the area).
> >>> 
> >>> Why using a gaussian mask over confidential information isn't enough?
> >>> I'm not sure to understand the purpose of this module.
> > 
> > Tobias
> > 
> > [...]
> 
> ___
> darktable developer mailing list
> to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org



signature.asc
Description: This is a digitally signed message part.