Menu

MOBAC 2.4.0 beta 2

r_x
6 days ago
1 day ago
  • r_x

    r_x - 6 days ago

    A new beta version of MOBAC has been released. You can find it in the section Alpha and experimental.

    Changes since 2.3.3:

    • Dialog "Select distance around track" allows to increase the slider range
    • BSH map sources: updated BSH library to 3.0.0 snapshot ensure compatibility with latest Java versions
    • Mapsforge library updated to version 0.29.0
    • Map Evaluator: loading of MapsForge custom maps fixed
    • Added support for PNG 16 and 256 colors with transparency (PNG 4bit/8bit)
    • Color reduction now performed by Wu quantization algorithm, instead of JAI ColorQuantizer.
    • Java Advanced Imaging (JAI) library dependency removed.
    • Changed the tile download HTTP client from Java HttpUrlConnection to Apache Commons HttpClient 5.6 to improve reusing of HTTP connections. This improves speed and stability.
     
    • r_x

      r_x - 3 days ago

      MOBAC 2.4.0 beta 2:

      • change how BSH getTileUrl method is called to avoid multi-threading problems
      • MapEvaluator: fix initialization of default Mapsforge World contours map
       
  • Laurent Grenet

    Laurent Grenet - 5 days ago

    Thank you for this version I'll test.

    I'd like also get the corresponding source files (I have some minor modification I always do, and I want to report them in this version) : Which "commit" this 2.4.0 beta correspond ? I guess it is the latest commit, ie 4A1756. Please confirm !

     
  • Laurent Grenet

    Laurent Grenet - 5 days ago

    Hi @r_x , I did some tests of this new version.

    Globally, it works fine.

    One remark : New BSH evaluation is less verbose than before. Before, for each BSH without addHeaders method, a WARN line was issued in log file : xxx has no addHeaders method - addHeaders will not be called!
    This removing of useless WARN is OK (and welcome !)

    But, there is an issue with Map Evaluator : Sometimes, some tiles do not appear, replaced by a red cross and (inside the "tile") an error message like :
    "IOException java.lang.runtimeException: Unable to parse code syntax. "
    or "IOException java.lang.runtimeException: bsh.EvalError"
    or sometimes other errors.
    This happens whatever the currently used BSH mapsource file, including the "Reference" one (provided we have in our custom mapsources a BSH that returns something for "4uMaps"... since it is still this one that is defined as default / reference....)

    In any case, press F5 refreshes and gets again (and OK, this time) the missing tile(s).

    This occurs quite often with MapEvaluator, but never (at least until up to now....) with Mobac itself.
    And never happened in MapEvaluator with 2.3.3 rev

    I guess that it may come somewhere from the modification of tile download HTTP client ?

    PS : BTW, you didn't answer about the commit reference (for source files) corresponding to this delivery.

     

    Last edit: Laurent Grenet 5 days ago
    • r_x

      r_x - 3 days ago

      Hi Laurent.

      I have not noticed that you had answered, because Sourceforge had some problems sending the mail notifications. I got the notification for my initial post from Saturday on Monday evening...

      The source code version commit should be shown in the MOBAC title bar and the about dialog. For beta-1 it was 4a17569-> thus commit 4a17569ad7d88e9dec57bad0c527c5a65c10a58b

      If you open Mobile_Atlas_Creator.jar in a ZIP utility and open the ZIP entry mobac/mobac-rev.properties you can see all the revision details.

      Thanks for testing the beta.

      1. The random errors with BSH map sources were most likely a multi-threading problem how the getTileUrl BSH code was executed. After your hint I also noticed these errors. I changed the way how this BSH method is invoked and I now I have not seen such errors again.
      2. The MapEvaluator default map source (Mapsforge World contours) initialization was missing. This caused the errors.

      Both errors are fixed in beta2

       

      Last edit: r_x 3 days ago
      • Laurent Grenet

        Laurent Grenet - 3 days ago

        Thanks for explanations.
        I'll run the tests of beta2 tomorrow, and I'll keep you informed.

         
  • Laurent Grenet

    Laurent Grenet - 2 days ago

    I did some tests this morning, and I can confirm that

    • 1) the issue with MapEvaluator (transient error downloading tiles) do not appear any more, at least in my testing (but previously, it appeared very quickly)

    • 2) and now the "reference" map (displayed at start of MapEvaluator, and/or when clicking on the reference button) is either the "4uMaps" (provided one map with this name exist in custom map sources) or by default the mapsforge world.map (and no more an error if "4uMaps" do not exist in user's custom map sources)

    BTW, it would be better to rename with a more "neutral" name the map used as reference.
    I suggest you rename it as "ReferenceMap" (or something like that, but "neutral")
    No change vs current situation, except it's more "clean" to name it "ReferenceMap" rather than "4uMaps".... that was the name of a excellent, but now dead, world map based on OSM data.

    It will be then up to each user to define a map source named "ReferenceMap" (with any actual content (s)he wants). And users that won't have created a source "ReferenceMap" will get the current mapsforge "world.map"

    Thanks a lot for your work !

     
    • r_x

      r_x - 2 days ago

      Hi Laurent. In MapEvaluator there is already a "neutral" map source name defined as default: mapevaluator-reference. However due to a bug it might not be loaded at start-up into the map preview, only when clicking the "Reference" button.
      That will be fixed in the next beta.

      Instead of 4uMaps the default map source is in MOBAC now DefaultMapSource.

       
  • Laurent Grenet

    Hi @r_x, not sure to understand.

    I just did a test, with two custom mapsources (with different layout, to be sure of what I'm displaying) : One with the name "mapevaluator-reference", and one with the name "4uMaps"
    And then, indeed, the "mapevaluator-reference" is displayed in mapevaluator when clicking on "Reference" button (while the "4uMaps" is displayed at startup, but I've understood that you consider that as a bug, to be fixed in next beta). I was not aware of that !
    But if "mapevaluator-reference" do not exist, then "4uMaps" is displayed at startup and also when clicking on "Reference" button.
    And if neither "mapevaluator-reference" nor "4uMaps" exist, the mapsforge "World.map" is displayed, both at startup and when clicking on "Reference" button
    And if only "mapevaluator-reference" exist (and not "4uMaps"), at startup, red crosses ("illegal argument, mapfile must not be null"), and "mapevaluator-reference" displayed when clicking on "Reference" button

    As far as I have understood what you describe as the remaining bug in MapEvaluator, after fix of this bug, you imagine the following behaviour :

    • if "mapevaluator-reference" exist, it is displayed at mapevaluator startup and/or when clicking on "Reference" button
    • if it doesn't exist, world map is displayed in both cases
    • "4uMaps" (tomorrow "DefaultMapSource") is never displayed by MapEvaluator (except, of course, if voluntarily loaded, and click on "Execute code" button)

    Is that OK ?

    If yes, what is the exact purpose of "DefaultMapSource" ? When exactly is it used ?
    And is it really necessary to have both ("mapevaluator-reference" AND "DefaultMapSource")
    Isn't it a little bit complex, and wouldn't it be more simple to have only one for both purposes ?

    PS : BTW, I always call you @r_x, but I guess you have a real firstname. If is is not a secret, what is it ? Robert ?

     

Log in to post a comment.