Return-Path: X-Original-To: apmail-avro-dev-archive@www.apache.org Delivered-To: apmail-avro-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0382F10512 for ; Thu, 29 Aug 2013 11:59:58 +0000 (UTC) Received: (qmail 85356 invoked by uid 500); 29 Aug 2013 11:59:57 -0000 Delivered-To: apmail-avro-dev-archive@avro.apache.org Received: (qmail 84741 invoked by uid 500); 29 Aug 2013 11:59:53 -0000 Mailing-List: contact dev-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list dev@avro.apache.org Received: (qmail 84647 invoked by uid 99); 29 Aug 2013 11:59:51 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Aug 2013 11:59:51 +0000 Date: Thu, 29 Aug 2013 11:59:51 +0000 (UTC) From: "Tibor Benke (JIRA)" To: dev@avro.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AVRO-1361) The values of a map are not correct MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AVRO-1361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13753541#comment-13753541 ] Tibor Benke commented on AVRO-1361: ----------------------------------- Thank you very much! It's good to know that it was my mistake and not a bug :) I understood what you wrote and the fixed program works like a charm. But I still get segmentation fault when these lines are in the code: {noformat} avro_value_get_size(&simple_map, &map_size); for (i = 0; i < map_size; i++) { avro_value_get_by_index(&simple_map, i, &tmp, (const char**)&key); avro_value_get_string(&tmp, (const char**)value, &value_size); } {noformat} I still use the 1.7.4 version. I didn't found lot of examples on the internet, so you could use this sample program in the documentation :) > The values of a map are not correct > ----------------------------------- > > Key: AVRO-1361 > URL: https://issues.apache.org/jira/browse/AVRO-1361 > Project: Avro > Issue Type: Bug > Components: c > Affects Versions: 1.7.4 > Environment: Ubuntu 12.10 > Reporter: Tibor Benke > Attachments: main.c, main-fixed.c > > > When I put values into a map, the values appear delayed with one cycle: > // pseudo code > map = Map() > for (i = 0; i < 5; i++) { > map.put(i, i) > } > // then map contains the following elements: {"0": "1", "1": "2", "2": "3", "3": "4", "4": ""} > I wrote a sample code, which demonstrates the bug. I hope I'm not wrong. I have also problems with the reference counting: if I comment out the free() calls in the program, I get glibc errors. Is it possible, that the Avro frees not just its own pointers in the *decref() calls? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira