pcb

LessTif HID: XmScrollBar Warnings

Bug #1670023 reported by Chad Parker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcb
Fix Released
Medium
Unassigned

Bug Description

In the LessTif HID, when zoomed out such that at least one dimension of the board is smaller than the dimension of the drawing area, LessTif emits warnings in the console:

Warning:
    Name: hscroll
    Class: XmScrollBar
    The specified scrollbar value is less than the minimum
    scrollbar value.

Warning:
    Name: vscroll
    Class: XmScrollBar
    The specified scrollbar value is less than the minimum
    scrollbar value.

Tags: lesstif-gui
Changed in pcb:
milestone: none → pcb-4.0.2
Revision history for this message
Bert Timmerman (bert-timmerman) wrote :

Hi Chad,

I grep'ed for "set_scroll" in src/hid/lesstif/main.c and found this near line 1219:

void
lesstif_pan_fixup ()
{
#if 0
  if (view_left_x > PCB->MaxWidth - (view_width * view_zoom))
    view_left_x = PCB->MaxWidth - (view_width * view_zoom);
  if (view_top_y > PCB->MaxHeight - (view_height * view_zoom))
    view_top_y = PCB->MaxHeight - (view_height * view_zoom);
  if (view_left_x < 0)
    view_left_x = 0;
  if (view_top_y < 0)
    view_top_y = 0;
  if (view_width * view_zoom > PCB->MaxWidth
      && view_height * view_zoom > PCB->MaxHeight)
    {
      zoom_by (1, 0, 0);
      return;
    }
#endif

  set_scroll (hscroll, view_left_x, view_width, PCB->MaxWidth);
  set_scroll (vscroll, view_top_y, view_height, PCB->MaxHeight);

  lesstif_invalidate_all ();
}

Could you please test if removing the "#if 0" and "#endif" compiler directives solves the issue ?

Kind regards,

Bert Timmerman.

Changed in pcb:
status: New → Triaged
importance: Undecided → Medium
tags: added: lesstif-gui
Revision history for this message
Bert Timmerman (bert-timmerman) wrote :

ping ;-)

Changed in pcb:
milestone: pcb-4.0.2 → pcb-4.1.0
Revision history for this message
Chad Parker (parker-charles) wrote : Re: [Bug 1670023] Re: LessTif HID: XmScrollBar Warnings

As it is, it causes a segfault. Looking at the backtrace shows what appears
to be an infinite loop between lesstif_pan_fixup and zoom_to (I stopped
looking after 25000 calls in the backtrace).

I added a one line check in set_scroll that checks the bounds and updates
the set point. Pushed to LP1670023.

On Sun, Aug 27, 2017 at 9:32 AM, Bert Timmerman <email address hidden>
wrote:

> ping ;-)
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1670023
>
> Title:
> LessTif HID: XmScrollBar Warnings
>
> Status in pcb:
> Triaged
>
> Bug description:
> In the LessTif HID, when zoomed out such that at least one dimension
> of the board is smaller than the dimension of the drawing area,
> LessTif emits warnings in the console:
>
> Warning:
> Name: hscroll
> Class: XmScrollBar
> The specified scrollbar value is less than the minimum
> scrollbar value.
>
> Warning:
> Name: vscroll
> Class: XmScrollBar
> The specified scrollbar value is less than the minimum
> scrollbar value.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/pcb/+bug/1670023/+subscriptions
>

Revision history for this message
Bert Timmerman (bert-timmerman) wrote :

Pushed to master.

Thanks and kind regards,

Bert Timmerman.

Changed in pcb:
milestone: pcb-4.1.0 → pcb-4.0.2
status: Triaged → Fix Committed
Changed in pcb:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.