public inbox for insight-prs@sourceware.org
help / color / mirror / Atom feed
* insight/318: Insight hangs when opening "Target Settings" window
@ 2007-07-28 14:53 bernard.haible
  0 siblings, 0 replies; only message in thread
From: bernard.haible @ 2007-07-28 14:53 UTC (permalink / raw)
  To: insight-gnats


>Number:         318
>Category:       insight
>Synopsis:       Insight hangs when opening "Target Settings" window
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 28 14:53:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Bernard Haible
>Release:        6.6
>Organization:
>Environment:
Windows XP Prof. / Cygwin / ASUS P5B-E
>Description:
Insight hangs when opening the "Target Settings" window.
>How-To-Repeat:

>Fix:
It seems that the problem is located the function itcl::body TargetSelection::port_list in file targetselection.itb. My PC has only one COM port. When searching for COM port 2 to 4, Insight hangs. 

I changed the search loop as follows, allowing quitting the loop after 1 port instead of 4 in the original code. With that change, it runs fine.

  for {set i 1} {!$quit} {incr i} {
    if {[catch { set fd [::open COM$i: RDWR] } msg]} {
      # Failed.  Find out why.
      if {[string first "permission denied" $msg] != -1} {
	# Port is there, but busy right now. That's OK.
	lappend plist /dev/com$i
      } elseif {$i > 1} {
	# if we've scanned the first 1 ports, then quit when we find no more 
	set quit 1
      }
    } else {
      # We got it.  Now close it and add to list.
      close $fd
      lappend plist /dev/com$i
    }
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-28 14:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-28 14:53 insight/318: Insight hangs when opening "Target Settings" window bernard.haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).