From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8641 invoked by alias); 25 Jul 2007 12:07:10 -0000 Received: (qmail 8366 invoked by uid 22791); 25 Jul 2007 12:07:07 -0000 X-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO X-Spam-Check-By: sourceware.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (83.160.170.119) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 25 Jul 2007 12:07:05 +0000 Received: from dijkstra.wildebeest.org ([192.168.1.29]) by gnu.wildebeest.org with esmtp (Exim 4.43) id 1IDfgS-0005K8-Fb for frysk@sourceware.org; Wed, 25 Jul 2007 14:09:41 +0200 Subject: [patch] PickProcDialog vs Proc.getExe() From: Mark Wielaard To: frysk@sourceware.org In-Reply-To: <1185364424.3597.18.camel@dijkstra.wildebeest.org> References: <20070718191111.26695.qmail@sourceware.org> <1185364424.3597.18.camel@dijkstra.wildebeest.org> Content-Type: text/plain Date: Wed, 25 Jul 2007 12:07:00 -0000 Message-Id: <1185365221.3597.25.camel@dijkstra.wildebeest.org> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: 7bit X-Spam-Score: -4.4 (----) X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2007-q3/txt/msg00172.txt.bz2 Hi, On Wed, 2007-07-25 at 13:53 +0200, Mark Wielaard wrote: > This break FryskGui which isn't prepared to handle null from Proc.get(). Here is a workaround for at least one case (there might be others, but I haven't looked too deeply yet). This gets FryskGui up and running again for me. 2007-07-25 Mark Wielaard * PickProcDialog.java (ProcCreatedObserver.run): Check whether Proc.getExe() returns null before constructing File path. Cheers, Mark diff -u -r1.12 PickProcDialog.java --- frysk-gui/frysk/gui/monitor/PickProcDialog.java 30 Jan 2007 00:18:21 -0000 1.12 +++ frysk-gui/frysk/gui/monitor/PickProcDialog.java 25 Jul 2007 11:55:53 -0000 @@ -355,11 +355,14 @@ { iterMap.put(proc.getCommand(), process); treeStore.setValue(process, nameDC, proc.getCommand()); - File path = new File(proc.getExe()); - - if (path != null) - treeStore.setValue(process, locationDC, - justPath(path.getPath(), path.getName())); + + String exe = proc.getExe(); + if (exe != null) + { + File path = new File(exe); + treeStore.setValue(process, locationDC, + justPath(path.getPath(), path.getName())); + } else treeStore.setValue(process, locationDC, "");