Your message dated Thu, 29 Mar 2018 19:19:32 +0000
with message-id <e1f1d5a-0003zc...@fasolo.debian.org>
and subject line Bug#894206: fixed in dxf2gcode 20170925-3
has caused the Debian Bug report #894206,
regarding dxf2gcode: Traceback related to empty self.geo in polyline and 
lwpolyline
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
894206: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894206
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: dxf2gcode
Version: 20170925-2
Severity: normal
Tags: upstream

Hi,

I managed to crash dxf2gcode in two different, but similar code paths:

Traceback (most recent call last):
  File "/usr/bin/dxf2gcode", line 1198, in <module>
    window.load()
  File "/usr/bin/dxf2gcode", line 844, in load
    self.valuesDXF = ReadDXF(self.filename)
  File "/usr/lib/python3/dist-packages/dxf2gcode/dxfimport/importer.py", line 
85, in __init__
    self.entities = self.Read_Entities(sections_pos)
  File "/usr/lib/python3/dist-packages/dxf2gcode/dxfimport/importer.py", line 
345, in Read_Entities
    sections[section_nr - 1].end - 1)
  File "/usr/lib/python3/dist-packages/dxf2gcode/dxfimport/importer.py", line 
360, in Get_Geo
    entitie_geo = self.get_geo_entitie(len(geos), name)
  File "/usr/lib/python3/dist-packages/dxf2gcode/dxfimport/importer.py", line 
419, in get_geo_entitie
    geo = GeoentLwPolyline(geo_nr, self)
  File 
"/usr/lib/python3/dist-packages/dxf2gcode/dxfimport/geoent_lwpolyline.py", line 
47, in __init__
    self.Read(caller)
  File 
"/usr/lib/python3/dist-packages/dxf2gcode/dxfimport/geoent_lwpolyline.py", line 
196, in Read
    self.geo.append(LineGeo(Ps=Ps, Pe=self.geo[0].Ps))
IndexError: list index out of range

Traceback (most recent call last):
  File "/usr/bin/dxf2gcode", line 1198, in <module>
    window.load()
  File "/usr/bin/dxf2gcode", line 844, in load
    self.valuesDXF = ReadDXF(self.filename)
  File "/usr/lib/python3/dist-packages/dxf2gcode/dxfimport/importer.py", line 
84, in __init__
    self.blocks = self.Read_Blocks(blocks_pos)
  File "/usr/lib/python3/dist-packages/dxf2gcode/dxfimport/importer.py", line 
332, in Read_Blocks
    blocks.Entities[-1].geo = self.Get_Geo(s, e)
  File "/usr/lib/python3/dist-packages/dxf2gcode/dxfimport/importer.py", line 
360, in Get_Geo
    entitie_geo = self.get_geo_entitie(len(geos), name)
  File "/usr/lib/python3/dist-packages/dxf2gcode/dxfimport/importer.py", line 
405, in get_geo_entitie
    geo = GeoentPolyline(geo_nr, self)
  File "/usr/lib/python3/dist-packages/dxf2gcode/dxfimport/geoent_polyline.py", 
line 48, in __init__
    self.Read(caller)
  File "/usr/lib/python3/dist-packages/dxf2gcode/dxfimport/geoent_polyline.py", 
line 215, in Read
    self.geo.append(LineGeo(Ps=Ps, Pe=self.geo[0].Ps))
IndexError: list index out of range

I attached two patches, that fixed both issues for me.

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing'), (250, 'unstable'), (100, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.15.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dxf2gcode depends on:
ii  poppler-utils   0.62.0-2
ii  pstoedit        3.70-5+b1
ii  python3         3.6.4-1
ii  python3-opengl  3.1.0+dfsg-1
ii  python3-pyqt5   5.9.2+dfsg-1

dxf2gcode recommends no packages.

dxf2gcode suggests no packages.

-- no debconf information
--- a/usr/lib/python3/dist-packages/dxf2gcode/dxfimport/geoent_polyline.py      
2018-03-27 12:40:30.372009282 +0200
+++ b/usr/lib/python3/dist-packages/dxf2gcode/dxfimport/geoent_polyline.py      
2018-03-27 12:40:33.796011445 +0200
@@ -209,7 +209,7 @@
                 Ps = Pe
 
         # It is a closed polyline
-        if PolyLineFlag == 1:
+        if PolyLineFlag == 1 and len(self.geo) > 0:
             # print("sollten �bereinstimmen: %s, %s" %(Ps,Pe))
             if next_bulge == 0:
                 self.geo.append(LineGeo(Ps=Ps, Pe=self.geo[0].Ps))
--- a/usr/lib/python3/dist-packages/dxf2gcode/dxfimport/geoent_lwpolyline.py    
2018-03-27 12:42:15.128038514 +0200
+++ b/usr/lib/python3/dist-packages/dxf2gcode/dxfimport/geoent_lwpolyline.py    
2018-03-27 12:42:19.916038148 +0200
@@ -188,7 +188,7 @@
             next_bulge = bulge
             Ps = Pe
 
-        if LWPLClosed == 1 or LWPLClosed == 129:
+        if (LWPLClosed == 1 or LWPLClosed == 129) and len(self.geo) > 0:
             # print("sollten �bereinstimmen: %s, %s" %(Ps,Pe))
             if next_bulge:
                 self.geo.append(self.bulge2arc(Ps, self.geo[0].Ps, next_bulge))

--- End Message ---
--- Begin Message ---
Source: dxf2gcode
Source-Version: 20170925-3

We believe that the bug you reported is fixed in the latest version of
dxf2gcode, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 894...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sebastian Kuzminsky <s...@highlab.com> (supplier of updated dxf2gcode package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 29 Mar 2018 20:59:36 +0200
Source: dxf2gcode
Binary: dxf2gcode
Architecture: source
Version: 20170925-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Science Maintainers 
<debian-science-maintainers@lists.alioth.debian.org>
Changed-By: Sebastian Kuzminsky <s...@highlab.com>
Description:
 dxf2gcode  - prepares drawings of parts for automatic machine tools
Closes: 894206
Changes:
 dxf2gcode (20170925-3) unstable; urgency=medium
 .
   * Fix problems with importing PolyLines and LWPolyLines (Closes: 894206)
   * Build-depend on dh-python.
Checksums-Sha1:
 e84f54fbadecc9b1788fcd61634ac6fea47d7bbe 2064 dxf2gcode_20170925-3.dsc
 d3642232a07f33392c75de52e31801dc18e6a0a8 13236 
dxf2gcode_20170925-3.debian.tar.xz
 155d1b4072483d5254156c9c634814d99b29c8bd 9813 
dxf2gcode_20170925-3_amd64.buildinfo
Checksums-Sha256:
 f59ad04fe37015bade6e5f0dcf93deab5091b3d4aed6d16fdc91017e47e2c7ed 2064 
dxf2gcode_20170925-3.dsc
 d566878cd888f5b1764f1213ad5f5cc41bb51f69e8cafe8c730c4095075a0589 13236 
dxf2gcode_20170925-3.debian.tar.xz
 7734a4819366e29dd89e2ad85ca18a72ef57537fb4a9ac7e50d300f4608779f9 9813 
dxf2gcode_20170925-3_amd64.buildinfo
Files:
 e4eaee126c8b69a535389154229e60fe 2064 science optional dxf2gcode_20170925-3.dsc
 ebe5b8033dae5c3a8958d9271f3713fc 13236 science optional 
dxf2gcode_20170925-3.debian.tar.xz
 d5133c1eade03b46573aee4744bbb1e9 9813 science optional 
dxf2gcode_20170925-3_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEU5UdlScuDFuCvoxKLOzpNQ7OvkoFAlq9OWQACgkQLOzpNQ7O
vko0Kg//RBfWaSt50QQvLX5S3qKtyhgIATK54xENdj+CYv+XoYsDTKEGr3iaKEOl
7MhLtWwba5ZGSUBXLOI9drRbK7f+b31oegnpSL05B61RWy72STrs6VdqcS40HKRD
gIPkgEQiQMYEdBnF337AzGGlr0SsBWACjII9m2Sm2pFxnCBQYFRBCyS3vNEb4n6r
FfLc8T9DOyf9yeCtwqnRnYJVsglS6+AGV27GvfGd50M7hNqqcV7SJ782beM+w0Vd
XaPYaQ/HVNSyPPdPLh6aE/27pOiJ3XSPL4XmHAW+4nE2Q/+2XUrkV1jWsvkBcrF0
x7JCOSwJP3f7T5UhuqP+WlUbsva1qblGGae4tg2bemL4X4cqia6OrKQFc8+N2aoO
GpKRNbPnyoUvtWfEW6D0beRx+yA34lVMHVEFfyoj9rLTcoPbI4nsoEdHQLREwpER
ejZCIUk+CGuXfJciclttvI9E2P6sEyYBe96vIQqf5fknjxvmr9cxEyTMMCEV+wFY
lzBKa443Jb0zOiH1l4whoclZdHf/Mflo9v3PECf50uwLVuMpqID6nW8Uw/DPT5DG
fFMWU3/qdhn93qY7M+I5oCR6jRgVjd9AnG+dECfMYzl8F71sEyeDker7la50EOdp
HsdGKsawUyKdTqnZK5gfROgA8lecFZS8jEc5g11n4mdpZJ2qHIk=
=Uo9N
-----END PGP SIGNATURE-----

--- End Message ---
-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to