diff --git a/bin/curvecalc b/bin/curvecalc --- a/bin/curvecalc +++ b/bin/curvecalc @@ -15,7 +15,7 @@ from twisted.internet import gtk2reactor gtk2reactor.install() from twisted.internet import reactor -import time, textwrap, os, optparse, urllib2, gtk, gobject, linecache, signal +import time, textwrap, os, optparse, urllib2, gtk, gobject, linecache, signal, traceback import louie as dispatcher from twisted.python.util import sibpath from rdflib import URIRef, Graph, Literal, RDF, RDFS @@ -198,6 +198,11 @@ class Main(object): try: linecache.clearcache() reload(curveview) + + # old ones are not getting deleted right + if hasattr(self, 'curvesetView'): + self.curvesetView.live = False + # mem problem somewhere; need to hold a ref to this self.curvesetView = curveview.Curvesetview( curvesVBox, zoomControlBox, self.curveset) @@ -209,7 +214,8 @@ class Main(object): # ok. You'll just get some wasted redraws. self.curvesetView.goLive() except Exception, e: - print "reload failed:", e + print "reload failed:" + traceback.print_exc() if self.opts.reload: reactor.callLater(1, self.refreshCurveView) @@ -248,9 +254,6 @@ def main(): curveset = Curveset(sliders=opts.sliders) subterms = [] - # curvesetview must already exist, since this - # makes 'add_curve' signals for all the initial - # curves. curveset.load(basename=os.path.join( showconfig.curvesDir(), showconfig.songFilenameFromURI(song)),