Project

General

Profile

Bug #11160

Darktable crahes when printing with a printer profile that does not exist

Added by Fernando Herrero Carrón over 3 years ago. Updated over 3 years ago.

Status:
Fixed
Priority:
Low
Assignee:
Category:
Printing
Target version:
Start date:
09/17/2016
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.0.5
System:
FreeBSD
bitness:
64-bit
hardware architecture:
amd64/x86

Description

I can happily print pictures directly from darktable to my printer if no printer profile is selected. If I select one of the profiles from the dropdown ("sRGB v1.31 (Canon)" in this case) and press "print", darktable crashes after some CPU work.

I have checked and that profile does not exist neither in my ~/.config/darktable/color/out nor in my /usr/local/share/darktable/color/out folders.

Running within gdb, the culprit is:

Thread 1 received signal SIGSEGV, Segmentation fault.
_print_button_clicked (widget=<optimized out>, user_data=<optimized out>)
at /wrkdirs/usr/ports/graphics/darktable/work/darktable-2.0.5/src/libs/print_settings.c:281
281 /wrkdirs/usr/ports/graphics/darktable/work/darktable-2.0.5/src/libs/print_settings.c: No such file or directory.

I am running FreeBSD 10.3-RELEASE-p7 #0: Thu Aug 11 18:38:15 UTC 2016 and:

~% darktable --version
this is darktable 2.0.5
copyright (c) 2009-2015 johannes hanika

compile options:
bit depth is 64 bit
normal build
OpenMP support enabled
OpenCL support enabled
Lua support enabled, API version 3.0.0
Colord support enabled
gPhoto2 support enabled
GraphicsMagick support enabled

darktable_stacktrace.txt (25.8 KB) darktable_stacktrace.txt Fernando Herrero Carrón, 09/19/2016 12:19 AM

History

#1 Updated by Pascal Obry over 3 years ago

  • Assignee set to Pascal Obry

Have you really looked in ~/.config/darktable/color/out/ ?

I mean the profiles displayed in the drop-down are really coming from somewhere! I'm on master and cannot see "sRGB v1.31 (Canon)" listed. All my listed profiles have a corresponding ICC in ~/.config/darktable/color/out/.

Maybe an issue with 2.0.5 now fixed in the development version.

#2 Updated by Fernando Herrero Carrón over 3 years ago

Hi Pascal,

For testers:

% ls color/out           
CalibratedDisplayProfile-1.icc Epson IJ Printer 07.icc

Curiously:

% ls color/in
AdobeRGB.icc      CNZJM1A1.icc      CNZJP3C1.icc      CNZUS5A1.icc
AppleRGB.icc      CNZJM2A1.icc      CNZJP4C1.icc      ColorMatchRGB.icc
CNZEU1A1.icc      CNZJM3A1.icc      CNZJP5C1.icc      WideGamutRGB.icc
CNZEU2A1.icc      CNZJM4A1.icc      CNZUS1A1.icc      sRGB Profile.icc
CNZEU3A1.icc      CNZJM5A1.icc      CNZUS2A1.icc
CNZEU4A1.icc      CNZJP1C1.icc      CNZUS3A1.icc
CNZEU5A1.icc      CNZJP2C1.icc      CNZUS4A1.icc

The last one,

sRGB Profile.icc
contains the string "sRGB v1.31 (Canon)". It looks like input profiles are being included in the list under Printer -> Profile. I'll try to check with 2.0.6.

#3 Updated by Tobias Ellinghaus over 3 years ago

Did you have the profile in out/ before, selected it, closed darktable and then removed it from the folder? And could you please provide us with a full backtrace?

#4 Updated by Fernando Herrero Carrón over 3 years ago

It's been a long while since I played with profiles. I can't exclude the possibility that I moved them around, but I think it is highly improbable.

I am attaching the redirected output of launching darktable from a console.

When launching with gdb, I get the following backtrace (only darktable itself and gtk were compiled with debug symbols, and aparently with optimizations):

Thread 1 received signal SIGSEGV, Segmentation fault.
_print_button_clicked (widget=<optimized out>, user_data=<optimized out>)
    at /wrkdirs/usr/ports/graphics/darktable/work/darktable-2.0.5/src/libs/print_settings.c:281

(gdb) bt
#0  _print_button_clicked (widget=<optimized out>, user_data=<optimized out>)
    at /wrkdirs/usr/ports/graphics/darktable/work/darktable-2.0.5/src/libs/print_settings.c:281
#1  0x000000080348cb1a in ?? () from /usr/local/lib/libgobject-2.0.so.0
#2  0x00000008034a21a6 in g_signal_emit_valist () from /usr/local/lib/libgobject-2.0.so.0
#3  0x00000008034a2c14 in g_signal_emit () from /usr/local/lib/libgobject-2.0.so.0
#4  0x00000008015bdfaa in gtk_button_clicked (button=0x82180d8e0) at gtkbutton.c:1488
#5  0x00000008015bfd17 in gtk_button_do_release (button=0x82180d8e0, emit_clicked=1) at gtkbutton.c:1899
#6  0x00000008015c2304 in gtk_real_button_released (button=0x82180d8e0) at gtkbutton.c:2017
#7  0x000000080348cb1a in ?? () from /usr/local/lib/libgobject-2.0.so.0
#8  0x00000008034a21a6 in g_signal_emit_valist () from /usr/local/lib/libgobject-2.0.so.0
#9  0x00000008034a2c14 in g_signal_emit () from /usr/local/lib/libgobject-2.0.so.0
#10 0x00000008015bfafc in multipress_released_cb (gesture=0x8219a01d0, n_press=1, x=127, y=8, widget=0x82180d8e0) at gtkbutton.c:613
#11 0x000000080cbe7c4c in ffi_call_unix64 () from /usr/local/lib/libffi.so.6
#12 0x000000080cbe71af in ffi_call () from /usr/local/lib/libffi.so.6
#13 0x000000080348e0fc in g_cclosure_marshal_generic_va () from /usr/local/lib/libgobject-2.0.so.0
#14 0x000000080348cb1a in ?? () from /usr/local/lib/libgobject-2.0.so.0
#15 0x00000008034a21a6 in g_signal_emit_valist () from /usr/local/lib/libgobject-2.0.so.0
#16 0x00000008034a2c14 in g_signal_emit () from /usr/local/lib/libgobject-2.0.so.0
#17 0x00000008016ad52b in gtk_gesture_multi_press_end (gesture=0x8219a01d0, sequence=0x0) at gtkgesturemultipress.c:273
#18 0x000000080348fcab in g_cclosure_marshal_VOID__BOXEDv () from /usr/local/lib/libgobject-2.0.so.0
#19 0x000000080348cb1a in ?? () from /usr/local/lib/libgobject-2.0.so.0
#20 0x00000008034a21a6 in g_signal_emit_valist () from /usr/local/lib/libgobject-2.0.so.0
#21 0x00000008034a2c14 in g_signal_emit () from /usr/local/lib/libgobject-2.0.so.0
#22 0x00000008016aa162 in _gtk_gesture_set_recognized (gesture=0x8219a01d0, recognized=0, sequence=0x0) at gtkgesture.c:345
#23 0x00000008016a8f60 in _gtk_gesture_check_recognized (gesture=0x8219a01d0, sequence=0x0) at gtkgesture.c:386
#24 0x00000008016aac59 in gtk_gesture_handle_event (controller=0x8219a01d0, event=0x821b70820) at gtkgesture.c:777
#25 0x00000008016af939 in gtk_gesture_single_handle_event (controller=0x8219a01d0, event=0x821b70820) at gtkgesturesingle.c:221
#26 0x000000080166d221 in gtk_event_controller_handle_event (controller=0x8219a01d0, event=0x821b70820) at gtkeventcontroller.c:230
#27 0x00000008018beacf in _gtk_widget_run_controllers (widget=0x82180d8e0, event=0x821b70820, phase=GTK_PHASE_BUBBLE) at gtkwidget.c:7321
#28 0x00000008018ce942 in gtk_widget_real_button_event (widget=0x82180d8e0, event=0x821b70820) at gtkwidget.c:7096
#29 0x000000080170fca7 in _gtk_marshal_BOOLEAN__BOXEDv (closure=0x81885a720, return_value=0x7fffffffe2f0, instance=0x82180d8e0, 
    args=0x7fffffffe420, marshal_data=0x8018ce920 <gtk_widget_real_button_event>, n_params=1, param_types=0x81a54a488) at gtkmarshalers.c:131
#30 0x000000080348cb1a in ?? () from /usr/local/lib/libgobject-2.0.so.0
#31 0x00000008034a21a6 in g_signal_emit_valist () from /usr/local/lib/libgobject-2.0.so.0
#32 0x00000008034a2c14 in g_signal_emit () from /usr/local/lib/libgobject-2.0.so.0
#33 0x00000008018be624 in gtk_widget_event_internal (widget=0x82180d8e0, event=0x821b70820) at gtkwidget.c:7692
#34 0x00000008018be2f2 in gtk_widget_event (widget=0x82180d8e0, event=0x821b70820) at gtkwidget.c:7256
#35 0x000000080170db97 in propagate_event_up (widget=0x82180d8e0, event=0x821b70820, topmost=0x0) at gtkmain.c:2517
#36 0x000000080170d96b in propagate_event (widget=0x82180d8e0, event=0x821b70820, captured=0, topmost=0x0) at gtkmain.c:2620
#37 0x000000080170d13b in gtk_propagate_event (widget=0x82180d8e0, event=0x821b70820) at gtkmain.c:2654
#38 0x000000080170ca08 in gtk_main_do_event (event=0x821b70820) at gtkmain.c:1850
#39 0x0000000801e6bfc1 in _gdk_event_emit (event=0x821b70820) at gdkevents.c:69
#40 0x0000000801ea6db9 in gdk_event_source_dispatch (source=0x81a541200, callback=0x0, user_data=0x0) at gdkeventsource.c:364
#41 0x0000000803713628 in g_main_context_dispatch () from /usr/local/lib/libglib-2.0.so.0
#42 0x0000000803713964 in ?? () from /usr/local/lib/libglib-2.0.so.0
#43 0x0000000803713c8f in g_main_loop_run () from /usr/local/lib/libglib-2.0.so.0
#44 0x000000080170c026 in gtk_main () at gtkmain.c:1241
#45 0x0000000800f4fe77 in dt_gui_gtk_run (gui=<optimized out>) at /wrkdirs/usr/ports/graphics/darktable/work/darktable-2.0.5/src/gui/gtk.c:968
#46 0x0000000000400bd0 in main (argc=<optimized out>, argv=0x818831081) at /wrkdirs/usr/ports/graphics/darktable/work/darktable-2.0.5/src/main.c:25

#5 Updated by Tobias Ellinghaus over 3 years ago

Could you do a "bt full"? Maybe there are some traces of local variables left.

@Pascal: I assume that fetching the profile returns NULL, so the "->profile" segfaults. A quick fix would be an intermediate variable and checking that, but you probably also want to find how the wrong profile was getting there.

#6 Updated by Pascal Obry over 3 years ago

Fernando Herrero Carrón wrote:

The last one, [...] contains the string "sRGB v1.31 (Canon)". It looks like input profiles are being included in the list under Printer -> Profile. I'll try to check with 2.0.6.

Ok, then can you attach sRGB Profile.icc here?

Thanks.

#7 Updated by Pascal Obry over 3 years ago

  • Assignee changed from Pascal Obry to Fernando Herrero Carrón

Assigned to you for attaching the profile here. I'd like to test it as I've not been able to reproduce a crash with another .icc.

Then please reassign to me. Thanks.

#8 Updated by Pascal Obry over 3 years ago

  • % Done changed from 0 to 100
  • Assignee changed from Fernando Herrero Carrón to Pascal Obry
  • Status changed from New to Fixed

May be fixed, please check on your side.

#9 Updated by Roman Lebedev over 3 years ago

  • Target version set to 2.2.0

Also available in: Atom PDF

Go to top