Clicking hyperlink to localhost causes Excel to freeze

302 views
Skip to first unread message

John Lattier

unread,
Sep 30, 2021, 5:34:06 PM9/30/21
to igv-help
When I click on a localhost hyperlink, it causes Excel to stall for about a minute. It opens a browser page and hangs up. Old versions of IGV didn't open this browser page. 

I noticed if I close the browser page after I'm done, it will not freeze the next time I click a hyperlink. It only freezes if a browser page is already open and I click on the next one. 

But I can't keep having to close browser pages each and every time. I am hoping there is some kind of setting I can fix. 

Helga Thorvaldsdottir

unread,
Sep 30, 2021, 6:18:08 PM9/30/21
to igv-help
Now I have no idea what you're talking about. Are you launching IGV from a hyperlink, or clicking on a hyperlink in an IGV track. And where does Excel come into it??? Again, screenshots or screencast might be helpful.

John Lattier

unread,
Sep 30, 2021, 8:36:55 PM9/30/21
to igv-help
"Contacting the server for information. Press ESC to cancel." is the error I'm getting in Excel. 

Computer 1 [not working properly] - I'm using the latest version of IGV v2.11, and the latest version of Java v8.0_301, Chrome v94.0.4606.61 , and Excel v16.0.14326.20384 64-bit. 4k monitor. 
Computer 2 [working properly] - All the same except IGV v2.4. 

I open IGV. If I were to just navigate directly to a URL in a web browser like Chrome, such as http://localhost:60151/goto?locus=chr13:32937614, it works fine. But if instead I were to click an Excel hyperlink like this =HYPERLINK("http://localhost:60151/goto?locus=chr13:32937614","13_32937614_G_C"), it will work fine the first time but will leave behind a web page pop up. Then any subsequent hyperlink clicking in Excel will stall the app - Excel (Not Responding) - for about 45 seconds. It will eventually load but prevents me from working on Excel the entire time. I don't know if it's an IGV issue, but this process works fine in v.2.4 with no pop-ups and no delays. Also the issue with tiny font is only on Computer 1. Both are 4k monitors. 

When I watch Task Manager, Computer 1 is using OpenJDK Platform binary to run IGV
Computer 2 uses Java Platform SE binary. 

No idea if that makes any difference. 

James Robinson

unread,
Sep 30, 2021, 11:14:30 PM9/30/21
to igv-help
IGV 2.4 runs on an older version of Java, there are no changes wrt this functionality.  There is no reason for Excel to open a web browser here, so I really don't know what's going on.   We do not use Excel here.

Shaun Bruner

unread,
Mar 4, 2022, 1:50:36 PM3/4/22
to igv-help
Hi John! 

I know this post is old, but that gives me hope you found a solution that works for you. This is the only post after days of searching that mentions my -exact- issue.

We're using IGV v2.3.9,  Java v8.0_301, I use Chrome Canary but the issue happens on all my other browsers and on my boss's machine too, and Excel v2108 Build 14326.20784 through Microsoft 365 Apps for enterprise.

Anything you came across would be a great help. 

Thanks!

James Robinson

unread,
Mar 4, 2022, 2:20:34 PM3/4/22
to igv-...@googlegroups.com
Hi, hopefully John will respond if he found a solution.

We have no expertise in Excel here, nor Microsoft,  but it might be possible to solve this by writing some visual basic to use commands to our port, basically write commands to a socket, rather than using http:// links.   It seems Excel is insisting on opening a browser window when it sees an http link, and waiting for a response.    Secondly, that is a quite old version of IGV.    The latest version might work better, no guarantees, ultimately the issue is in how Excel handles links and probably has to be solved there.

--

---
You received this message because you are subscribed to a topic in the Google Groups "igv-help" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/igv-help/y40SU53EGNg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to igv-help+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/igv-help/d9528161-a62f-43e1-a3d3-3b5ed89ed638n%40googlegroups.com.

Malcolm Cook

unread,
Jan 3, 2023, 2:48:56 PM1/3/23
to igv-help
FWIW: coming late to this thread - but of possible interest to fellow travelers seeking to control IGV from VBA (e.g. in MS{Excel,,Access ,Word}) is the following, which only falls back to following http links on windows when "IO Libraries Suite"  not  installed & registered, or on other OS, (eg MacOS).  Enjoy! 
~Malcolm

Sub IGVLoadURLs()
'PURPOSE: Excel macro to load IGV tracks from all urls in visible selected cells
'AUTHOR: malcolm_cook at stowers.org
    Dim r As Range
    Dim urls As String
    Dim cmd As String
    urls = ""
    For Each r In Selection.SpecialCells(xlCellTypeVisible).Areas
      urls = Application.WorksheetFunction.TextJoin(",", True, urls, Application.WorksheetFunction.TextJoin(",", True, r))
    Next
    If (Application.OperatingSystem Like "Windows*") And ReferenceCheck("VisaComLib") Then
        cmd = "load " & urls
        IGVTell (cmd) 
    Else ' either on a Mac or VisaComLib not installed
        On Error Resume Next
        ActiveWorkbook.FollowHyperlink ("http://localhost:60151/load?file=" & urls)
        If (Err.Number = 5) Then
            MsgBox ("Too many URLS selected - retry with fewer selected")
        End If
    End If
End Sub

Public Sub IGVTell(cmd, Optional host As String = "localhost", Optional port As String = "60151")
'PURPOSE:  On windows, issue the IGV command <cmd> to IGV application (running on <host> listening at <port>).
'          For legal commands, c.f. https://software.broadinstitute.org/software/igv/PortCommands
'REQUIRES: Install "IO Libraries Suite" from https://www.keysight.com/us/en/lib/software-detail/computer-software/io-libraries-suite-downloads-2175637.html
'NOTE:     VBA Examples: https://www.keysight.com/us/en/lib/resources/training-materials/learn-to-control-instruments-with-visual-basic.html
'TODO:     Make IGV connection once only on Excel startup (by rewriting as VBA "Class Module").
    Dim ioMgr As VisaComLib.ResourceManager
    Dim instrument As VisaComLib.FormattedIO488
    Dim response As String
    Set ioMgr = New VisaComLib.ResourceManager
    Set instrument = New VisaComLib.FormattedIO488
    Set instrument.IO = ioMgr.Open("TCPIP::" & host & "::" & port & "::SOCKET") 'c.f. https://pyvisa.readthedocs.io/en/1.8/names.html
    instrument.WriteString cmd & vbCrLf
    ' NB: per IGV documentation: "IGV will write a response back to the port socket upon completion of each command.  It is good practice to read this response before sending the next command.   Failure to do so can overflow the socket buffer and cause IGV to freeze."
    ' however we get error trying (? since write is async and IGV does not reply until load complete).
    ' response = instrument.ReadString()
End Sub

Function ReferenceCheck(refName) As Boolean
' PURPOSE: test whether <refName> is among this VBProject's references
    ReferenceCheck = False 'assume
     For i = 1 To ThisWorkbook.VBProject.References.count
        If ThisWorkbook.VBProject.References(i).Name = refName Then
            ReferenceCheck = True
            Exit For
        End If
   Next i
End Function


John Lattier

unread,
Jun 16, 2023, 1:24:25 PM6/16/23
to igv-help
Never figured out any solution. 

John Lattier

unread,
Aug 23, 2023, 9:43:08 AM8/23/23
to igv-help
We did figure out it is directly correlated with newer versions of Microsoft Office. In older versions of Office, the localhost hyperlink works just fine. 
Message has been deleted

Thaysa Lopes

unread,
Jan 19, 2024, 7:34:42 AM1/19/24
to igv-help
Same thing is happening to me, but I'm not sure it's related to Office. I was running on widows 11 and latest version of Office and I had no issues, then I had to change HD and now on windows 10 (Excel Microsoft 365 MSO version 2312, 64 bits) I'm facing this issue.

I don't get any error messages, it just opens the link into a browser and then after a while it opens on IGV.

I saw Malcolm Cook's reply, but I didn't understand how to proceed (I have zero knowledge on programming, sorry).

If anyone figures out how to solve it, please let us know.

Thanks!

Reply all
Reply to author
Forward
0 new messages