llandsmeer / inkvt

Experimental VT100 terminal emulator for Kobo e-readers
GNU General Public License v3.0
39 stars 5 forks source link

Kobo Touch N905B segmentation fault with --osk #16

Open anthbrtn opened 3 years ago

anthbrtn commented 3 years ago

Hey there,

Getting a segmentation fault when trying to launch from a Kobo Touch N905B with the --osk flag. Binary that I have works fine launching the osk on an Aura HD on firmware 3.18, but hasn't worked on the Touch on firmware 2.2.0 nor on firmware 4.24.15676. Logs from both look identical; this is when launching from a KFMon trigger (which I understand isn't really supported on 4.24.X) and from a NickelMenu trigger:

Variable fb info: 600x800 (608x1792), 16bpp @ rotation: 3 (Counter Clockwise, 270°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 2179072 bytes & line length: 1216 bytes
Device's expected Portrait orientation should be: 3 (Counter Clockwise, 270°)!

Current rotation is already 3!

Switching fb to 8bpp @ rotation 3 . . .
Setting bitdepth to 8bpp
Setting grayscale to 1
Setting rotate to 3 (Counter Clockwise, 270°)
Bitdepth is now 8bpp (grayscale: 1) @ rotate: 3 (Counter Clockwise, 270°)

Variable fb info: 600x800 (608x1792), 8bpp @ rotation: 3 (Counter Clockwise, 270°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 2179072 bytes & line length: 608 bytes
[FBInk] Detected a Kobo Touch A/B (310 => Trilogy @ Mark 3)
[FBInk] Enabled Kobo w/o Multi-Touch quirks
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 167 dpi
[FBInk] Variable fb info: 600x800, 8bpp @ rotation: 3 (Counter Clockwise, 270°)
[FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 2179072 bytes & line length: 608 bytes
[FBInk] Canonical rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x32 (Terminus base glyph size: 8x16)
[FBInk] Line length: 37 cols, Page size: 25 rows
[FBInk] Pen colors set to #000000 for the foreground and #FFFFFF for the background
Segmentation fault
Restoring original fb bitdepth @ 16bpp & rotation @ 3

Not exactly sure what's up, considering that it works from the Aura HD. Might it be something to do with my buildchain? I used the koxtoolchain to make the binary.

NiLuJe commented 3 years ago

There are three variants of the Touch, all of 'em subtly different, and full of weird quirks.

I'm already mildly surprised it works at all, to be honest ;p.

Assume anything below FW 4.13 is another source of potential weirdness on top of that ^^.


Now, on the the OSK issue proper!

First off: even if you get it to not crash, I don't expect the touch translation to be accurate on a Touch. See my first § about the three Touch and their quirks. We didn't know how to tell them apart before (and I'm actually not sure we do now, I took a wild guess in FBInk), and they all have a differently quirky touch panel.

Next: we can't really tell you much more without a backtrace. You'll have to build everything with debug symbols, and get rid of the stripping (the Makefile is currently buggy in that it does that for native builds, but not the Kobo builds, c.f., #17 ^^).

Then run it manually, in a shell, under gdb. e.g., gdb ./inkvt.armhf ... r --osk. Then bt full when it crashes.

(I have a gdb build in there).

And on the the wild guess: It's entirely possible it's something as simple as the hard-coded key sizes being too large for the smaller screen.

NiLuJe commented 3 years ago

(Unrelated sidebar: The KFMon script should now be mostly okay after #12 ;).)