DataMatrix error with size >48

Bug #623886 reported by efa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Medium
Unassigned

Bug Description

Secting size >48, I got always this error:

Unrecognised DataMatrix size

Traceback (most recent call last):
  File "render_barcode_datamatrix.py", line 652, in <module>
    e.affect()
  File "D:\Programmi\Inkscape\share\extensions\inkex.py", line 215, in affect
    self.effect()
  File "render_barcode_datamatrix.py", line 647, in effect
    encoded = encode( so.TEXT, (so.ROWS, so.COLS) ) #get the pattern of squares
  File "render_barcode_datamatrix.py", line 68, in encode
    data_nrow, data_ncol, reg_row, reg_col, nd, nc, inter = get_parameters( nrow, ncol )
TypeError: 'NoneType' object is not iterable

insisting to use big numbers (>144), lead to crash Inkscape.

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

- cannot reproduce this problem using text value 'Inkscape', using 72 rows, 72 columns and size of 4 pixels.
- could you provide details of OS, version of Inkscape, and data used in test?

jazzynico (jazzynico)
Changed in inkscape:
importance: Undecided → Medium
tags: added: extensions-plugins
Revision history for this message
jazzynico (jazzynico) wrote :

Not reproduced on Windows XP, Inkscape 0.48, with values 48x48, 72x72, 96x96 and 144x144.

Reproduced with other (probably invalid) values such as 100x100 or 49x49...
I'm not a datamatrix expert and don't know if the specs allow only a set of values, but if it's the case, the extension should show a list of restricted values in order to prevent users from using invalid numbers.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

I also cannot reproduce this bug using inkscape_0.48.1-2ubuntu1 in Ubuntu Natty.

I think this must be a duplicate of the newly-reported bug #738108. The datamatrix extension prints the "Unrecognised DataMatrix size" message only if the row/col combination is invalid (render_barcode_datamatrix.py: 94-171), and doesn't check the pixel size.

I'll mark this as a duplicate, but please feel free to revert the duplicate status if I'm mistaken.

Revision history for this message
efa (efa) wrote :

Linux 01ath3200 2.6.35-24-generic #42-Ubuntu SMP Thu Dec 2 01:41:57 UTC 2010 i686 GNU/Linux
I had not tested on Win32.
Inkscape just crashed pressing Apply with 49x49, Square size /px 4, without preview checked.
The crash doesn't always happen, seems only after selecting big matrix values.
The error is different than #738108 (when the "Unrecognised DataMatrix size" error dialog appear, Inkscape doesn't crash).

Revision history for this message
efa (efa) wrote :

Inkscape 0.48.0-1ubuntu1.1 on 10.010 - Maverick Meerkat

Revision history for this message
efa (efa) wrote :

again with Square size / px: 1
The error on the console:

efa@01ath3200:~$ inkscape

(inkscape:2571): GLib-CRITICAL **: g_main_loop_run: assertion `loop != NULL' failed

Emergency save activated!

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Hi efa,

Just to clarify, Inkscape doesn't crash in bug #738108. It's just the datamatrix extension that returns an error dialog.

I still think that this bug may be a duplicate. The problem is that the extension only accepts a few different dimensions (listed below).

Please could you test...
* If you select 48x48, this should work correctly, regardless of the "square size/px" parameter
* If you select 49x49, this is an invalid datamatrix dimension, so you should get the error dialog, regardless of the square size/px.
* If you select 104x104, this should work correctly, regardless of the "square size/px" parameter

== Square symbols ==
10x10
12x12
14x14
16x16
18x18
20x20
22x22
24x24
26x26
32x32
36x36
40x40
44x44
48x48
52x52
64x64
72x72
80x80
88x88
96x96
104x104
120x120
132x132
144x144

== Rectangular symbols ==
8x18
8x32
12x26
12x36
16x36
16x48

Revision history for this message
efa (efa) wrote :

this is what I would expect it to happen.

Extensive testing I saw that when the error "Unrecognised DataMatrix size" is show, Inkscape never crashed.
After that, sometime (with invalid datasize only), no error is show, but Inkscape crashed/freeze.
The error on the console show something related to Glib main loop.

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.