Modify ↓
#20349 closed defect (fixed)
NPE at mapillary.data.image.Detections.getDetections
Reported by: | GhostFoxSledgehammer | Owned by: | taylor.smock |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin mapillary | Version: | tested |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- I'm not sure what triggered this but I Restarted a failed download and this happened after sometime.
What is the expected result?
What happens instead?
Please provide any additional information below. Attach a screenshot if possible.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2020-12-28 22:03:23 +0100 (Mon, 28 Dec 2020) Revision:17428 Build-Date:2020-12-29 02:30:53 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (17428 en) Windows 10 64-Bit OS Build number: Windows 10 Home Single Language 2004 (19041) Memory Usage: 1610 MB / 2048 MB (721 MB allocated, but free) Java version: 15.0.1+9-18, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 1920×1080 (scaling 1.25×1.25) Maximum Screen Size: 1920×1080 Best cursor sizes: 16×16→32×32, 32×32→32×32 Dataset consistency test: No problems found Plugins: + Mapillary (1.5.33-dirty) + apache-commons (35524) + apache-http (35589) + imagery_offset_db (35640) + jna (35662) + turnrestrictions (35640) Last errors/warnings: - 00687.770 W: Server timeout, trying https://a.mapillary.com/v3/image_detections?client_id=UTZhSnNFdGpxSEFFREUwb01GYzlXZzpjNGViMzQxMTIzMjY0MjZm&bbox=2.3415899%2C48.8505265%2C2.3666096%2C48.8612987&layers=trafficsigns&sort_by=key again (attempt 2 of 2) - 00687.771 W: java.io.IOException: javax.json.JsonException: I/O error while auto-detecting the encoding of stream. Cause: javax.json.JsonException: I/O error while auto-detecting the encoding of stream. Cause: java.io.IOException: stream is closed - 00687.936 W: java.io.IOException: javax.json.JsonException: I/O error while auto-detecting the encoding of stream. Cause: javax.json.JsonException: I/O error while auto-detecting the encoding of stream. Cause: java.io.IOException: stream is closed - 00691.546 W: java.net.SocketTimeoutException: Read timed out. Cause: java.net.SocketTimeoutException: Read timed out - 00691.547 E: java.net.SocketTimeoutException: Read timed out. Cause: java.net.SocketTimeoutException: Read timed out - 00691.577 W: java.net.SocketTimeoutException: Read timed out. Cause: java.net.SocketTimeoutException: Read timed out - 00691.623 W: java.net.SocketTimeoutException: Read timed out. Cause: java.net.SocketTimeoutException: Read timed out - 00691.623 W: java.net.SocketTimeoutException: Read timed out. Cause: java.net.SocketTimeoutException: Read timed out - 00691.624 E: java.net.SocketTimeoutException: Read timed out. Cause: java.net.SocketTimeoutException: Read timed out - 00692.165 E: Handled by bug report queue: java.lang.NullPointerException: Cannot invoke "org.openstreetmap.josm.plugins.mapillary.data.image.Detections.getDetections(boolean)" because "image" is null === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: ForkJoinPool.commonPool-worker-13 (36) java.lang.NullPointerException: Cannot invoke "org.openstreetmap.josm.plugins.mapillary.data.image.Detections.getDetections(boolean)" because "image" is null at org.openstreetmap.josm.plugins.mapillary.gui.MapillaryMainDialog.updateDetections(MapillaryMainDialog.java:515) at org.openstreetmap.josm.plugins.mapillary.gui.MapillaryMainDialog.lambda$updateImage$1(MapillaryMainDialog.java:485) at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1429) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Attachments (0)
Change History (3)
follow-up: 3 comment:1 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 4 years ago
I didn't see any other critical bugs, so I made a new release with this fix: v1.5.34.
comment:3 by , 4 years ago
Replying to taylor.smock:
This is probably due to a race condition. Sometime between the start of
updateImage
and when detections are updated, the image stored changes.
I remember double-clicking empty space but didn't think that could have caused the NPE. Also I got the same error multiple times simultaneously. Hopefully it will be fixed with v.1.5.34.
Note:
See TracTickets
for help on using tickets.
This is probably due to a race condition. Sometime between the start of
updateImage
and when detections are updated, the image stored changes. This is probably the same base cause asGithub #165.I've made some modifications so that race conditions should be much rarer in that section of code.
This should be fixed (hopefully) in e9cc9bf5039916592c96099f38cb91b9d88b62de.