Comments (9)
Hi Chris
I have never tested this functionality since it was built in before I
started to improve GCViewer. So it might be that I broke something
there. The code opening files from URLs should be the same if open from
GUI or commandline.
What error message do you get? Does your file open when you use the GUI?
Why do you replace '' with '/'? '' should never be part of a URL.
Regards, Jörg
from gcviewer.
Hi, When I try it without my change I get an occasional hang (something to do with user preferences) and the last time it tried to load the URL from the current directory so in this case failed to read file C:\MemoryApps\http:\localhost:8080\LastGC.log
Looking at the code I couldn't see it working it seemed to just pass the argument to the method expecting a file name.
With the change I have it working though I got an occasional fail to read the file (my jnlp passes a null argument) (it may be a webstart bug as there was one reported around these lines though I thought it fixed), so I have now changed to passing and reading a system property from within the JNLP to gcviewer and that works every time.
I still am investigating an issue where I have an occasional issue where it fails to read user preferences and null pointers on loading recentURLs, I've changed the code to just empty string if it can't load from the file rather than crash and that works fine.
My use case is as part of my test results I have a web page of GC logs, I previously had the option to copy the link as an URL into gc viewer manually which does work but it was suggested if I could web start gcviewer and pass the URL requested in that would be nicer and I do have it working in principle.
thanks for the reply
Chris
PS I needed the replace but that may just have been with the way I was testing, I don't need that replace in real world usage.
from gcviewer.
Hi Chris,
Ok, I have (finally) found the place in the code you are pointing at. It indeed won't work with URLs - I think it should so I marked this issue a bug.
You seem to have found a second issue with those occasional hangs / NullPointerExceptions. Does it occur when there is no gcviewer.properties file available? Is there a way to reproduce this hang / NPE?
Regards, Jörg
from gcviewer.
Hi,
With regard to the NPE , I suspect its how I was using it, I appear to have corrupted the gcviewer.properties with the URLS I have saved (recent URLS). So when it loadPreferences it loads the file but mis interprets some of my recent urls as null some how .
In the gcviewer code in RecentURLsMode.java URLSet createSortedFileStrings this fixes the issue fileStrings[i] = (urls[i] != null) ? urls[i].toString() : ""; I'd rather it lost my recent urls than crashed.
I suspect its something to do with my use case and I may be able to clean up my URLs (escape remove some parameters) to get round it (its had no trouble using the URL to read the file, just this preference loading bit when you stop and come back into gcviewer).
With regard to the parameter I am still using my change to a system property for the filename as webstart has not been reliable for me in passing a command line parameter, I am, still investigating it but I have seen accounts of others with the same issue.
from gcviewer.
Sorry didn't mean the close .. lol
from gcviewer.
Hi Chris,
I have pushed fixes to support URLs from the command line and prevention of the NPE when gcviewer.properties contains corrupt entries.
Does it now work for you?
Regards, Jörg
from gcviewer.
Hi,
Thanks for the effort.I'm testing now and will get back to you.
Chris
from gcviewer.
Hi,
Just to confirm I have been using the latest version for a couple of days without issue.
Chris
from gcviewer.
Hi Chris,
Thank you very much for reporting and testing!
Regards, Jörg
from gcviewer.
Related Issues (20)
- Total promotion can get negative HOT 8
- 时间区间缺少png自动选择功能 HOT 1
- Error parsing openjdk 11 logs HOT 1
- OpenJDK - additional tags fail parsing HOT 1
- SEVERE [DataReaderFactory]: Failed to recognize file format. HOT 5
- macOS - Application hangs when quitting
- Error when open file HOT 2
- Parse problem for Java 11 Unified GC logging format HOT 1
- GCViewerForQianKunZhao HOT 1
- What do you think of changing the license to Apache 2.0? HOT 3
- Failed to parse gc event "Merge Heap Roots" on Adopt OpenJDK 17 HOT 1
- The reported freed memory is incorrect
- Java 17 ready version ? HOT 1
- Tenured Generation graph not showing up when using openJDK 11 HOT 2
- The environment variable JAVA_HOME is not correctly set. HOT 1
- Wrong graph display when open series HOT 4
- Parse xml G1GC on openjdk9 error
- Interactive Action of mouse movement on chart HOT 2
- Support graphical display of metaspace? HOT 1
- Release 1.37
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gcviewer.