Return-Path: X-Original-To: apmail-incubator-ooo-issues-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C732BDA73 for ; Fri, 3 Aug 2012 16:36:23 +0000 (UTC) Received: (qmail 6381 invoked by uid 500); 3 Aug 2012 16:36:23 -0000 Delivered-To: apmail-incubator-ooo-issues-archive@incubator.apache.org Received: (qmail 6340 invoked by uid 500); 3 Aug 2012 16:36:23 -0000 Mailing-List: contact ooo-issues-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-issues@incubator.apache.org Delivered-To: mailing list ooo-issues@incubator.apache.org Received: (qmail 6332 invoked by uid 99); 3 Aug 2012 16:36:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2012 16:36:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.123] (HELO sif.zones.apache.org) (140.211.11.123) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2012 16:36:22 +0000 Received: by sif.zones.apache.org (Postfix, from userid 80) id 1CA854FC0; Fri, 3 Aug 2012 16:36:02 +0000 (UTC) From: bugzilla@apache.org To: ooo-issues@incubator.apache.org Subject: [Bug 120458] New: [PyUNO] freeze on calling methods of method node of Basic (basprov::BasicMethodNodeImpl) Date: Fri, 03 Aug 2012 16:35:58 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: scripting X-Bugzilla-Component: code X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hanya.runo@gmail.com X-Bugzilla-Status: CONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ooo-issues@incubator.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: priority bug_id assigned_to short_desc bug_severity cf_bug_type classification op_sys reporter rep_platform bug_status version component product Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://issues.apache.org/ooo/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/ooo/show_bug.cgi?id=120458 Priority: P3 Bug ID: 120458 Assignee: ooo-issues@incubator.apache.org Summary: [PyUNO] freeze on calling methods of method node of Basic (basprov::BasicMethodNodeImpl) Severity: normal Issue Type: DEFECT Classification: Code OS: All Reporter: hanya.runo@gmail.com Hardware: All Status: CONFIRMED Version: AOO 3.4.0 Component: code Product: scripting When I try to list method names in Basic module using script provider which can be taken from document model by css.script.provider.XScriptProviderSupplier interface. It seems this problem is based on NULL invocation kept by pyuno instance. Here is the result from gdb, first line is the result of print(method_node): pyuno object (com.sun.star.script.browse.XBrowseNode)0x-4f7d2bdc{, supportedInterfaces={com.sun.star.script.browse.XBrowseNode,com.sun.star.script.XInvocation,com.sun.star.lang.XTypeProvider,com.sun.star.uno.XWeak,com.sun.star.beans.XPropertySet,com.sun.star.beans.XFastPropertySet,com.sun.star.beans.XMultiPropertySet}} Program received signal SIGSEGV, Segmentation fault. 0x0608b91e in pyuno::PyUNO_getattr (self=0xb0c5f8b0, name=0x838fa74 "getType") at /mnt/hd/ooo/main/pyuno/source/module/pyuno.cxx:499 warning: Source file is more recent than executable. 499 if (me->members->xInvocation->hasMethod (attrName)) (gdb) p me $1 = (pyuno::PyUNO *) 0xb0c5f8b0 (gdb) p me->members $2 = (pyuno::PyUNOInternals *) 0xb0852648 (gdb) p me->members->xInvocation $3 = { = { _pInterface = 0x0}, } # python macro to reproduce the problem def create(ctx, name, args=None): smgr = ctx.getServiceManager() if args is None: return smgr.createInstanceWithContext(name, ctx) else: return smgr.createInstanceWithArgumentsAndContext(name, args, ctx) def get_basic_macros_provider(ctx, context): return create(ctx, "com.sun.star.script.provider.ScriptProviderForBasic", (context,)) def get_list_of_macros(sp): macros = [] for lib_node in sp.getChildNodes(): print(lib_node.getName()) for module_node in lib_node.getChildNodes(): print(module_node.getName()) for method_node in module_node.getChildNodes(): print(method_node) #print(dir(method_node)) print(method_node.getType()) # segmentation fault #macros.append(method_node.getName(), method_node.getPropertyValue("URI")) return macros def test(*args): ctx = XSCRIPTCONTEXT.getComponentContext() doc = XSCRIPTCONTEXT.getDocument() #sp = get_document_basic_macros_provider(ctx, doc) sp = get_basic_macros_provider(ctx, "user") macros = get_list_of_macros(sp) print(macros) -- You are receiving this mail because: You are the assignee for the bug.