Rotor Control window displays with missing knob(s) and crashes when tracking.
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- Under an hour
- Newbie friendliness
- 60/100
Research direction
The bug is in the gtk_rot_knob_update function, where the local buffer b is sized too small for the g_ascii_formatd output and the digit-label loop. Start by comparing the buffer size, the format width passed to g_ascii_formatd, and the loop bound, then check that the label indices still line up with knob->digits. Done means the Az and El knobs appear when Rotor Control opens and keep updating while tracking, with no overflow.
Written by the indexing model from the issue text.
Description
I am new to GPredict and wanted a new compile (post 3.2.37) in order to avoid wrap around tracking. I followed directions for installing MSYS2 and with only minor fussing was able to compile for windows. The program appears generally in good order (some config defaults seem off). The main issue is that when I open Rotor Control, the Az/El knobs don't show up (Az is always missing, El is usually missing). I've tracked this down to the length of the b[7] array definition, which I believe should be 8. Just to be extra safe I set it to b[9] (not familiar with g_ascii_formatd and termination etc.) and it appears to work as intended on initial opening and tracking updates.
static void gtk_rot_knob_update(GtkRotKnob * knob)
{
gchar b[7]; //<-------- Here
gchar *buff;
guint i;
g_ascii_formatd(b, 8, "%6.2f", fabs(knob->value));
/* set label markups */
for (i = 0; i < 6; i++)
{
buff = g_strdup_printf(FMTSTR, b[i]);
gtk_label_set_markup(GTK_LABEL(knob->digits[i + 1]), buff);
g_free(buff);
}
if (knob->value < 0)
buff = g_strdup_printf(FMTSTR, '-');
else
buff = g_strdup_printf(FMTSTR, ' ');
gtk_label_set_markup(GTK_LABEL(knob->digits[0]), buff);
g_free(buff);
}
- Dominant language
- C
- Stars
- 1.2k
- Forks
- 305
- Avg merge
- 8h 48m
- Merged PRs (30d)
- 3
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from csete/gpredict
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Heap out-of-bounds read/write in gpredict transponder update (missing NUL after JSON load)Possibly taken @Wahaj18 claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 78/100
Similar issues
-
[Bug] Unhandled ValueError terminates watchdog thread when GISRC value contains multiple colonsOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
bug Component component: net
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RT-Thread/rt-thread#11913 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
contiki-ng/contiki-ng#3289 ·
Maintainers usually reply within 3 days
-
area:docs help wanted type:enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
semantic-reasoning/wirelog#2229 ·
Maintainers usually reply within 1 day