← Back to team overview

kicad-developers team mailing list archive

PCBNEW NANOMETRES build zoom crash

 

> Here's the back trace on the debug build Windows using wxWidgets 2.9.3:
> #0  0x7c90120f in ntdll!DbgUiConnectToDbg ()
>    from C:\WINDOWS\system32\ntdll.dll
> #1  0x0086b0cc in wxTrap ()
>     at e:/src/wxWidgets-2.9.3/src/common/appbase.cpp:1015
> #2  0x0086b138 in wxDefaultAssertHandler (file=..., line=120, func=...,
>     cond=..., msg=...) at e:/src/wxWidgets-2.9.3/src/common/appbase.cpp:1044
> #3  0x0086b888 in wxOnAssert (
>     file=0xb8d428 "E:/MinGW/include/wx-2.9/wx/math.h", line=120,
>     func=0xb8d901 "wxRound",
>     cond=0xb8d400 "x > INT_MIN - 0.5 && x < INT_MAX + 0.5",
>     msg=0xb8d3c0 L"argument out of supported range")
>     at e:/src/wxWidgets-2.9.3/src/common/appbase.cpp:1145
> #4  0x0094a363 in wxRound (x=2672080000)
>     at E:/MinGW/include/wx-2.9/wx/math.h:120
> #5  0x00727a29 in wxDCImpl::DeviceToLogicalXRel (this=0x1def4d98, x=1052)
>     at e:/src/wxWidgets-2.9.3/src/common/dcbase.cpp:390
> #6  0x00a55727 in wxDC::DeviceToLogicalXRel (this=0x22dd50, x=1052)
>     at E:/MinGW/include/wx-2.9/wx/dc.h:999
> #7  0x005fb11a in EDA_DRAW_PANEL::SetClipBox (this=0x1de96e58, aDC=...,
>     aRect=0x0) at e:/src/kicad-testing/dev-branch/common/drawpanel.cpp:455
> #8  0x005fb4b9 in EDA_DRAW_PANEL::DoPrepareDC (this=0x1de96e58, dc=...)
>     at e:/src/kicad-testing/dev-branch/common/drawpanel.cpp:494
> #9  0x005fb542 in EDA_DRAW_PANEL::OnPaint (this=0x1de96e58, event=...)
>     at e:/src/kicad-testing/dev-branch/common/drawpanel.cpp:508
>
> The assertion is happening in wx/math.h in the wxRound() function when
> repainting the display after the zoom.  I will shortly be committing the
> changes that scale the worksheet reference and title block and the
> Pcbnew zoom and grid sizes to accommodate nanometers so that you can
> play around with it to get a feel for some of the issues that will need
> to be resolve before nanometers can become the default internal units
> for Pcbnew.


I am working on this today.

My gut says this:


Basically it comes down to the fact that we cannot describe an area larger than about 12
feet with the nanometer internal units.

So if your board is approximately 1 sq-ft, ball park, then you should not be able to zoom
out so far that the board is now small enough to fit 12 of them on screen.

This particular hurdle (notice I leave the door open for more hurdles) is probably about
limiting the "zoom out" range such that we are well within our 12 feet.

[
   Sorry for the usage of feet, but in 196? the U.S. Government made a terrible mistake. 
They got soft, and we did not complete the conversion to metric.  :)

]


I think this means reducing the number of zoom steps in total, at least on the zoom out
end.  However, we can probably move some of those clicks to the "zoom in" end of the zoom
range, if we want to take advantage of some of our new smaller units, to some extent.  We
actually do not have to take advantage of this full range however.  We can essentially
leave some resolution for a rainy day.


Anyways, the meter is running, my boss is watching...  and she is wondering how all this
time in KiCad is ever going to pay off.

The thinking now is that new commitments will have to clear a much higher hurdle moving
forward.

Dick




Follow ups

References