Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'bug': 0.02; 'debug': 0.03; 'python': 0.08; 'garbage': 0.09; 'received:209.85.160.174': 0.09; 'received:mail-gy0-f174.google.com': 0.09; 'def': 0.13; '#this': 0.16; 'class:': 0.16; 'foo(object):': 0.16; 'from:name:mark hammond': 0.16; 'matteo': 0.16; 'received:192.168.0.9': 0.16; 'reply-to:addr:mhammond': 0.16; 'reply-to:addr:skippinet.com.au': 0.16; 'symptoms': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; 'that?': 0.18; 'seems': 0.20; 'cc:no real name:2**0': 0.20; 'seconds': 0.21; 'header:In-Reply-To:1': 0.22; 'cc:2**0': 0.24; 'suspect': 0.24; "i'm": 0.26; 'remote': 0.28; 'all,': 0.28; 'problem': 0.29; 'cc:addr:python.org': 0.29; 'error': 0.29; 'pm,': 0.29; 'class': 0.29; 'certainly': 0.32; 'message-id:@gmail.com': 0.33; 'header:User-Agent:1': 0.33; 'received:209.85.160': 0.33; 'object': 0.33; 'away.': 0.34; '...': 0.36; 'but': 0.37; 'received:192': 0.37; 'received:google.com': 0.37; 'some': 0.38; 'received:192.168.0': 0.38; 'received:209.85': 0.38; 'mark': 0.39; 'help': 0.39; "it's": 0.40; 'received:209': 0.40; 'received:192.168': 0.40; 'our': 0.64; 'dangerous': 0.64; 'show': 0.67; 'header:Reply-To:1': 0.71; 'reply-to:no real name:2**0': 0.72; 'subject:com': 0.84; 'deciding': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=v9ExBkzT/+84flAYpWtlyBI2UzMIKZxoVgrRAwNsyLQ=; b=R/JQU+XGhCzxLicyEq3e/9ZEBMUlbSr4TKuMyrYk8RwWNBxS4RXqBmPx/tdqDw1yU0 7FDNPdrtxzUobw1bNLQwdO7h3bIADUpQMpMG9kF4UCB1UEEvzZRey03L4ljs6nQlQjHw yCdeiKYmA4Xh5KItbu/PjfnQ6P5t9wCdw92nw= Date: Thu, 08 Dec 2011 15:46:59 +1100 From: Mark Hammond User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Matteo Boscolo Subject: Re: Losing com pointer References: <4EDF2254.2030809@boscolini.eu> In-Reply-To: <4EDF2254.2030809@boscolini.eu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: mhammond@skippinet.com.au List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 44 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1323319646 news.xs4all.nl 6989 [2001:888:2000:d::a6]:39723 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:16801 On 7/12/2011 7:22 PM, Matteo Boscolo wrote: > Hi all, > I need some help to a com problem.. > > I got this class: > > class foo(object): > def setComObject(comObject): > self.comO=comObject #This is a com object from a cad application > > def showForm(self) > # use the self.comO to read some information from the cad application > # Show the pyqt form as child of cad application > # do somthing with the form > # do somthing with the self.comO <----- Here if pass some time I'm not > able to call any method to the com object What are the symptoms of that? ie, what error do you get? I suspect the remote process is going away - it almost certainly has nothing to do with Python itself deciding to make the object go away. Mark > > a=foo() > o="get istance of a cad application via com" > a.setComObject(o) > a.showForm() #<---- here if pass some time I'm not able to call any > method to the com object > > but I I' re call the > a.setComObject(o) #Faster and I take less the 30 seconds on the form > object it works well > > It seems a problem of the garbage collector .. but I'm not sure how to > debug it .. > > any help is really appreciated.. it's the last dangerous bug in our > application ... > > Regards, > Matteo