Project

General

Profile

Actions

Bug #1106

closed

pidialer crashes when a key is pressed.

Added by Hammel 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Immediate
Assignee:
Target version:
Start date:
17 Mar 2024
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

It gets launched fine, but dies as soon as you touch a key.

Actions #1

Updated by Hammel 8 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.

Actions #2

Updated by Hammel 8 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.

Actions #3

Updated by Hammel 8 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.

Actions #4

Updated by Hammel 8 months ago

The widget is written and compiles cleanly. It's also been integrated into createWindow() and in the callbacks for setting the number.
The code needs to be tested, first on the build system and if that works then on the PPP.

Actions #5

Updated by Hammel 8 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
Actions #6

Updated by Hammel 8 months ago

Crashes fixed. But the display is not being updated. I should compare it to pinet's drawing routines.

Actions #7

Updated by Hammel 8 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.

Actions

Also available in: Atom PDF