[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#895649: inkscape: Segfault closing dialog after importing PDF



forwarded 895649 https://bugs.launchpad.net/inkscape/+bug/1541848
thanks

Hi Mattia,

Sorry for my long delay in responding.

On Sat, 2018-04-14 at 23:36 +0200, Mattia Rizzolo wrote:
> On Fri, Apr 13, 2018 at 07:25:25PM -0600, Kevin Locke wrote:
>> 4.  Open a second, PDF file with a different name (can be same or
>>     different file contents).
>>     This should open a second window for second PDF, but the second
>>     window will have no dialogs open while the first window has two
>>     duplicate Layers dialogs open.
> 
> I tried a couple of times, but this doesn't happen to me as you
> describe, the second PDF opens in a new window, with not Layers dialog,
> and the first window keeps only one -its own- Layers dialog.

After some more testing I realized after opening the Layers dialog you
must close then re-open Inkscape to save the open state in preferences
before step 4.  I have attached a script which reliably reproduces the
issue using a temporary home directory to avoid preferences issues.

>> At this point Inkscape will crash with SIGSEGV and the following
>> backtrace:
> … 
>> If you need any more details or more symbols in the backtrace, let me
>> know.
> 
> Could you please open a bug upstream on
> https://bugs.launchpad.net/inkscape ?
> We will then add a bug link here, but it's really an upstream problem.

Sure.  It's https://bugs.launchpad.net/inkscape/+bug/1541848

Cheers,
Kevin
#!/bin/sh
# Script to reproduce "Segfault closing dialog after importing PDFs"

set -Ceux

# Create an empty home directory for test prefs
temp_home=$(mktemp -d -t temphome-XXXXXXXX)

# Create PDF file (from https://stackoverflow.com/a/17280876) (any will work)
cat > "$temp_home/blank.pdf" <<'PDF'
%PDF-1.0
1 0 obj<</Pages 2 0 R>>endobj 2 0 obj<</Kids[3 0 R]/Count 1>>endobj 3 0 obj<</MediaBox[0 0 3 3]>>endobj
trailer<</Root 1 0 R>>
PDF

# Make Layers visible by default in preferences
HOME=$temp_home inkscape --verb DialogLayers --verb FileQuit

# Run Inkscape and open any two PDF files
# User Action Required:
# - Press OK on each of the two Import Options dialogs
# - Should produce two Inkscape windows with both Layers dialogs in one window.
# - Close the two Layers dialogs then switch focus to the other window to crash.
HOME=$temp_home gdb -q -ex run --args \
	inkscape -f "$temp_home/blank.pdf" -f "$temp_home/blank.pdf"

Reply to: