Modify

Opened 3 months ago

Closed 3 months ago

Last modified 2 months ago

#18549 closed defect (fixed)

I'm testing mapwithai, bug seems to happen after too many items are selected. Maybe after 5+

Reported by: Alan Bragg Owned by: taylor.smock
Priority: normal Milestone:
Component: Plugin mapwithai Version:
Keywords: template_report Cc: taylor.smock

Description

What steps will reproduce the problem?

  1. Select more than a few objects from the MapWithAI layer.
  2. If I close the bug report I can resume with the objects already selected and shift-A to send them to the data layer.

What is the expected result?

What happens instead?

Please provide any additional information below. Attach a screenshot if possible.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-01-02 22:34:59 +0100 (Thu, 02 Jan 2020)
Build-Date:2020-01-02 21:52:31
Revision:15628
Relative:URL: ^/trunk

Identification: JOSM/1.5 (15628 en) Windows 10 64-Bit
OS Build number: Windows 10 Home 1903 (18362)
Memory Usage: 686 MB / 989 MB (268 MB allocated, but free)
Java version: 1.8.0_221-b11, Oracle Corporation, Java HotSpot(TM) Client VM
Screen: \Display0 1366x768
Maximum Screen Size: 1366x768
Dataset consistency test: No problems found

Plugins:
+ FixAddresses (35248)
+ HouseNumberTaggingTool (35248)
+ ImportImagePlugin (35248)
+ ImproveWay (29)
+ Mapillary (1.5.20)
+ SimplifyArea (35248)
+ apache-commons (35092)
+ apache-http (35092)
+ buildings_tools (35248)
+ conflation (0.6.4)
+ contourmerge (v0.1.5)
+ ejml (35122)
+ geotools (35169)
+ imagery_offset_db (35248)
+ jaxb (35092)
+ jna (35092)
+ jts (35122)
+ log4j (35092)
+ mapwithai (1.0.0)
+ measurement (35248)
+ merge-overlap (35248)
+ opendata (35248)
+ reltoolbox (35248)
+ reverter (35248)
+ tag2link (35248)
+ turnrestrictions (35248)
+ utilsplugin2 (35248)
+ waydownloader (35092)
+ wikipedia (1.1.3)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Admin_Boundaries&zip=1
- https://github.com/bastik/mapcss-tools/raw/osm/mapnik2mapcss/osm-results/mapnik.zip
+ https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1

Last errors/warnings:
- W: JCS TMS - error loading object for tile 14/4850/6075@OpenStreetMap Carto (Standard): Error reading PNG image data
- W: JCS TMS - error loading object for tile 14/4850/6075@OpenStreetMap Carto (Standard): Error reading PNG image data
- W: JCS TMS - error loading object for tile 14/4850/6075@OpenStreetMap Carto (Standard): Error reading PNG image data
- W: JCS TMS - error loading object for tile 14/4850/6075@OpenStreetMap Carto (Standard): Error reading PNG image data
- W: JCS TMS - error loading object for tile 14/4850/6075@OpenStreetMap Carto (Standard): Error reading PNG image data
- W: JCS TMS - error loading object for tile 14/4850/6075@OpenStreetMap Carto (Standard): Error reading PNG image data
- E: Handled by bug report queue: java.lang.AssertionError: Range violated: the new range must be within a subrange that has no data (object: way -4607225477391087983, current style: StyleCache{PLAIN: DS{[0.0, Infinity] [[LineElemStyle{z_idx=[3.0/0.0/0.0] width=2.0 realWidth=0.0 color=#808080 dashed=null dashedColor=null linejoin=round linecap=round}]]} SELECTED: null}, scale: 88.66187351130266, new stylelist: [LineElemStyle{z_idx=[3.0/0.0/0.0] width=2.0 realWidth=0.0 color=#808080 dashed=null dashedColor=null linejoin=round linecap=round}], new range: |s0.0-Infinity). Cause: org.openstreetmap.josm.gui.mappaint.DividedScale$RangeViolatedError: the new range must be within a subrange that has no data
- E: Handled by bug report queue: java.lang.AssertionError: Range violated: the new range must be within a subrange that has no data (object: way -4607225477391088038, current style: StyleCache{PLAIN: DS{[0.0, Infinity] [[LineElemStyle{z_idx=[3.0/0.0/0.0] width=2.0 realWidth=0.0 color=#808080 dashed=null dashedColor=null linejoin=round linecap=round}]]} SELECTED: null}, scale: 22.159439912771013, new stylelist: [LineElemStyle{z_idx=[3.0/0.0/0.0] width=2.0 realWidth=0.0 color=#808080 dashed=null dashedColor=null linejoin=round linecap=round}], new range: |s0.0-Infinity). Cause: org.openstreetmap.josm.gui.mappaint.DividedScale$RangeViolatedError: the new range must be within a subrange that has no data
- E: Handled by bug report queue: java.lang.AssertionError: Range violated: the new range must be within a subrange that has no data (object: way -4607225477391087985, current style: StyleCache{PLAIN: DS{[0.0, Infinity] [[AreaElemStyle{z_idx=[1.0/0.0/0.0] color=#00ff00(alpha=50) fillImage=[null] extent=[null] extentThreshold=[null]}, TextElement{z_idx=[4.9/0.0/0.0] text=TextLabel{labelCompositionStrategy={DeriveLabelFromNameTagsCompositionStrategy} font=java.awt.Font[family=Droid Sans,name=Droid Sans,style=plain,size=8] color=#ffffff} labelPositionStrategy=CompletelyInsideAreaStrategy [offsetX=0.0, offsetY=0.0]}, LineElemStyle{z_idx=[3.0/-3.0/0.0] width=2.0 realWidth=0.0 color=#00ff00 dashed=null dashedColor=null linejoin=round linecap=round}]]} SELECTED: null}, scale: 44.336131398818395, new stylelist: [AreaElemStyle{z_idx=[1.0/0.0/0.0] color=#00ff00(alpha=50) fillImage=[null] extent=[null] extentThreshold=[null]}, TextElement{z_idx=[4.9/0.0/0.0] text=TextLabel{labelCompositionStrategy={DeriveLabelFromNameTagsCompositionStrategy} font=java.awt.Font[family=Droid Sans,name=Droid Sans,style=plain,size=8] color=#ffffff} labelPositionStrategy=CompletelyInsideAreaStrategy [offsetX=0.0, offsetY=0.0]}, LineElemStyle{z_idx=[3.0/-3.0/0.0] width=2.0 realWidth=0.0 color=#00ff00 dashed=null dashedColor=null linejoin=round linecap=round}], new range: |s0.0-Infinity). Cause: org.openstreetmap.josm.gui.mappaint.DividedScale$RangeViolatedError: the new range must be within a subrange that has no data
- E: Handled by bug report queue: java.lang.AssertionError: Range violated: the new range must be within a subrange that has no data (object: way -4607225477391087985, current style: StyleCache{PLAIN: DS{[0.0, Infinity] [[AreaElemStyle{z_idx=[1.0/0.0/0.0] color=#00ff00(alpha=50) fillImage=[null] extent=[null] extentThreshold=[null]}, TextElement{z_idx=[4.9/0.0/0.0] text=TextLabel{labelCompositionStrategy={DeriveLabelFromNameTagsCompositionStrategy} font=java.awt.Font[family=Droid Sans,name=Droid Sans,style=plain,size=8] color=#ffffff} labelPositionStrategy=CompletelyInsideAreaStrategy [offsetX=0.0, offsetY=0.0]}, LineElemStyle{z_idx=[3.0/-3.0/0.0] width=2.0 realWidth=0.0 color=#00ff00 dashed=null dashedColor=null linejoin=round linecap=round}]]} SELECTED: null}, scale: 44.33655686363436, new stylelist: [AreaElemStyle{z_idx=[1.0/0.0/0.0] color=#00ff00(alpha=50) fillImage=[null] extent=[null] extentThreshold=[null]}, TextElement{z_idx=[4.9/0.0/0.0] text=TextLabel{labelCompositionStrategy={DeriveLabelFromNameTagsCompositionStrategy} font=java.awt.Font[family=Droid Sans,name=Droid Sans,style=plain,size=8] color=#ffffff} labelPositionStrategy=CompletelyInsideAreaStrategy [offsetX=0.0, offsetY=0.0]}, LineElemStyle{z_idx=[3.0/-3.0/0.0] width=2.0 realWidth=0.0 color=#00ff00 dashed=null dashedColor=null linejoin=round linecap=round}], new range: |s0.0-Infinity). Cause: org.openstreetmap.josm.gui.mappaint.DividedScale$RangeViolatedError: the new range must be within a subrange that has no data


=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (15) of main
java.lang.AssertionError: Range violated: the new range must be within a subrange that has no data (object: way -4607225477391087985, current style: StyleCache{PLAIN: DS{[0.0, Infinity] [[AreaElemStyle{z_idx=[1.0/0.0/0.0] color=#00ff00(alpha=50) fillImage=[null] extent=[null] extentThreshold=[null]}, TextElement{z_idx=[4.9/0.0/0.0] text=TextLabel{labelCompositionStrategy={DeriveLabelFromNameTagsCompositionStrategy} font=java.awt.Font[family=Droid Sans,name=Droid Sans,style=plain,size=8] color=#ffffff} labelPositionStrategy=CompletelyInsideAreaStrategy [offsetX=0.0, offsetY=0.0]}, LineElemStyle{z_idx=[3.0/-3.0/0.0] width=2.0 realWidth=0.0 color=#00ff00 dashed=null dashedColor=null linejoin=round linecap=round}]]} SELECTED: null}, scale: 44.33655686363436, new stylelist: [AreaElemStyle{z_idx=[1.0/0.0/0.0] color=#00ff00(alpha=50) fillImage=[null] extent=[null] extentThreshold=[null]}, TextElement{z_idx=[4.9/0.0/0.0] text=TextLabel{labelCompositionStrategy={DeriveLabelFromNameTagsCompositionStrategy} font=java.awt.Font[family=Droid Sans,name=Droid Sans,style=plain,size=8] color=#ffffff} labelPositionStrategy=CompletelyInsideAreaStrategy [offsetX=0.0, offsetY=0.0]}, LineElemStyle{z_idx=[3.0/-3.0/0.0] width=2.0 realWidth=0.0 color=#00ff00 dashed=null dashedColor=null linejoin=round linecap=round}], new range: |s0.0-Infinity)
	at org.openstreetmap.josm.gui.mappaint.ElemStyles.getStyleCacheWithRange(ElemStyles.java:206)
	at org.openstreetmap.josm.gui.mappaint.ElemStyles.get(ElemStyles.java:138)
	at org.openstreetmap.josm.gui.NavigatableComponent.lambda$new$0(NavigatableComponent.java:98)
	at org.openstreetmap.josm.gui.NavigatableComponent.getNearestWaySegmentsImpl(NavigatableComponent.java:1188)
	at org.openstreetmap.josm.gui.NavigatableComponent.getNearestWaySegment(NavigatableComponent.java:1329)
	at org.openstreetmap.josm.gui.NavigatableComponent.getNearestNodeOrWay(NavigatableComponent.java:1535)
	at org.openstreetmap.josm.actions.mapmode.SelectAction.giveUserFeedback(SelectAction.java:261)
	at org.openstreetmap.josm.actions.mapmode.SelectAction.giveUserFeedback(SelectAction.java:249)
	at org.openstreetmap.josm.actions.mapmode.SelectAction.mouseReleased(SelectAction.java:627)
	at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: org.openstreetmap.josm.gui.mappaint.DividedScale$RangeViolatedError: the new range must be within a subrange that has no data
	at org.openstreetmap.josm.gui.mappaint.DividedScale.putImpl(DividedScale.java:131)
	at org.openstreetmap.josm.gui.mappaint.DividedScale.put(DividedScale.java:102)
	at org.openstreetmap.josm.gui.mappaint.StyleCache.put(StyleCache.java:50)
	at org.openstreetmap.josm.gui.mappaint.ElemStyles.getStyleCacheWithRange(ElemStyles.java:203)
	... 40 more

Attachments (0)

Change History (6)

comment:1 Changed 3 months ago by Don-vip

Cc: taylor.smock added

comment:2 Changed 3 months ago by taylor.smock

Component: CorePlugin mapwithai
Owner: changed from team to taylor.smock
Resolution: fixed
Status: newclosed

Well, I found the problem.

MapWithAILayer in selectionChanged.

        @Override
        public void selectionChanged(SelectionChangeEvent event) {
                super.selectionChanged(event);
                final int maximumAdditionSelection = MapWithAIPreferenceHelper.getMaximumAddition();
                if ((event.getSelection().size() - event.getOldSelection().size() > 1
                                || maximumAdditionSelection < event.getSelection().size())
                                && (MapWithAIPreferenceHelper.getMaximumAddition() != 0 || !ExpertToggleAction.isExpert())) {
                        Collection<OsmPrimitive> selection = event.getSelection().stream().distinct().limit(maximumAdditionSelection)
                                        .limit(event.getOldSelection().size() + 1L).collect(Collectors.toList());
                        MainApplication.worker.execute(() -> {
                                getDataSet().setSelected(selection);
                        });
                }
        }

It looks like a race condition between the painting and the new selection. I've got a fix (I have a wait of 10 ms now before sending the new selection), and I'll release that today after I figure out why I'm getting a message about background uploads.

I'll probably redo it, since it isn't a true fix, but it will at least stop the crashing for now, while I decide how I want to properly fix it.

Last edited 3 months ago by taylor.smock (previous) (diff)

comment:3 Changed 3 months ago by taylor.smock

@Alan Bragg: I've released the update. You should be able to get it if you update plugins now.

Thank you for your bug report.

Last edited 3 months ago by taylor.smock (previous) (diff)

comment:4 Changed 2 months ago by taylor.smock

Ticket #18570 has been marked as a duplicate of this ticket.

comment:5 Changed 2 months ago by Don-vip

Ticket #18621 has been marked as a duplicate of this ticket.

comment:6 Changed 2 months ago by skyper

Ticket #18634 has been marked as a duplicate of this ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain taylor.smock.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.