Strange random error message

Bug #347987 reported by Guillermo Espertino (Gez)
4
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Medium
Ted Gould

Bug Description

I'm getting this message randomly:

Traceback (most recent call last):
  File "/media/material/inkscape/inkscape/build/../install/share/inkscape/extensions/gimp_xcf.py", line 173, in <module>
    e.affect()
  File "/media/material/inkscape/inkscape/install/share/inkscape/extensions/inkex.py", line 198, in affect
    self.effect()
  File "/media/material/inkscape/inkscape/build/../install/share/inkscape/extensions/gimp_xcf.py", line 167, in effect
    x = open(xcf, 'r')
IOError: [Errno 2] No such file or directory: '/tmp/tmpSpY7Md/ink_ext_XXXXXX.svgIF.xcf'

It popped up when I was working with the calligraphy tool.
I'm seeing that it mentions the gimp_xcf.py extension, but I didn't saved as XCF or did anything related to XCF files.

---

Ubuntu 8.10 - 64 bit
Inkscape 0.46+Devel

description: updated
Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

Hmm. This is weird.
I've just seen a previous report about an error in the XCF exporter and the error message looks very similar.

It's not a duplicate because is triggered by different circumstancies, but maybe it's related.
The other bug is #285558

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

More information:
I receive this in the console every time the error message pops up:

Can't Spawn!!! spawn returns: 8

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

on your File | Save As... menu, does gimp_xcf show up as a valid export file type? I don't have this option available to me because I don't have gimp installed. Do you have gimp?

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

Yes Alvin. I have GIMP, the XCF exporter is there and works (it was a tad broken a couple of revisions ago but it works fine now).

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

it might be interesting to temporarily rename the file gimp_xcf.py and see what effect that has on the error message.

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

That was exactly what I thought. I'll try again just to be sure, but iirc Inkscape hanged when I did that (possibly in the precise moment when I get the error with gimp_xcf.py in its right place).
It's weird because the message appears but I didn't use any feature that could link to that extension. Maybe there's a call to that extension in the wrong place.

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

I think I'm getting closer.
I notice that I don't get these errors and warnings in my other computer, which hasn't a tablet. Using the same files, the same compilation, the same operating system and very similar system specifications.
Is it possible to be the tablet what's causing this?
I had this errors last time I tried:

---

** (inkscape:22383): WARNING **: Snap window was already open! This is a bug, please report it.

** (inkscape:22383): WARNING **: -----> sp_nodepath_generate_helperpath(SPDesktop *desktop, SPItem *item): TODO: generate the helper path for this item type!

** (inkscape:22383): WARNING **: Failed to create path: invalid data in dc->cal1 or dc->cal2

Can't Spawn!!! spawn returns: 8

inkscape: Fatal IO error 11 (Recurso temporalmente no disponible) on X server :0.0.

---

The last one is in spanish, but I think is pretty understandable. The spanish part means: "resource temporarily not available). The main difference regarding X server between the different computers is the tablet.

Changed in inkscape:
assignee: nobody → jon-joncruz
Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

After a clean build and re-generation of the preferences from scratch the bug seems to be gone.
I'm marking this as fixed.

Changed in inkscape:
status: New → Fix Released
Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

After creating a duplicate of a bug I started myself (d'oh!) I'm reopening this because the bug came back shortly after it was apparently fixed by erasing the preferences.
Fortunately Ted Gould created a patch that would fix this bug so I'm testing it.
So far so good. I didn't get the message anymore.

I'm attaching the fixed gimp_xcf.py extension. I'll test it for a couple of days and I'll mark this as fix commited if nothing goes wrong.

Changed in inkscape:
status: Fix Released → Confirmed
importance: Undecided → Medium
Changed in inkscape:
assignee: Jon A. Cruz (jon-joncruz) → nobody
Revision history for this message
su_v (suv-lp) wrote :

I get the following error when trying to save a test SVG drawing (with 3 objects on 3 separate layers) as 'GIMP XCF maintaining layers (*.XCF)' file (grid/guidelines options _not_ checked when asked while exporting) with attached py-extension installed in '~/.config/inkscape/extensions':

Inkscape has received additional data from the script executed. The script did not return an error, but this may indicate the results will not be as expected.

Traceback (most recent call last):
  File "/Users/suv/.config/inkscape/extensions/gimp_xcf.py", line 174, in <module>
    e.affect()
  File "/Users/suv/Applications/Inkscape-047pre1-2.app/Contents/Resources/extensions/inkex.py", line 198, in affect
    self.effect()
  File "/Users/suv/.config/inkscape/extensions/gimp_xcf.py", line 168, in effect
    x = open(xcf, 'r')
IOError: [Errno 2] No such file or directory: '/var/folders/Bx/BxOeEE6mE3OWCL6lydnpAE+++TQ/-Tmp-/tmptKMn8y/inkscape_gimp_xcf_tmpIWe1XAxcf'

LeWitt:-Tmp- suv$ ll tmptKMn8y/
total 144
-rw-r--r-- 1 suv staff 52 Jul 25 21:21 junk_from_gimp.txt
-rw-r--r-- 1 suv staff 34975 Jul 25 21:21 layer1.png
-rw-r--r-- 1 suv staff 18202 Jul 25 21:21 layer2.png
-rw-r--r-- 1 suv staff 9472 Jul 25 21:21 layer3.png
LeWitt:-Tmp- suv$

The export fails and no '(path_to/filename).xcf' is created.

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

I'm still getting errors with the attached extension too, but the strange thing is that they're still popping up when I'm doing anything, not only when I export to xcf.

The last error was:
/usr/share/inkscape/extensions/gimp_xcf.py:98: DeprecationWarning: os.popen3 is deprecated. Use the subprocess module.
  _,f,err = os.popen3(command,'r')
Traceback (most recent call last):
  File "/usr/share/inkscape/extensions/gimp_xcf.py", line 174, in <module>
    e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 198, in affect
    self.effect()
  File "/usr/share/inkscape/extensions/gimp_xcf.py", line 168, in effect
    x = open(xcf, 'r')
IOError: [Errno 2] No such file or directory: '/tmp/tmpLMtw4q/inkscape_gimp_xcf_tmpsPqYY_xcf'

It looks pretty much the same that ~suv is getting (I copied the extension to /usr/share/inkscape/extensions).
The result is also the same (almost) when I try to save an XCF file. It gaves that error and saves an empty file (0 bytes).

With the previous version of the script It gave me the error but at least it saved the file after that.

Changed in inkscape:
assignee: nobody → Ted Gould (ted)
Revision history for this message
Alvin Penner (apenner) wrote :

are you running Python 2.6?
that is probably the source of the deprecation warning for os.popen3, which you can probably ignore.

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

@Gez - I read the conversation you had on irc - tedg mentioned clipboard helpers that could trigger the xcf-export-extension: Do you use Parcellite? See bug #312286 and bug #399149 how it can interfere with Inkscape's internal clipboard handling. Does disabling it stop the popup msgs from gimp_xcf.py?

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

Alvin:
It's kinda hard to ignore. The error window pops up again and again every time you close it, and you have to kill inkscape and restart it. Anyway, when I had Ubuntu Intrepid I got the same error message (without the os.popen3 part).

~suv: The error appears with or without parcellite running. So I guess it's not related at all. BTW, I'm using the svn version of parcellite, which has most of the clipboard+graphics issues solved.

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

sorry, I misspoke myself. What I meant to say is that the deprecation warning is not the real problem. These deprecation warnings have shown up recently in other extensions like restack, and they are fixable. But unfortunately the real problem is why is the extension being triggered in the first place.

Revision history for this message
inkblotter (inkbottle) wrote :

** (inkscape:22383): WARNING **: Failed to create path: invalid data in dc->cal1 or dc->cal2

this warning is still generated whenever running inkscape.

on a i7 920, 64-bit install of fedora 11, freshly installed over the weekend.

most recently built inkscape at revision 21968

Appears in almost any invocation of inkscape with simple graphic shapes.

This must be a logic error in the code.

Will investigate.

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

@inkblotter: your description matches bug #247166, please add any additional information you might gain to that bug if you think it's the same issue.

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

or not...'

that error message comes from 'dyna-draw-context.cpp'
<http://inkscape.svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/src/dyna-draw-context.cpp?revision=20893&view=markup> line 842
which is commented as 'Handwriting-like drawing mode' - is this a tablet related functionality?

Revision history for this message
inkblotter (inkbottle) wrote : Re: [Bug 347987] Re: Strange random error message

No tablet. Very simple shapes with mouse cause this output. I may be
that I was using the calligraphic tool. I put my report in this bug
because the warning appeared in this bug. I'll see if I can track
down the circumstances more exactly.

On 08/03/2009 02:11 PM, ~suv wrote:
> or not...'
>
> that error message comes from 'dyna-draw-context.cpp'
> <http://inkscape.svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/src/dyna-draw-context.cpp?revision=20893&view=markup> line 842
> which is commented as 'Handwriting-like drawing mode' - is this a tablet related functionality?
>
>

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

I was wrong, sorry, and hit the 'Save Changes' button prematurely before I realized that Gez had reported the same messages above. Google showed me just the 3 hits for the error string - the 2 bugs and the doxygen documentation of dyna-draw-context.cpp.

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

I found what triggers this error and other directly related.
As ~suv pointed out in bug #418242, the problem is related to the copy operation. But further investigation showed me that the problem was being triggered by a running Java program (FreeRapid in my case).
When I kill Java inkscape goes back to normal.
In my case the problem is caused copy+java program running.
It's something with inkscape's clipboard management, since no other application seems to have problems with copy and paste with that program running.

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.