M4rtinK / modrana

ModRana is a flexible GPS navigation system for mobile devices. This is the main upstream modRana source code repository - waiting for your pull requests & patches! :)
www.modrana.org
GNU General Public License v3.0
66 stars 21 forks source link

[Regression] Screen output is shifted in v0.56.14 #282

Closed Olf0 closed 5 years ago

Olf0 commented 5 years ago

modRana's screen output is strangely shifted (¼ of the screen content is off-screen) in v0.56.14 from OpenRepos the Jolla Store. This affects landscape and portrait orientation, and it affects all GUI output of modRana. Previous modRana versions, up to and including v0.55.20, are working fine. Tested on a Jolla 1 phone with SailfishOS 2.2.1.18.

Exemplary screenshots:

  1. Screenshot_20190319_001
  2. Screenshot_20190319_002
  3. Screenshot_20190319_003
  4. Screenshot_20190319_004
  5. Screenshot_20190319_005
Olf0 commented 5 years ago

Oh, it is a little different but even worse on an Xperia X with SailfishOS 3.0.1.11: The shift is consistent between landscape and portrait orientation, so that the black area to the right (in landscape) respectively to the bottom (in portrait) stays constant. But the black area is even larger than on a Jolla 1!

Olf0 commented 5 years ago

And I missed to mention, that the "starting modRana..." start-up screen is centered correctly for a few seconds, before it becomes shifted as depicted in screenshots 3 and 4 above.

Olf0 commented 5 years ago

This issue actively evades debugging: 😉

Any ideas for further debugging?

P.S.: The debugging output to stdErr is really nice and informative. Maybe it makes sense to prepend every line with an absolute (wall / system clock) or relative (i.e., modRana's runtime since start-up) time stamp to capture the timing behaviour (function's runtime, phases of user inactivity etc.), instead of appending relative timing information (apparently in multiple formats) to a few, specific lines of debug output.

Cmdr-Zod commented 5 years ago

I have the same problem on a Jolla C flashed Intex Aquafish with Sailfish OS 3.0.1.11. I can't reproduce it when starting Modrana on the shell. On my other devices (Jolla 1, Intex with original Firmware and Sony Xperia X dual sim) it works fine. Tell me if there is something I can do to help tracking this down.

Olf0 commented 5 years ago

Tried two things on the Xperia X, both did not make a difference (this issue is always present on that device):

  1. Upgraded from SailfishOS 3.0.1.11 to 3.0.2.8
  2. Tested with all Patchmanager Patches unapplied
M4rtinK commented 5 years ago

So I think I found the root cause & it should be fixed in 0.56.17 - please grab it from OpenRepos or Harbour (once past its QA) and check if it fixes the issue for you. :)

As to what was actually happening - as I was suspecting, it was related to the new native launcher:

With the fix the correct device id should always be passed regardless of how the native launcher is started (icon or CLI) and no platform/device detection should take place. :)

M4rtinK commented 5 years ago

@Olf0 BTW, one more note about logging & timestamps. :)

The full modRana stdout also ends up in the system journal & can be easily watched by running journalctl -f as root. That's how I found out the platform detection is being run when you click the modRana icon. :)

But that's actually not all - modRana can also log int a file, this can be enabled viaOptions->Debug->Log file Once this is enabled, modRana will create a new log file one every startup in /home/nemo/Documents/modrana_debug_logs/. This is pretty useful if you spot an issues, as you can just check the respective log file and see what happened.

And the lines in the log file have a rather precise timestamp:

2019-03-27 02:10:48,869 INFO :  == modRana Starting ==
2019-03-27 02:10:48,871 INFO :   0.56.14
2019-03-27 02:10:48,871 INFO :   Python 3.7.2
2019-03-27 02:10:48,873 INFO :   Sailfish OS 3.0.2.8 (Oulanka)

So considering that, having the timestamp also in the stdout is most likely not necessary. :)

Olf0 commented 5 years ago

[...] the root cause [...] should be fixed in 0.56.17 - please [...] check if it fixes the issue for you. :)

I am abroad currently and my testing devices are at home. Will check next Monday, earliest.

As to what was actually happening - [...]

Thank you for the explanation.

BTW, one more note about logging & timestamps.

That is extremely helpful to know and will be useful when I ever run into an issue with modRana again (if I still remember that, then).

Cmdr-Zod commented 5 years ago

@M4rtinK Problem is solved on my affected device, thank you for the fix.

Olf0 commented 5 years ago

Ack. Fixed in 0.56.17