On Sun, 17 Oct 2010, Stefan de Konink wrote:

message 'PrimitiveBlock': missing required field 'stringtable'
Error unpacking PrimitiveBlock message

(gdb) print *hmsg
$3 = {base = {descriptor = 0x406740, n_unknown_fields = 0,
    unknown_fields = 0x0}, bbox = 0x0, n_required_features = 0,
 required_features = 0x0, n_optional_features = 0, optional_features = 0x0,
  writingprogram = 0x0, source = 0x0}

But lets look what is in the raw message:

(gdb) print bmsg.raw
$2 = {len = 56,
data = 0x60b550 "\n\032\b\276\210\360\350B\020\340\220\361\227g\030\236\226\305\344\370\002 \340\347\351\223\340\002\"\016OsmSchema-V0.6\"\nDenseNodes\201\n\002"}

Could it be an empty block?

(It missed a required feature)

If we look at one block after it, which the error actually has:

(gdb) print *bmsg
$1 = {base = {descriptor = 0x4057e0, n_unknown_fields = 0,
    unknown_fields = 0x0}, has_raw = 1, raw = {len = 141264,
    data = 0x7ffff7eaf010 "\n\261D\n"}, has_raw_size = 0, raw_size = 0,
  has_zlib_data = 0, zlib_data = {len = 0, data = 0x0}, has_lzma_data = 0,
  lzma_data = {len = 0, data = 0x0}, has_bzip2_data = 0, bzip2_data = {
    len = 0, data = 0x0}}

The block has raw_size = 0 (that will result in badness!)

Now the question is? I'm trusting raw_size (because it is equal for uncompress and compressed data) and it means the output size. I see that you have only set 'len' of the raw message. While it is set in the compressed case. Why is it 0?


Stefan

_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/dev

Reply via email to