Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFOS: 0.54.2 shows pitch black map #186

Closed
rinigus opened this issue Jan 31, 2017 · 17 comments

Comments

Projects
None yet
6 participants
@rinigus
Copy link
Contributor

commented Jan 31, 2017

Hi,

thank you for the update and I am looking forward to test it!

On my device (oneplus x), I get pitch black map (just black) shown together with the compass. Earlier versions were displaying map fine. I guess its something that was introduced in the new release.

I tried to wipe the config and local/share dirs; uninstall and install; but nothing helped.

rinigus

@M4rtinK

This comment has been minimized.

Copy link
Owner

commented Jan 31, 2017

Can you attach a log file ? You can enable logging to file in Options->Debug->Logging and then restart modRana - on the next start there should be a log file in ~/Documents/modrana_debug_logs/ (the path is also displayed in the Options->Debug->Logging menu).

It might be also good to include raw stdout output as not everything might end up in the Python logger (some QML errors, etc.). ModRana can be started from the SailfishOS terminal (or SSH session) like this:

sailfish-qml harbour-modrana

Thanks in advance! :)

@rinigus

This comment has been minimized.

Copy link
Contributor Author

commented Jan 31, 2017

Sure! Here is a stderr and stdout log: sailfish-qml harbour-modrana > output 2>&1.

Same info seemed to be in the log. Unfortunately, nothing strikes me as a major error (at a first glance). Here, there should be just default options/map providers.

modrana_journal.txt

@M4rtinK

This comment has been minimized.

Copy link
Owner

commented Jan 31, 2017

Same info seemed to be in the log. Unfortunately, nothing strikes me as a major error (at a first glance). Here, there should be just default options/map providers.

Indeed - I have been expecting some Python tracebacks, QML errors or map server errors - but I don't really see anything critical.

Weird, I wonder if it might be something specific to either Sailfish OS ports or Fairphone 2 in general that modRana manages to trigger. Or possibly some slight difference in the API - Qt 5 on Sailfish OS already behaves slightly different in some ways than Qt 5 on desktop or Android.

It's most likely related to the new tile drawing code. Is the screen completely black (rather then gray tiles with thin lines in between) ? The new tile drawing code basically holds a tiles data model it uses to manage tiles on the screen. If the screen is totally black it could mean that the model has for some reason not been initialized, so it's not showing anything on the screen.

A couple of things from top of my head to try to see if you can get some output/something on the screen:

  • enable tiles debugging in Options->Debug - does that produce any errors in stdout/logs ?
  • is there anything relevant (errors, etc.) in the system Journal during a modRana run ?
  • try to enable map scaling in Options->Map
  • try to change the tile storage backend in Options->Map
  • try routing/displaying a changelog - does that show up on the map screen ?
  • try using online search - does it returns some results (eq. does modRana have internet connectivity ?)
  • try switching map layers & enabling overlays - does that change anything ?
  • try zooming, panning, double tap zooming, volume button zooming, etc.
  • rotating the device from landscape to portrait - any change ?
  • running modrana via qmlscene (rather than via the sailfish-qml utility)
    • it should be enough to just clone modRana git repo and then (as long as you have qmlscene installed):
cd run
./sailfish

And yet again, thanks in advance! :)

@rinigus

This comment has been minimized.

Copy link
Contributor Author

commented Jan 31, 2017

Will reply in detail as soon as I try ./sailfish trick. But just few points.

  • See attached screenshot for what I see. I presume its the same as @feathers McGraw.

  • It works on Nexus 4 (720p screen).

  • Taking into account that it fails on OnePlus X (my device) and Fairphone 2 (@feathers McGraw), I presume that it fails on 1080p screens. Working theory that can be tested against other devices with the same resolution.

screenshot-17-01-31-18-45-49

Moving on to test ./sailfish. Then will check the logs again.

@M4rtinK

This comment has been minimized.

Copy link
Owner

commented Jan 31, 2017

It works on Nexus 4 (720p screen).

Good to know the issue is not Sailfish OS port specific. :)

Taking into account that it fails on OnePlus X (my device) and Fairphone 2 (@feathers McGraw), I presume that it fails on 1080p screens. Working theory that can be tested against other devices with the same resolution.

Yes, it could very well be resolution dependent - but I was testing the code on a few days ago on a Jolla Tablet, which has even higher resolution and it worked fine. So if it's resolution dependent then either changes since then broke it (I need to retest with the latest code) or it for some reason (bad math ? etc.) happens only on 1080p screens.

@rinigus

This comment has been minimized.

Copy link
Contributor Author

commented Jan 31, 2017

For a condition, I did see a map that was rendered on a fraction of a screen with the black area next to it. Later the map was overdrawn by black. Unfortunately, its very hard to get and I couldn't reproduce it. That was with ./sailfish, but I have a feeling it maybe just by chance. It appeared by zooming in and out.

Maybe one of the overlay elements is creating this situation? Can you somehow disable and leave only the maps drawn? Then I can run it with this scraped down version, maybe?

Otherwise, I see only the buttons on screen. I can make routing buttons to appear, but not the one that should appear by holding a map (route here).

Reply to the suggestions:

  • enable tiles debugging in Options->Debug - does that produce any errors in stdout/logs ?

nothing stands out, unfortunately

  • is there anything relevant (errors, etc.) in the system Journal during a modRana run ?
    nope, as far as I can see

  • try to enable map scaling in Options->Map

no change

  • try to change the tile storage backend in Options->Map

no change

  • try routing/displaying a changelog - does that show up on the map screen ?

route is not displayed/option menus work fine

  • try using online search - does it returns some results (eq. does modRana have internet connectivity ?)

yes, modrana does fetch tiles. online search - pressing on Address goes back to black screen with map?

  • try switching map layers & enabling overlays - does that change anything ?

black screen

  • try zooming, panning, double tap zooming, volume button zooming, etc.

no change

  • rotating the device from landscape to portrait - any change ?

ROTATING brings map for a second that is overdrawn by black box.

@M4rtinK

This comment has been minimized.

Copy link
Owner

commented Feb 1, 2017

Thanks a lot for the detailed testing, much appreciated! It definitely looks more and more like something in the new tile display logic/tiles model, rather than say tile download/loading from storage issue or outright graphics bug (as everything else is displayed correctly).

And its possibly a race condition - I've checked the latest code on the Jolla Tablet which has substantially higher resolution than 1080p and it works fine, so it's not a >=1080p thing, rather a ==1080p race for some reason.

Anyway, I might have a lead - I might have hit the same thing basically at random on my Jolla C - no tiles being shown & the terminal output showing "Attempt to send message before WorkerScript establishment" warning.

That could very well result in a black screen due to skipping a tile model update (so the tile model is empty). I've added a check that the WorkerScript has been initialized & logic to resend any messages that have arrived until it has been initialized. So let's see if it fixes the issue or not - just try installing 0.54.3. It should also have a fix for the broken place search. :)

If that does not help - please checkout the the master-no_tiles_debug branch and run it via ./sailfish and attach the output. I've added & enabled a significant tile model debugging messages that should help shedding light at the issue. :)

@rinigus

This comment has been minimized.

Copy link
Contributor Author

commented Feb 1, 2017

Unfortunately, 0.54.3 still has the same bug. No obvious error messages in the logs either :(

@rinigus

This comment has been minimized.

Copy link
Contributor Author

commented Feb 2, 2017

Here is the output for master-no_tiles_debug branch output
modrana.txt

@sam-hobbs

This comment has been minimized.

Copy link

commented Feb 2, 2017

Attached is the output from Fairphone 2. Hope it's useful!

output.txt

@hoscarh

This comment has been minimized.

Copy link

commented Feb 3, 2017

The same issue on my OnePlus X.

@rinigus

This comment has been minimized.

Copy link
Contributor Author

commented Mar 15, 2017

@martink: maybe the bug is somewhere in geometry? 1920/256 gives perfect 7.5 and maybe there is some rounding error / rounding differences at different part of the code? Crazy theory - just wanted to share and not forget about it. At least that's different from N4

@mlehtima

This comment has been minimized.

Copy link

commented Mar 19, 2017

I tested modRana 0.54.3 on FP2 using both Sailfish OS 2.0.5.6 and 2.1.0.9 and on 2.0.5 the map is black but on 2.1.0.9 the map is shown normally.

@kimmoli

This comment has been minimized.

Copy link

commented Mar 19, 2017

Tested 0.54.3 on oneplus x

  • 2.0.5.6 beta-4: black map (identical behaviour as explained above)
  • 2.1.0.9 pre-beta-5: works ok, or i can see the map atleast.
@rinigus

This comment has been minimized.

Copy link
Contributor Author

commented Mar 19, 2017

That's really promising. Let's wait then till 2.1.0 gets released and hope that the bug would fix itself automagically!

@rinigus

This comment has been minimized.

Copy link
Contributor Author

commented May 9, 2017

Its fixed now with 2.1 release on Onyx. I suggest to close it.

@rinigus

This comment has been minimized.

Copy link
Contributor Author

commented Dec 15, 2017

Closing since its fine now

@rinigus rinigus closed this Dec 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.