Skip to content

sync issue boolean and gui->reset #21296

Description

@TurboGit

In the lighttable view, the thread was 'worker' and 'thumbs_update*'.

It looks to me like the darktable thread and thumbs_update can run in parallel. When I run dt 5.4.1 in gdb and set an awatch on darktable.gui->reset I see stuff like this

Thread 1 "darktable" hit Hardware access (read/write) watchpoint 1: darktable.gui->reset

Value = 0

Thread 1 "darktable" hit Hardware access (read/write) watchpoint 1: darktable.gui->reset

Value = 0
0x00007ffff7af91ff in dt_view_image_get_surface (imgid=304, width=98, height=80, surface=surface@entry=0x7fffffff6fd0, quality=quality@entry=0) at /home/david/devel/darktable/darktable/src/views/view.c:727
727       *surface = NULL;
[Switching to Thread 0x7fffe59fe6c0 (LWP 777633)]

Thread 20 "thumbs_update" hit Hardware access (read/write) watchpoint 1: darktable.gui->reset

Old value = 0
New value = 1

Thread 20 "thumbs_update" hit Hardware access (read/write) watchpoint 1: darktable.gui->reset

Value = 1
dt_iop_reload_defaults (module=0x7fff9800afd0) at /home/david/devel/darktable/darktable/src/develop/imageop.c:1299
1299      if(module->reload_defaults)
[Switching to Thread 0x7fffef1a4f40 (LWP 777612)]

Thread 1 "darktable" hit Hardware access (read/write) watchpoint 1: darktable.gui->reset

Value = 1

Thread 1 "darktable" hit Hardware access (read/write) watchpoint 1: darktable.gui->reset

Value = 1

Without synchronised access to darktable.gui->reset those two threads (and maybe others?) are bound to get tangled up, aren't they?

Originally posted by @dhoulder in #21043

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions