Bug #1106
closedpidialer crashes when a key is pressed.
100%
Description
It gets launched fine, but dies as soon as you touch a key.
Updated by Hammel 9 months ago
- Status changed from New to In Progress
- % Done changed from 0 to 20
This is because the darea[] was initialized to 15 slots. It needs to be 16 with the last one NULL so iconTouch() can iterate the list properly.
Also, with that fixed, the touches locations are off. It might be due to having rotate enabled, maybe, when it shouldn't be.
Finally, Ctrl-C doesn't work which makes it harder to debug via the serial console.
Updated by Hammel 9 months ago
- % Done changed from 20 to 70
Rotate was enabled. Disabling it fixed key press location mapping.
Ctrl-C was not implemented correctly. Fixed that.
Last issue is the GtkEntry field is not large enough. It's just a small space at the top of the display. It needs to be larger.
Updated by Hammel 9 months ago
Setting the font size in the GtkEntry is difficult due to how that widget is structured. So it's probably easier to just replace it with a drawing area and draw functions as is done in launcher. Or maybe just write a small custom widget for the output. It just needs to size the text appropriately with pango and be updated on keypresses. Pretty straightforward.
Updated by Hammel 9 months ago
New version with custom widget starts okay, but pressing a key causes a crash. I can debug with gdb.
(gdb) bt #0 __strlen_mte () at ../sysdeps/aarch64/multiarch/../strlen.S:60 #1 0x0000fffff722cda4 in __GI___strdup (s=0x0) at strdup.c:41 #2 0x00000000004084c0 in gtk_phonenumber_get (phonenumber=0x502210) at phonenumberwidget.c:347 #3 0x00000000004051b8 in appendNum () at pidialer.c:641 #4 0x0000000000404334 in iconTouchGTK (data=0xfffff456a588) at pidialer.c:282 #5 0x0000fffff766b880 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #6 0x0000fffff766baa8 in ?? () from /usr/lib/libglib-2.0.so.0 #7 0x0000fffff766bec4 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #8 0x0000fffff7cf7294 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #9 0x0000000000406114 in main (argc=2, argv=0xfffffffffc78) at pidialer.c:1045
Updated by Hammel 9 months ago
- Status changed from In Progress to Closed
- % Done changed from 70 to 100
The display was not updated because I needed to queue the redraw after calling the set() function for the widget.
The display was not fully updated when first displayed because I needed to have the paint() function called once when the widget is instantiated. I did this with a realize callback.
The widget and dialer are now display functional, though the use of the SIM and actually making a call are not implemented.
Code tested on hardware, committed and pushed.
Closing issue.