From abc33adbfda66c950fc0da6cb9d226e4c8aba298 Mon Sep 17 00:00:00 2001 From: Douglas Gillespie <50671166+douggillespie@users.noreply.github.com> Date: Fri, 21 Oct 2022 11:09:35 +0100 Subject: [PATCH] Error reporting in -nogui A lot of warnings were being issued and trying to use the default window which caused a null pointer when running -nogui. This is fixed by a) not trying to access frames which are null and b) changing the PAMWarning system to write messages to terminal rather than open a dialog. --- README.html | 374 ++++++++++-------- dependency-reduced-pom.xml | 10 +- src/Acquisition/FileInputSystem.java | 2 +- src/PamController/PSFXReadWriter.java | 2 +- src/PamController/PamController.java | 7 +- src/PamController/PamSettingManager.java | 10 +- src/PamController/PamguardVersionInfo.java | 4 +- src/PamModel/PamModel.java | 6 +- src/PamUtils/PamAudioFileFilter.java | 2 +- src/PamUtils/PamExceptionHandler.java | 2 +- src/PamView/dialog/PamDialog.java | 7 +- src/PamView/dialog/warn/WarnOnce.java | 28 +- src/PamguardMVC/uid/binaryUIDFunctions.java | 4 +- src/alarm/actions/email/SendEmailAction.java | 2 +- .../algorithms/BeamAlgoParamsPane.java | 4 +- .../BasicFreqDomBeamFormer.java | 4 +- .../algorithms/mvdr/MVDRalgorithm.java | 4 +- .../offline/CTClassifierOfflineTask.java | 2 +- .../offline/ClickTrainOfflineTask.java | 2 +- src/depthReadout/MccDialog.java | 2 +- src/generalDatabase/DBControl.java | 2 +- src/generalDatabase/DBProcess.java | 2 +- .../lookupTables/LookUpTables.java | 2 +- .../offline/MTClassifierOfflineTask.java | 2 +- src/radardisplay/RadarParameters.java | 2 +- .../offline/DLOfflineTask.java | 2 +- src/rocca/RoccaProcess.java | 4 +- src/rocca/RoccaSpecPopUp.java | 4 +- src/rocca/RoccaWhistleSelect.java | 2 +- src/soundtrap/ImportBCLDialog.java | 4 +- 30 files changed, 273 insertions(+), 231 deletions(-) diff --git a/README.html b/README.html index e399e1e8..901b0c81 100644 --- a/README.html +++ b/README.html @@ -325,7 +325,8 @@ href="http://www.gnu.org/licenses/gpl-3.0-standalone.html">http://www.gnu.org/li
The latest version of PAMGuard has been tested on 64 bit Windows 10. We expect it to work without problems on 64 bit versions of Windows -8 and probably 7.
+8 and probably 7. Some testing has been undertaken on Windows 11 and nothing +unexpected has been noted.On Windows, download and run the Windows installer.
@@ -364,11 +365,11 @@ you should be able to launch PAMGUARD via an appropriate command line which should be something like:java --Xms384m -Xmx1024m -Djava.library.path=lib64 -jar PamguardBeta_xxxxxx.jar
+-Xms384m -Xmx4096m -Djava.library.path=lib64 -jar Pamguard_xxxxxx.jar -The -Xms384m -Xmx1024m specify the initial and maximum heap -size for the JVM being used to run Pamguard i.e. how much memory it gets to -use. The default max size usually being too low.
+The -Xms384m -Xmx4096m specify the initial and maximum heap +size for the JVM being used to run Pamguard i.e. how much memory it gets to use. +The default max size usually being too low.
The -Djava.library.path=lib64 tells the JVM that it should look in the folder called "lib64" for the required shared libraries @@ -381,13 +382,16 @@ just run the appropriately named executable (e.g. PamguardBeta_MixedMode.exe or PamguardBeta_ViewerMode.exe):
java --Xms384m -Xmx1024m -Djava.library.path=lib64 -jar PamguardBeta_xxxxxx.jar -v
+-Xms384m -Xmx4096m -Djava.library.path=lib64 -jar PamguardBeta_xxxxxx.jar -v
Features
-Changes to GUI to make dialog shorter for +low DPI screens.
-Complete rewrite of the classification +system to have nested classifiers which can be enabled or disabled.
-Changes to classification GUI to +accommodate the new classification system.
-Addition of data selectors to the minimum +number of clicks accepted by the classifier. This allows the click-by-click +classifier and the click train detector to be used to together to improve +classification accuracy.
-Bug fixes
-Click detection bug fix in kernel which +improved click fragmentation.
-Bug fix to database were JSON data from +classifier was being trimmed.
-Documentation
-Comprehensive help file including +description of the algorithm, screen grabs and examples.
-Bug fixes
-Help documentation for Backup Manager
-Help documentation for Matched Click +Classifier
-Database logging of offline tasks (such as +click re-classification, bearing calculation, etc.)
-Data selector for Whistle Classifier module
-Variable sound output level when using +National Instruments devices for sound playback.
+ +Speed improvement when processing flac +audio files.
+ +Soundtrap DWV import. Will now generate binary +files even if DWV file doesn’t exist (which is correct behavior in quiet +conditions when no clicks were detected).
+ +Spectrogram. Changes to stop occasional +crashing when restarting processing of wav files.
+ +Sizing of dialogs on ultra high definition +monitors so that data fields are sized correctly.
+ +Fixed a memory leak in ROCCA
+ +Some minor bug fixes following our migration to GitHub. Note that the older Bug numbers only refer to bugs reported on the SVN site. New @@ -640,8 +658,9 @@ lang=EN-US> Improvements to datamap display, to ensure even small images will be shown
4. -Allow Clip Generator to create both a binary record and a wav file
+lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> Allow Clip Generator to create both a binary record and a +wav file5. @@ -732,10 +751,10 @@ Version 2.00.10 before proceeding with installation and use of this version.
This version of PAMGuard has been bundled with Java 13 -(release 13.0.1). PSFX files generated in previous beta releases (2.xx.xx) -should be compatible with this version, and vice-versa. PSF files generated in -core releases (1.15.xx) can be loaded in this version, but will be converted to -PSFX files when PAMGuard exits.
+(release 13.0.1). PSFX files generated in previous beta releases (2.xx.xx) should +be compatible with this version, and vice-versa. PSF files generated in core +releases (1.15.xx) can be loaded in this version, but will be converted to PSFX +files when PAMGuard exits.Bug Fixes
@@ -833,8 +852,9 @@ August 2020If you are upgrading from a PAMGuard core release (1.15.xx), PAMGuard Version 2 contains major updates. You should read and -understand the notes listed for Beta Version -2.00.10 before proceeding with installation and use of this version.
+understand the notes listed for Beta +Version 2.00.10 before proceeding with installation and use of this +version.This version of PAMGuard has been bundled with Java 13 (release 13.0.1). PSFX files generated in previous beta releases (2.xx.xx) @@ -985,8 +1005,9 @@ lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> &nb Added global hotkeys to Logger module.
10. -Added channel display to noise one band measurement display.
+lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> Added channel display to noise one band measurement display. +11. @@ -1098,17 +1119,18 @@ Bug 447. Viewer mode throws exception when trying to load beamformer localisations
16. -Bug 448. Detection Group Localiser data units not being loaded in Viewer mode.
+lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> Bug 448. Detection Group Localiser data units not being +loaded in Viewer mode.17. Bug 449. Rocca Encounter Stats output file calculating incorrect values.
18. -Bug 450. Ishmael Detectors subscribing to FFTDataBlock twice, meaning they -process each data unit 2x doubling the output.
+lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> Bug 450. Ishmael Detectors subscribing to FFTDataBlock +twice, meaning they process each data unit 2x doubling the output.Upgrades
@@ -1213,9 +1235,9 @@ lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> &nb Bug 430. Rocca calculates inflection point parameters incorrectly5. -Bug 431. Error when trying to mark section of spectrogram to send to Bearing -Calculator module
+lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> Bug 431. Error when trying to mark section of spectrogram to +send to Bearing Calculator module6. @@ -1326,8 +1348,8 @@ Click Train Detector upgrades, including ability to import time chunks from csv file for batch processing.
3. -Better display of microseconds in dialogs.
+lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> Better display of microseconds in dialogs.4. @@ -1431,9 +1453,9 @@ lang=EN-US> Matched template classifier extended to handle multiple templates.
5. -New methods for handling and logging time offsets from the PC clock based -either on GPS NMEA data or on pings of an NTP time server.
+lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> New methods for handling and logging time offsets from the +PC clock based either on GPS NMEA data or on pings of an NTP time server.6. @@ -1489,8 +1511,8 @@ lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> &nb
Upgrades
1. -Added decimal degrees option to latitude/longitude dialog.
+lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> Added decimal degrees option to latitude/longitude dialog.2. @@ -1680,8 +1702,8 @@ lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> &nb
10. -Bug 376. Error when using a serialised data map which spans a period of -time in which Pamguard modules have changed.
+Bug 376. Error when using a serialised data map which spans a period of time +in which Pamguard modules have changed.11. @@ -1799,8 +1821,8 @@ and encouraged to manually fix the database.
-PAMGuard Version 2 contains major updates. You should read and understand the notes listed for
++ +
2. @@ -2103,8 +2130,8 @@ after the contour was recalculated. This has been corrected.
3. -Bug 310. When exiting Viewer mode, PAMGuard queries the user whether they -are sure they want to exit without saving even though they selected Bug 310. When exiting Viewer mode, PAMGuard queries the user whether +they are sure they want to exit without saving even though they selected Save and Exit. Corrected, and added an Exit without Save option.
@@ -2227,8 +2254,8 @@ sample rate. font-stretch: normal'> Bug 305. Date and Time not being correctly extracted from wav files created using SoundTrap recorders. Fixed by correctly -finding and unpacking information in the accompanying xml log files that come -with SoundTrap files. +finding and unpacking information in the accompanying xml log files that come with +SoundTrap files.5. -Bug 295. If a click has a total length of a single sample, the code attempting -to estimate the time delay between channels would crash. This is now fixed. -This could only occur if both pre sample and post sample were set to 0 in the -click detector, which is generally not a good idea, so this bug may have been -there for some time, it's just that no one noticed before. Fixed
+Bug 295. If a click has a total length of a single sample, the code +attempting to estimate the time delay between channels would crash. This is now +fixed. This could only occur if both pre sample and post sample were set to 0 +in the click detector, which is generally not a good idea, so this bug may have +been there for some time, it's just that no one noticed before. Fixed6. @@ -2365,9 +2392,9 @@ automatic click train identification and tracking.
5. -The automatic click train identification is now using -the same internal structures as the manual tracking, so it's possible to -combine automatic and manual tracking.
+The automatic click train identification is now using the +same internal structures as the manual tracking, so it's possible to combine +automatic and manual tracking.6. @@ -2384,9 +2411,9 @@ the future.
Logger Form Design
-A GUI driven system for designing Logger forms has been released. -Currently, this feature has no online help, but is reasonably intuitive -compared to the old method of typing directly into the database.
+A GUI driven system for designing Logger forms has been +released. Currently, this feature has no online help, but is reasonably +intuitive compared to the old method of typing directly into the database.
Improved Number handling
@@ -2447,9 +2474,8 @@ today.5. -Bug 277. Text fields in classifier dialog were not large enough to -display times greater than 10ms. We have increased length of text fields in the -dialog.
+Bug 277. Text fields in classifier dialog were not large enough to display +times greater than 10ms. We have increased length of text fields in the dialog.6. @@ -2458,17 +2484,17 @@ changes in future releases. New PAMGuard releases will always be able to open older binary files, however, with previous PAMGuard releases if a newer file format was opened, then PAMGuard was unable to check that the file format was newer and would attempt to read the files and might even corrupt them. Now it -will recognise that it cannot open the files, display appropriate error messages -and not attempt to read the files. NOTE that at this time there are no planned -file format changes and that this is purely a future proofing exercise.
+will recognise that it cannot open the files, display appropriate error +messages and not attempt to read the files. NOTE that at this time there are no +planned file format changes and that this is purely a future proofing exercise.7. Bug 279. GUI Resizing: The whole PAMGuard GUI would suddenly resize to something very small when a dialog is opened. This has been traced to improper use of a common dialog component SourcePanel which tries to repack its parent -Window. Some programmers had inadvertently set it to repack the main PAMGuard -GUI instead. This has been Fixed.
+Window. Some programmers had inadvertently set it to repack the main PAMGuard GUI +instead. This has been Fixed.8. @@ -2542,16 +2568,16 @@ and datagram creation.
Beta Version 1.15.00 64 bit and Core
-version 1.15.00 32 bit. Both using identical Java core software but linking to
+ Beta Version 1.15.00 64 bit and Core version
+1.15.00 32 bit. Both using identical Java core software but linking to
different libraries for control of sound input devices. This is the first release of a 64 bit
-version of PAMGuard. As with the 32 bit version a number of C language libraries
-are required to interface to external sound cards and other data acquisition
-devices. These have been extensively tested on several different computers, but
-may not be as stable as the 32 bit versions. Please report any problems
-immediately to the PAMGuard team.
Other Changes
@@ -2625,8 +2651,8 @@ name="_Toc312065299">Version 1.14.00 Beta, September 2015The format of configuration files has changed for version -1.14.00. Older configurations will load with this new version, but configurations -saved with 1.14.00 may not open correctly with earlier versions.
+1.14.00. Older configurations will load with this new version, but +configurations saved with 1.14.00 may not open correctly with earlier versions.PAMGuard Versions 1.14.00 and above will work with Java 8. PAMGuard will continue to work with Java 7, but support for Java 7 will be @@ -2693,9 +2719,9 @@ displaying in the viewer. This is now fixed.
3. Bug 248. Crash in hydrophone array manager. Bug in -array manager would crash PAMGuard when the click detector was configured with more -channels than the sound acquisition system (almost impossible to achieve, but -someone managed it).
+array manager would crash PAMGuard when the click detector was configured with +more channels than the sound acquisition system (almost impossible to achieve, +but someone managed it).4. @@ -2789,9 +2815,9 @@ lang=EN-US>1. +tab of the spectrogram configuration dialog, and also right click on the +spectrogram and select to display the annotations. Annotations are saved to the +database so you will also need a database module in your configuration.
2. @@ -2814,9 +2840,9 @@ option with caution !
5. -The Open Office Database system has been removed from the list of available -options since it is not reliable. If you require a free database solution we -recommend you use the MySql Community Server The Open Office Database system has been removed from the list of +available options since it is not reliable. If you require a free database +solution we recommend you use the MySql Community Server http://dev.mysql.com/downloads/mysql/
4.
-Bug 226. Spectrogram Mark Observer list doesn't refresh when modules
-added or removed.
5. @@ -2896,9 +2922,9 @@ be specified by the user in the Rocca Parameters dialog Notes tab.
1. Bug -209. Map zoom level. This was zoomed right into a range of about 1m when new maps -were created. This is now fixed and it starts with a default range of 10km on -the display.
+209. Map zoom level. This was zoomed right into a range of about 1m when new +maps were created. This is now fixed and it starts with a default range of 10km +on the display.2. Bug @@ -3187,8 +3213,8 @@ whistle.
. Did not affect band level calculations.-
New Modules
@@ -3245,14 +3269,14 @@ mode, making is easy to scroll through and view data for short time periods. GPS -Function to import GPS data from other -data sources for the PAMGuard viewer.
+Function to import GPS data from +other data sources for the PAMGuard viewer.
Database
-Can now copy data from binary -storage to the database offline for any module having both binary and database -storage.
+Can now copy data from binary storage +to the database offline for any module having both binary and database storage. +
Can create a blank MS Access database (2007 and later *.accdb formats only).
@@ -3351,12 +3375,12 @@ elements has been fixed.' -Database Speed: A substantial rewriting of some of the indexing methods -in the database module has led to a significant increase in the speed at which data -are written to the database (orders of magnitude for large databases). This is -having a significant impact on the overall reliability of the software. Other -changes have increased the speed (again by orders of magnitude) at which data -are read back into PAMGuard when using the viewer.
+Database Speed: A substantial rewriting of some of the indexing methods in +the database module has led to a significant increase in the speed at which +data are written to the database (orders of magnitude for large databases). +This is having a significant impact on the overall reliability of the software. +Other changes have increased the speed (again by orders of magnitude) at which +data are read back into PAMGuard when using the viewer.' @@ -3444,9 +3468,9 @@ Symbol'>'' Offline event marking. Offline event marking similar to functionality in -RainbowClick is now available in the PAMGUARD viewer. Event summary data is -stored in the database and can also be exported to text files (e.g. for -importing into the Distance software).
+RainbowClick is now available in the PAMGUARD viewer. Event summary data is stored +in the database and can also be exported to text files (e.g. for importing into +the Distance software).' @@ -3459,8 +3483,8 @@ Symbol'>'' -Bearings can be calculated using the envelope of the waveform rather than -the full waveform. The waveform or envelope can also be filtered prior to +Bearings can be calculated using the envelope of the waveform rather +than the full waveform. The waveform or envelope can also be filtered prior to bearing calculation.
'' -Bearing ambiguity resolution for planar and volumetric arrays. New -features in array dialog for estimations of errors on array location. These -feed into to a maximum likelihood estimate of angles from small 2D or 3D sub -arrays to give two polar angle coordinates. this can be used to resolve left -right ambiguity and is implemented for both the click and the whistle/moan -detectors. As a result, the click detector bearing time display can now be set -to go from -180 to 180 degrees rather than 0 - 180 degrees. In this case, -clicks in the upper half of the bearing display will be to port and clicks in -the right half will be to starboard. As you pass a whale which is to port, the -clicks will move UP the display. In the long term, I hope to turn this display -around so that time is up the screen rather than across.
+Bearing ambiguity resolution for planar and volumetric arrays. New features +in array dialog for estimations of errors on array location. These feed into to +a maximum likelihood estimate of angles from small 2D or 3D sub arrays to give +two polar angle coordinates. this can be used to resolve left right ambiguity +and is implemented for both the click and the whistle/moan detectors. As a +result, the click detector bearing time display can now be set to go from -180 +to 180 degrees rather than 0 - 180 degrees. In this case, clicks in the upper +half of the bearing display will be to port and clicks in the right half will +be to starboard. As you pass a whale which is to port, the clicks will move UP +the display. In the long term, I hope to turn this display around so that time +is up the screen rather than across.Small features and bug fixes
@@ -4110,10 +4134,10 @@ help pagesBug Fixes
-Memory leak caused by Night / Day colour manager now fixed. -This would cause memory leaks when multiple files were being analysed off-line -and would eventually crash PAMGUARD. The way that colours are managed in -PAMGUARD has been rewritten.
+Memory leak caused by Night / Day colour manager now fixed. This +would cause memory leaks when multiple files were being analysed off-line and +would eventually crash PAMGUARD. The way that colours are managed in PAMGUARD +has been rewritten.
Some issues with Swing fixed that might have been causing hang ups on startup especially on Macs/Linux machines
@@ -4184,8 +4208,8 @@ file)Changes
-The User Input module (for text entry of information by the -user) has been moved from the Displays sub menu of the Add Modules menu, to +
The User Input module (for text entry of information by the user) +has been moved from the Displays sub menu of the Add Modules menu, to Utilities. This will not affect how existing settings files are loaded.
Multi-screen environments.
@@ -4356,8 +4380,8 @@ channels or textual content change.' -Model viewer. Have stopped it from jumping on top of the main PAMGUARD - display when dialogs are closed.
+Model viewer. Have stopped it from jumping on top of the main PAMGUARD display +when dialogs are closed.' @@ -4688,12 +4712,12 @@ and Ishmael-type detectors and localisers.
Information from above modules can be displayed on configurable user displays which support real time scrolling spectrograms and radar displays. Detection and localisation information can be optionally -displayed on the map display.Map enhancements include improved scrolling -whereby the user can click and drag to pan the area. PamGuard can now interface -with MySQL database servers and users can easily select which information is -logged. (This replaces the previous 'flat-file' logging feature). A simulation -module allows virtual vocalising animals to be placed on the map to assist in -training and development. Extensive online user help has been added to PamGuard +displayed on the map display.Map enhancements include improved scrolling whereby +the user can click and drag to pan the area. PamGuard can now interface with +MySQL database servers and users can easily select which information is logged. +(This replaces the previous 'flat-file' logging feature). A simulation module +allows virtual vocalising animals to be placed on the map to assist in training +and development. Extensive online user help has been added to PamGuard Application
Please check to ensure that the file exists, and that the path entered in PAMGuard is correct.
" + "Note this error may also indicate that the file is corrupt and unreadable by PAMGuard.