Blank tiles

61 views
Skip to first unread message

freizeitkarte

unread,
Apr 6, 2022, 8:25:02 AMApr 6
to Cruiser Users
Environment:
  • MacOS Montrey Version 12.3.1
  • openjdk version "18" 2022-03-22
  • Cruiser 2.1.2

Problem:

  • Blank tiles when showing map in large window.
  • See screenshot.

Remarks:

  • The problem doesn't occur in  smaller window.
Bildschirmfoto 2022-04-06 um 14.14.04.png


Emux

unread,
Apr 6, 2022, 8:59:00 AMApr 6
to cruise...@googlegroups.com
Thanks for the report.

Is it a memory cache problem?

On desktop the cache is calculated by AwtUtil:
(it should already use the screen size)

https://github.com/mapsforge/mapsforge/blob/master/mapsforge-map-awt/src/main/java/org/mapsforge/map/awt/util/AwtUtil.java

Unfortunately I cannot make tests on 4K screens.

Can you run Mapsforge Desktop Samples and test on your screen?
Also can you test with 1 map?

https://github.com/mapsforge/mapsforge/blob/master/mapsforge-samples-awt/src/main/java/org/mapsforge/samples/awt/Samples.java

--
Emux

freizeitkarte

unread,
Apr 7, 2022, 3:09:04 AMApr 7
to Cruiser Users
> Can you run Mapsforge Desktop Samples and test on your screen?
How to do this (I'm not very familiar with java)?

> Also can you test with 1 map?
Same problem with only one map. See attached screenshot.

Bildschirmfoto 2022-04-07 um 09.01.40.png

Emux

unread,
Apr 7, 2022, 3:13:06 AMApr 7
to cruise...@googlegroups.com
You need to clone Mapsforge locally and follow the desktop instructions:
https://github.com/mapsforge/mapsforge/blob/master/docs/Desktop.md

Maybe the screen size detection in AwtUtil does not work properly on macOS:
https://github.com/mapsforge/mapsforge/blob/master/mapsforge-map-awt/src/main/java/org/mapsforge/map/awt/util/AwtUtil.java#L56

--
Emux

freizeitkarte

unread,
Apr 7, 2022, 3:35:16 AMApr 7
to Cruiser Users
I'm unable to compile the samples:

~/Downloads/mapsforge-master % ./gradlew :mapsforge-samples-awt:run -Pargs=/Users/joe/Hobby/fzk-android/freizeitkarte-android/Freizeitkarte_NLD+.map

FAILURE: Build failed with an exception.

* Where:
Settings file '/Users/joe/Downloads/mapsforge-master/settings.gradle'

* What went wrong:
Could not compile settings file '/Users/joe/Downloads/mapsforge-master/settings.gradle'.
> startup failed:
  General error during conversion: Unsupported class file major version 62
 
  java.lang.IllegalArgumentException: Unsupported class file major version 62
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:196)
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:177)
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:163)
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:284)
        at org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:81)
        at org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:251)
        at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:189)
        ...

Could you provide a ready to run jar?

Emux

unread,
Apr 7, 2022, 3:37:53 AMApr 7
to cruise...@googlegroups.com
Jars are available in Maven / Sonatype:
https://github.com/mapsforge/mapsforge/blob/master/docs/Integration.md

But the idea is to build the project with a working Java / Android.
So you can test different AwtUtil implementations.

--
Emux

freizeitkarte

unread,
Apr 7, 2022, 3:48:13 AMApr 7
to Cruiser Users
Sorry, I can't follow you. It's unclear what and how to test.

Emux

unread,
Apr 7, 2022, 3:58:59 AMApr 7
to cruise...@googlegroups.com
Have you changed any of the settings in Cruiser?

--
Emux

freizeitkarte

unread,
Apr 7, 2022, 4:12:23 AMApr 7
to Cruiser Users
No settings were changed. Normal rendering is used. BTW: Advanced rendering results in very strange blinking of some map elements. In my case some (not all) city label. But this seems to be another defect.

Emux

unread,
Apr 7, 2022, 4:19:19 AMApr 7
to cruise...@googlegroups.com
I improved the cache size calculation in AwtUtil:
https://github.com/mapsforge/mapsforge/pull/1305

It will be available in the next Cruiser update.


Then you can test it how it works on your system.

--
Emux

Emux

unread,
Apr 7, 2022, 4:31:26 AMApr 7
to cruise...@googlegroups.com
Or you can test it now:

- Download the new jar:
https://oss.sonatype.org/content/repositories/snapshots/org/mapsforge/mapsforge-map-awt/master-SNAPSHOT/mapsforge-map-awt-master-20220407.082112-439.jar

- Rename it to:
mapsforge-map-awt-master-SNAPSHOT.jar

- And move it in "cruiser/lib" sub-folder overwriting the older jar.

--
Emux

freizeitkarte

unread,
Apr 7, 2022, 4:52:06 AMApr 7
to Cruiser Users
I have exchanged mapsforge-map-awt-master-SNAPSHOT.jar in cruiser/lib, but the result (blank tiles) is still the same.

Bildschirmfoto 2022-04-07 um 10.48.28.png

Emux

unread,
Apr 7, 2022, 4:57:38 AMApr 7
to cruise...@googlegroups.com
Do you have enabled any scaling (retina) on macOS display settings?


If you have replaced the jar correctly and it still shows the same result...

Then someone with macOS and 4K screen needs to test directly Mapsforge desktop sample
and see what happens on that platform.

--
Emux

freizeitkarte

unread,
Apr 7, 2022, 5:31:57 AMApr 7
to Cruiser Users
> Do you have enabled any scaling (retina) on macOS display settings?

Yes. The 4K monitor is used together with the  notebook display (two screen setup). The 4k monitor is used in 2560 * 1440 mode.

freizeitkarte

unread,
Apr 7, 2022, 5:38:38 AMApr 7
to Cruiser Users
Update: If I only use the 4K monitor (notebook display is off), everything works fine (no blank tiles with version 2.1.2, no blank tiles with provided test version). 

Emux

unread,
Apr 7, 2022, 5:54:32 AMApr 7
to cruise...@googlegroups.com
> The 4K monitor is used together with the  notebook display (two screen setup). The 4k monitor is used in 2560 * 1440 mode.

> If I only use the 4K monitor (notebook display is off), everything works fine (no blank tiles with version 2.1.2, no blank tiles with provided test version).

Java may detect and use the 1st primary monitor in the cache size calculations.

Is the app started in the 4K monitor or it is started on notebook and then is moved in external display?

--
Emux

Emux

unread,
Apr 7, 2022, 7:05:51 AMApr 7
to cruise...@googlegroups.com

freizeitkarte

unread,
Apr 7, 2022, 7:15:19 AMApr 7
to Cruiser Users

> Is the app started in the 4K monitor or it is started on notebook and then is moved in external display?

The app was always started on the 4K display.

Notebook display = 3024 x 1964 Retina

freizeitkarte

unread,
Apr 7, 2022, 7:22:37 AMApr 7
to Cruiser Users
The latest test jar works for me. No blank tiles anymore with two-display-setup.The strange blinking of map elements in "advanced rendering mode" is also gone.

Emux

unread,
Apr 7, 2022, 7:40:38 AMApr 7
to cruise...@googlegroups.com

freizeitkarte

unread,
Apr 7, 2022, 10:20:09 AMApr 7
to Cruiser Users
The latest snapshot also works without any blank tiles.

Emux

unread,
Apr 7, 2022, 10:22:49 AMApr 7
to cruise...@googlegroups.com
Thanks for the tests.

So it seems that was a problem in Mapsforge cache size calculation
when multiple screens exist on the desktop.

Now it should be fixed and it will be available in the next Cruiser update.

--
Emux

freizeitkarte

unread,
Apr 7, 2022, 12:18:02 PMApr 7
to Cruiser Users
That sounds good. Thanks for fixing it.
Reply all
Reply to author
Forward
0 new messages