Bug 1011134

Summary: [abrt] pronterface-0.0-32.20130711gitb8f549b.fc18: stltool.py:121:__init__:error: unpack_from requires a buffer of at least 4 bytes
Product: [Fedora] Fedora Reporter: novikovfb
Component: printrunAssignee: Miro Hrončok <mhroncok>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: mhroncok, novikovfb
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:79c1c333f91a5eb60aaed3572f111ea476859220
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-26 16:04:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: dso_list
none
File: environ none

Description novikovfb 2013-09-23 16:25:30 UTC
Version-Release number of selected component:
pronterface-0.0-32.20130711gitb8f549b.fc18

Additional info:
reporter:       libreport-2.1.6
cmdline:        /usr/bin/python /usr/bin/pronterface
executable:     /usr/bin/pronterface
kernel:         3.10.11-100.fc18.i686
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
stltool.py:121:__init__:error: unpack_from requires a buffer of at least 4 bytes

Traceback (most recent call last):
  File "/usr/bin/plater.py", line 404, in right
    self.load_file(event, name)
  File "/usr/bin/plater.py", line 409, in load_file
    self.load_stl(event, filename)
  File "/usr/bin/plater.py", line 449, in load_stl
    self.load_stl_into_model(name, name)
  File "/usr/bin/plater.py", line 460, in load_stl_into_model
    self.models[newname] = stltool.stl(path)
  File "/usr/lib/python2.7/site-packages/printrun/stltool.py", line 121, in __init__
    facetcount = struct.unpack_from("<I", buf, 80)
error: unpack_from requires a buffer of at least 4 bytes

Local variables in innermost frame:
f: <open file u'/home/fedia/Projects/gear1.stl', mode 'rb' at 0xa02ac28>
buf: ''
self: <printrun.stltool.stl object at 0xa04532c>
filename: u'/home/fedia/Projects/gear1.stl'
data: ''
newdata: ''

Comment 1 novikovfb 2013-09-23 16:25:34 UTC
Created attachment 801762 [details]
File: backtrace

Comment 2 novikovfb 2013-09-23 16:25:38 UTC
Created attachment 801763 [details]
File: dso_list

Comment 3 novikovfb 2013-09-23 16:25:46 UTC
Created attachment 801764 [details]
File: environ

Comment 4 Miro Hrončok 2013-09-25 09:48:40 UTC
Can you please share the file you've tried to open?

Comment 5 novikovfb 2013-09-25 16:10:12 UTC
Probably i had invalid *.stl file:
Once i run export 3d-model as STL, don't wait for the end and try load it.
I couldn't repproduce this error.

Comment 6 Miro Hrončok 2013-09-25 17:56:45 UTC
So the only problem is, that incorrect STL kills the app instead of showing a decent error? Should I try fix it?

Comment 7 novikovfb 2013-09-26 16:46:26 UTC
I think, there should be more clear message, than ignoring of the file and emergence of a system error message for sysadmin. If you can do it - please, fix it.

Comment 8 Miro Hrončok 2013-09-27 09:17:50 UTC
https://github.com/kliment/Printrun/pull/436