Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException if sending goto action to CommandListener when starting up IGV #1597

Open
jesper-molin opened this issue Oct 8, 2024 · 0 comments

Comments

@jesper-molin
Copy link

IGV CommandListener stops working sometimes when sending sync commands during startup. It looks like in the logs that it happens if a sync command is sent before a genome is loaded for the first time.

IGV version 2.18.4

Steps to reproduce

  1. Ensure that CommandListener is enabled (View > Preferences > Advanced > Enable port)
  2. Close down IGV
  3. Run a script that sends a goto request to the CommandListener at localhost:60151 e.g. a GET /goto?locus=X:67545317 HTTP/1.1 every 200ms
  4. Open IGV

Observed behavior
IGV does not sync to the position once started, and it is not possible to perform any sync commands without restarting IGV. Log message:

INFO [Oct 08,2024 16:35] [Main] Startup  IGV Version 2.18.4 10/03/2024 09:12 AM
INFO [Oct 08,2024 16:35] [Main] Java 17.0.9 (build 17.0.9+9) 2023-10-17
INFO [Oct 08,2024 16:35] [Main] Java Vendor: Eclipse Adoptium https://adoptium.net/
INFO [Oct 08,2024 16:35] [Main] JVM: OpenJDK 64-Bit Server VM Temurin-17.0.9+9   
INFO [Oct 08,2024 16:35] [Main] OS: Windows 11 10.0 amd64
INFO [Oct 08,2024 16:35] [Main] IGV Directory: C:\Users\<Removed>\igv
INFO [Oct 08,2024 16:35] [Main] Resoluction scale = 2.0
INFO [Oct 08,2024 16:35] [OAuthUtils] Loading Google oAuth properties
INFO [Oct 08,2024 16:35] [CommandListener] Listening on port 60151
INFO [Oct 08,2024 16:35] [CommandListener] OPTIONS /goto?locus=X:67545317 HTTP/1.1
INFO [Oct 08,2024 16:35] [CommandListener] GET /goto?locus=X:67545317 HTTP/1.1
SEVERE [Oct 08,2024 16:35] [DefaultExceptionHandler] Unhandled exception
SEVERE [Oct 08,2024 16:35] [DefaultExceptionHandler] java.lang.NullPointerException: Cannot invoke "org.broad.igv.feature.genome.Genome.getHomeChromosome()" because the return value of "org.broad.igv.feature.genome.GenomeManager.getCurrentGenome()" is null
	at org.igv/org.broad.igv.ui.commandbar.IGVCommandBar.searchByLocus(IGVCommandBar.java:325)
	at org.igv/org.broad.igv.ui.IGV.goToLocus(IGV.java:1085)
	at org.igv/org.broad.igv.batch.CommandListener.processGet(CommandListener.java:433)
	at org.igv/org.broad.igv.batch.CommandListener.processClientSession(CommandListener.java:249)
	at org.igv/org.broad.igv.batch.CommandListener.run(CommandListener.java:140)Open 
	at java.base/java.lang.Thread.run(Unknown Source)
INFO [Oct 08,2024 16:35] [GenomeManager] Loading genome: C:\Users\je-mol\igv\genomes\hg38.json
INFO [Oct 08,2024 16:35] [TrackLoader] Loading resource:  https://hgdownload.soe.ucsc.edu/goldenPath/hg38/database/ncbiRefSeq.txt.gz

Expected behavior
Sync commands should be ignored until IGV is ready to accept them, then it should sync

Consequence
It makes it difficult to synchronize position from another application, since IGV silently crashes if the user happen to open IGV after starting sync in the other application.

I have tried to get it to crash in other genome loading scenarios, but it seems like it only happens at startup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant