Windows7 Pro x64 Crash on file/inkscape preferences

Bug #830308 reported by Scott A. Tovey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
High
Unassigned

Bug Description

When attempting to open inkscape preferences, inkscape crashes and shuts down.

If the preferences are set in the registry, you need to make sure that you are using the proper method to access the 64 bit registry of windows 7. You can find information regarding this on msdn and codeproject.com

Make sure when you implement GPU in .49 that it can be disabled. My GPU can be used this way, but it has a tendency to prevent screen refreshing if done wrong. Found this out courtesy of Firefox 5.

Revision history for this message
Alvin Penner (apenner) wrote :

on Windows 7, 32 bit, the Inkscape preferences are stored in the file :
\users\username\AppData\Roaming\inkscape\preferences.xml

- could you try running Inkscape again, to see if the problem reoccurs consistently?

- could you try running Inkscape from a DOS prompt to see if there are any exit messages?
  (you may get the message : RegistryTool: Could not set the value 'C:\Program Files\Inkscape\inkscape.exe', but this can be ignored)

- which version of Inkscape?

su_v (suv-lp)
tags: added: crash
Changed in inkscape:
importance: Undecided → High
Revision history for this message
su_v (suv-lp) wrote :

Possibly related to Bug #498141 “Crash on opening "Inkscape Preferences..." dialog”
<https://bugs.launchpad.net/inkscape/+bug/498141>

If the crash happens consistently even with default (new) preferences, could you test the workaround mentioned in comment #12 there?

<off-topic>
> Make sure when you implement GPU in .49 that it can be disabled

Inkscape does not use the GPU - for now, it is a single-core app with enabled multi-threading for some selected processes (in 0.48, the rendering of gaussian blurs, in the current development branch the rendering of all SVG filter effects), compiled as 32bit app for the Windows port.
</off-topic>

Revision history for this message
Scott A. Tovey (satovey) wrote : Re: [Bug 830308] Re: Windows7 Pro x64 Crash on file/inkscape preferences

Inkscape version 0.48.1

This issue is recreated every time I run inkscape and
open the inkscape preferences.

This issue occurs whether inkscape is installed via
the installer, uncompressed via zip, or run as a
portable apps on a USB drive.

How does one run it from a command prompt?

Scott

--- On Sat, 20/8/11, Alvin Penner <email address hidden> wrote:

From: Alvin Penner <email address hidden>
Subject: [Bug 830308] Re: Windows7 Pro x64 Crash on file/inkscape preferences
To: <email address hidden>
Date: Saturday, 20 August, 2011, 9:50 PM

on Windows 7, 32 bit, the Inkscape preferences are stored in the file :
\users\username\AppData\Roaming\inkscape\preferences.xml

- could you try running Inkscape again, to see if the problem reoccurs
consistently?

- could you try running Inkscape from a DOS prompt to see if there are any exit messages?
  (you may get the message : RegistryTool: Could not set the value 'C:\Program Files\Inkscape\inkscape.exe', but this can be ignored)

- which version of Inkscape?

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/830308

Title:
  Windows7 Pro x64 Crash on file/inkscape preferences

Status in Inkscape: A Vector Drawing Tool:
  New

Bug description:
  When attempting to open inkscape preferences, inkscape crashes and
  shuts down.

  If the preferences are set in the registry, you need to make sure that
  you are using the proper method to access the 64 bit registry of
  windows 7. You can find information regarding this on msdn and
  codeproject.com

  Make sure when you implement GPU in .49 that it can be disabled. My
  GPU can be used this way, but it has a tendency to prevent screen
  refreshing if done wrong. Found this out courtesy of Firefox 5.

To manage notifications about this bug go to:
https://bugs.launchpad.net/inkscape/+bug/830308/+subscriptions

Revision history for this message
Alvin Penner (apenner) wrote :

- on Windows 7, 32 bit, I go to Start Button->All Programs->Accessories->Command Prompt

- then issue the change directory command, cd, to get the following:

C:\Users\Alvin>cd\Program Files\inkscape

C:\Program Files\Inkscape>inkscape -V
Inkscape 0.48.2 r9819 (Aug 14 2011)
RegistryTool: Could not set the value 'C:\Program Files\Inkscape\inkscape.exe'

alternatively, you can type 'inkscape --help' to get help, or just 'inkscape' to run it normally.

Revision history for this message
Scott A. Tovey (satovey) wrote :
Download full text (4.9 KiB)

OK,

I did a clean instal of 0.48.2.1 and ran the command prompt as requested

I received the following errors.

** (inkscape.exe:5708): CRITICAL **: Inkscape::XML::Document*
sp_repr_read_file(constr gchar*, const gchar*): assertion
'Inkscape::IO::file_test( filename, G_File_TEST_EXISTS )' failed

(inkscape.exe:5708: GLib-Critical **: g_convert: assertion 'str != NULL' failed

Many copies of that last lines.

I then decided to run a take ownership on the xml file just

to be sure that was owned properly and she still crashed.

I also have the following plugin errors log file which may be

related.

Extension "Dia Input" failed to load because a dependency was not met.

Dependency:

  type: executable

  location: extensions

  string: dia2svg.sh

  description: The dia2svg.sh script should be installed with your
Inkscape distribution.  If you do not have it, there is likely to be
something wrong with your Inkscape installation.

Extension "Dia Input" failed to load because a dependency was not met.

Dependency:

  type: executable

  location: path

  string: dia

  description: In order to import Dia files, Dia itself must be installed.  You can get Dia at http://live.gnome.org/Dia

Extension "DXF Output" failed to load because a dependency was not met.

Dependency:

  type: executable

  location: extensions

  string: ps2dxf.sh

Extension "DXF Output" failed to load because a dependency was not met.

Dependency:

  type: executable

  location: path

  string: pstoedit

  description: pstoedit must be installed to run; see http://www.pstoedit.net/pstoedit

Extension "EPS Input" failed to load because a dependency was not met.

Dependency:

  type: executable

  location: path

  string: ps2pdf

Extension "LaTeX formula" failed to load because a dependency was not met.

Dependency:

  type: executable

  location: path

  string: latex

Extension "LaTeX formula" failed to load because a dependency was not met.

Dependency:

  type: executable

  location: path

  string: dvips

Extension "LaTeX formula" failed to load because a dependency was not met.

Dependency:

  type: executable

  location: path

  string: pstoedit

Extension "XFIG Input" failed to load because a dependency was not met.

Dependency:

  type: executable

  location: path

  string: fig2dev

Extension "GIMP XCF" failed to load because a dependency was not met.

Dependency:

  type: executable

  location: path

  string: gimp

Extension "Text Outline Input" failed to load because a dependency was not met.

Dependency:

  type: executable

  location: path

  string: perl

Extension "PostScript Input" failed to load because a dependency was not met.

Dependency:

  type: executable

  location: path

  string: ps2pdf

Extension "Sketch Input" failed to load because a dependency was not met.

Dependency:

  type: executable

  location: extensions

  string: sk2svg.sh

Extension "Sketch Input" failed to load because a dependency was not met.

Dependency:

  type: executable

  location: path

  string: skconvert

Extension...

Read more...

Revision history for this message
Alvin Penner (apenner) wrote :

- the file extension-errors.log can be ignored for the moment. It is not actually a list of errors, it is just a list of possible external packages which are not installed on your machine, none of which are essential.

- the message : (inkscape.exe:5708: GLib-Critical **: g_convert: assertion 'str != NULL' failed
can also be ignored, I think, I've seen that a lot when running from DOS, I think it is harmless.

- am curious about the message : ** (inkscape.exe:5708): CRITICAL **: Inkscape::XML::Document*
 sp_repr_read_file(constr gchar*, const gchar*): assertion
 'Inkscape::IO::file_test( filename, G_File_TEST_EXISTS )' failed

did this happen when you first loaded Inkscape or did it happen when you clicked on the menu item for Preferences?

Revision history for this message
Alvin Penner (apenner) wrote :

this is what my DOS output looks like:

C:\Program Files\Inkscape>inkscape
C:\Program Files\Inkscape

the first line is the actual command to run Inkscape.
the second line is a duplicate of the path name for Inkscape. The second line occurs precisely when I click on the menu item for Preferences. Do you get the second line, or do you get the crash message instead?

Revision history for this message
Scott A. Tovey (satovey) wrote :

It is related.

Changed:

    <group
       id="displayprofile"
       enable="0"
       from_display="0"
       intent="0"
       uri="" />

To:

    <group
       id="displayprofile"
       enable="0"
       from_display="1"
       intent="0"
       uri="" />

Sorry to tell you but this is a bug in windows 7.

http://social.msdn.microsoft.com/Forums/en/windowsgeneraldevelopmentissues/thread/668e3cf9-4e00-4b40-a6f8-c7d2fc1afd39?prof=required&lc=1033&ppud=4

The thread has some code you can review to fix the problem
in XP and Vista using szDevice member..

Unfortunately a post that is further down the page describes a
bug that appears to be in Windows 7.

I suggest you read the whole page, it will unfortunately be
a bit discouraging.

Scott

--- On Sun, 21/8/11, ~suv <email address hidden> wrote:

From: ~suv <email address hidden>
Subject: [Bug 830308] Re: Windows7 Pro x64 Crash on file/inkscape preferences
To: <email address hidden>
Date: Sunday, 21 August, 2011, 3:01 AM

Possibly related to Bug #498141 “Crash on opening "Inkscape Preferences..." dialog”
<https://bugs.launchpad.net/inkscape/+bug/498141>

If the crash happens consistently even with default (new) preferences,
could you test the workaround mentioned in comment #12 there?

<off-topic>
> Make sure when you implement GPU in .49 that it can be disabled

Inkscape does not use the GPU - for now, it is a single-core app with enabled multi-threading for some selected processes (in 0.48, the rendering of gaussian blurs, in the current development branch the rendering of all SVG filter effects), compiled as 32bit app for the Windows port.
</off-topic>

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/830308

Title:
  Windows7 Pro x64 Crash on file/inkscape preferences

Status in Inkscape: A Vector Drawing Tool:
  New

Bug description:
  When attempting to open inkscape preferences, inkscape crashes and
  shuts down.

  If the preferences are set in the registry, you need to make sure that
  you are using the proper method to access the 64 bit registry of
  windows 7. You can find information regarding this on msdn and
  codeproject.com

  Make sure when you implement GPU in .49 that it can be disabled. My
  GPU can be used this way, but it has a tendency to prevent screen
  refreshing if done wrong. Found this out courtesy of Firefox 5.

To manage notifications about this bug go to:
https://bugs.launchpad.net/inkscape/+bug/830308/+subscriptions

Revision history for this message
Scott A. Tovey (satovey) wrote :

Thanks for that tid bit.

I tried the work around suggested by suv and it worked.
I did a bit of googling and found the following information
which I think you may want to read as well.

Here is a copy of what I sent to suv.

It is related.

Changed:

    <group

       id="displayprofile"

       enable="0"

       from_display="0"

       intent="0"

       uri="" />

To:

    <group

       id="displayprofile"

       enable="0"

       from_display="1"

       intent="0"

       uri="" />

Sorry to tell you but this is a bug in windows 7.

http://social.msdn.microsoft.com/Forums/en/windowsgeneraldevelopmentissues/thread/668e3cf9-4e00-4b40-a6f8-c7d2fc1afd39?prof=required&lc=1033&ppud=4

The thread has some code you can review to fix the problem

in XP and Vista using szDevice member..

Unfortunately a post that is further down the page describes a

bug that appears to be in Windows 7.

I suggest you read the whole page, it will unfortunately be

a bit discouraging.

Scott

Scott

--- On Sun, 21/8/11, Alvin Penner <email address hidden> wrote:

From: Alvin Penner <email address hidden>
Subject: [Bug 830308] Re: Windows7 Pro x64 Crash on file/inkscape preferences
To: <email address hidden>
Date: Sunday, 21 August, 2011, 5:08 PM

- the file extension-errors.log can be ignored for the moment. It is not
actually a list of errors, it is just a list of possible external
packages which are not installed on your machine, none of which are
essential.

- the message : (inkscape.exe:5708: GLib-Critical **: g_convert: assertion 'str != NULL' failed
can also be ignored, I think, I've seen that a lot when running from DOS, I think it is harmless.

- am curious about the message : ** (inkscape.exe:5708): CRITICAL **: Inkscape::XML::Document*
 sp_repr_read_file(constr gchar*, const gchar*): assertion
 'Inkscape::IO::file_test( filename, G_File_TEST_EXISTS )' failed

did this happen when you first loaded Inkscape or did it happen when you
clicked on the menu item for Preferences?

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/830308

Title:
  Windows7 Pro x64 Crash on file/inkscape preferences

Status in Inkscape: A Vector Drawing Tool:
  New

Bug description:
  When attempting to open inkscape preferences, inkscape crashes and
  shuts down.

  If the preferences are set in the registry, you need to make sure that
  you are using the proper method to access the 64 bit registry of
  windows 7. You can find information regarding this on msdn and
  codeproject.com

  Make sure when you implement GPU in .49 that it can be disabled. My
  GPU can be used this way, but it has a tendency to prevent screen
  refreshing if done wrong. Found this out courtesy of Firefox 5.

To manage notifications about this bug go to:
https://bugs.launchpad.net/inkscape/+bug/830308/+subscriptions

Revision history for this message
Scott A. Tovey (satovey) wrote :
Download full text (3.3 KiB)

Now that I set from_display to 1 I get the following
readout:

inkscape -V generated the following error:
Inkscape 0.48.2 r9819 (Aug 14 2011)
RegistryTool: Could not set the value 'D:\Program Files Production\Inkscape\inkscape.exe

D:\Program Files Production\Inkscape>inkscape
D:\Program Files Production\Inkscape

A simple workaround to this may be to simple increment
from_display ='0' to from_display='1' when this error
occurs.

The error is coming from the wrong number associated
with the monitor.

I have a single monitor, yet instead of it being monitor 0, it is
monitor 1.

My current monitor is a replacement from an earlier one of
a different brand. Do you think it may be that the old monitor
is still listed as 0? This would explain the issues people are
having which appears to be contrary to what Microsoft is
expecting.

What appears to be happening from my perspective is that
the monitor number is differentiated from the
mounted monitor device number.

I don't know windows API's so I can't verify that theory.

Another thought is that perhaps both monitor drivers are
being mounted even though the previous monitor is no longer
connected to the computer. There is only one monitor port
connection.

Another possiblility is that the monitor input is what determines
the monitor number. My monitor has both vga and HDMI inputs.
It may be that HDMI id's as monitor 0 and the vga id's as monitor 1.

The best workaround I can think of is testing for monitor at
monitor 0 and then increment the monitor id number until
you do not get an error. Once you do not receive an error
from the monitor test, you know what the monitor number is.

PHP would look something like this:

from_device="0"
while ( iserror( from_device ) = true)
{
  from_device =  "monitorNum";
  monitorNum++;
}

You'll have to transpose that into C++ as I don't know
what the code would be.

Scott

--- On Sun, 21/8/11, Alvin Penner <email address hidden> wrote:

From: Alvin Penner <email address hidden>
Subject: [Bug 830308] Re: Windows7 Pro x64 Crash on file/inkscape preferences
To: <email address hidden>
Date: Sunday, 21 August, 2011, 5:16 PM

this is what my DOS output looks like:

C:\Program Files\Inkscape>inkscape
C:\Program Files\Inkscape

the first line is the actual command to run Inkscape.
the second line is a duplicate of the path name for Inkscape. The second line occurs precisely when I click on the menu item for Preferences. Do you get the second line, or do you get the crash message instead?

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/830308

Title:
  Windows7 Pro x64 Crash on file/inkscape preferences

Status in Inkscape: A Vector Drawing Tool:
  New

Bug description:
  When attempting to open inkscape preferences, inkscape crashes and
  shuts down.

  If the preferences are set in the registry, you need to make sure that
  you are using the proper method to access the 64 bit registry of
  windows 7. You can find information regarding this on msdn and
  codeproject.com

  Make sure when you implement GPU in .49 that it can be disabled. My
  GPU can be used this way, but it has a tendency to prevent screen...

Read more...

su_v (suv-lp)
tags: added: color preferences
Revision history for this message
Alvin Penner (apenner) wrote :

the error message that says:
RegistryTool: Could not set the value 'D:\Program Files Production\Inkscape\inkscape.exe

can be removed as follows: start DOS as an administrator.
In my case I have a shortcut to 'cmd' on my desktop, since I use DOS a lot, being of a certain age...
so instead of double-clicking on the shortcut, I use the right mouse button and choose the option "Run as administrator". Then when DOS starts up it says "Administrator:cmd" in the title. Then run Inkscape and start up the Preferences dialog and get the following output, no error messages about the Registry:

C:\Program Files>inkscape\inkscape
C:\Program Files\inkscape

Just for clarification, is the original crash fixed?

Revision history for this message
Scott A. Tovey (satovey) wrote :

Yes the original crash is fixed.

That fix was to change the from_display setting in
inkscapepreferences.xml as follows.

Changed:

    <group
       id="displayprofile"
       enable="0"
       from_display="0"
       intent="0"
       uri="" />

To:

    <group
       id="displayprofile"
       enable="0"
       from_display="1"
       intent="0"
       uri="" />

And thanks for the registry fix.

Since the error is resulting in a NULL
due to the display being set to the wrong
number, you should be able to determine
the proper monitor number by retrieving
the window settings from the monitor.

When the monitor number is incorrect,
the crash results. Since Windows 7 does
not always return the proper monitor number,
you can determine the proper monitor number
testing each subsequent device number until
you do not receive an error.

This bug by the way, also prevents Inkscape from
saving a larger window size to the settings.
As a result, inkscape reopens  to it's default window
size.

Fixing this bug is simply a matter of catching  the error
that causes the crash, then  looping through monitor
numbers until you don't have an error, At that point,
you have the correct monitor number.

The only other issue I can see, is if someone is using
Inkscape across multiple monitors. Those numbers
may need to be set manually.

Scott

--- On Sun, 21/8/11, Alvin Penner <email address hidden> wrote:

From: Alvin Penner <email address hidden>
Subject: [Bug 830308] Re: Windows7 Pro x64 Crash on file/inkscape preferences
To: <email address hidden>
Date: Sunday, 21 August, 2011, 6:28 PM

the error message that says:
RegistryTool: Could not set the value 'D:\Program Files Production\Inkscape\inkscape.exe

can be removed as follows: start DOS as an administrator.
In my case I have a shortcut to 'cmd' on my desktop, since I use DOS a lot, being of a certain age...
so instead of double-clicking on the shortcut, I use the right mouse button and choose the option "Run as administrator". Then when DOS starts up it says "Administrator:cmd" in the title. Then run Inkscape and start up the Preferences dialog and get the following output, no error messages about the Registry:

C:\Program Files>inkscape\inkscape
C:\Program Files\inkscape

Just for clarification, is the original crash fixed?

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/830308

Title:
  Windows7 Pro x64 Crash on file/inkscape preferences

Status in Inkscape: A Vector Drawing Tool:
  New

Bug description:
  When attempting to open inkscape preferences, inkscape crashes and
  shuts down.

  If the preferences are set in the registry, you need to make sure that
  you are using the proper method to access the 64 bit registry of
  windows 7. You can find information regarding this on msdn and
  codeproject.com

  Make sure when you implement GPU in .49 that it can be disabled. My
  GPU can be used this way, but it has a tendency to prevent screen
  refreshing if done wrong. Found this out courtesy of Firefox 5.

To manage notifications about this bug go to:
https://bugs.launchpad.net/inkscape/+bug/830308/+subscriptions

Revision history for this message
su_v (suv-lp) wrote :

> Since the error is resulting in a NULL
> due to the display being set to the wrong
> number, (…)

It seems to me that you misinterpret what is stored in the preferences file: the '0' or '1' values are boolean values (false/true) and only determine whether a different mechanism (XICC under X11) is used by Inkscape to retrieve the color profile information from the current display (see also the GUI of this setting in the preferences under 'Color Management'). [1]

AFAIU Inkscape crashes when searching for installed display profiles (if the setting is '0') and fails to handle profile or path data of certain (potentially broken) color profiles properly (see the backtraces in the related reports [2]), not because a wrong display number is set via preferences. Setting '[x] Retrieve profiles from those attached to displays' (i.e. 'from_display="1"') is known to work around this issue (avoiding the crash).

[1] <http://wiki.inkscape.org/wiki/index.php/Release_notes/0.46#XICC_Support> - I don't know details how this was implemented later on for the Windows port (no X11).

[2] e.g. <https://bugs.launchpad.net/inkscape/+bug/498141/comments/5>

Proposing to link this report as duplicate to bug #498141.

Revision history for this message
su_v (suv-lp) wrote :

Linking as duplicate to bug #498141 - please add a comment here and revert the duplicate status if you don't agree and think these are different issues.

tags: added: win32
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.