Freeze while zooming in GL on OSX

Bug #1553428 reported by Chris Pavlina
44
This bug affects 6 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Unassigned

Bug Description

This is 100% reproducible on one machine but not on a similar one. Might be hard to track down, or not, I'm not sure.

On OS X:
- Open KiCad
- Open a project
- Open the PCB layout by double-clicking on the PCB file
- Switch to OpenGL canvas using menu
- Zoom in with two-finger scroll
- While still zooming in, zoom back out

Application: kicad
Version: (2016-02-18 BZR 6564)-product release build
wxWidgets: Version 3.0.2 (debug,UTF-8,compiler with C++ ABI 1002,GCC 4.2.1,STL containers,compatible with 2.8)
Platform: Mac OS X (Darwin 15.3.0 x86_64), 64 bit, Little endian, wxMac
Boost version: 1.57.0
         USE_WX_GRAPHICS_CONTEXT=ON
         USE_WX_OVERLAY=ON
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=ON
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

Attached file contains machine specs and a trace. I'm not sure how to use the trace data, I assume OSX devs recognize the format?

Tags: gal pcbnew osx

Related branches

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :
Revision history for this message
Christoph Nieß (toffi-mixedstuff) wrote :

Additional information from the user who encountered this: The difference between the computer with the freeze and the one without might be that the one which freezes has the Cuda libraries installed, which might fiddle with the graphics.

Also, the problem still appears with a newer nightly build:
Application: kicad
Version: (2016-03-04 BZR 6608)-product release build
wxWidgets: Version 3.0.2 (debug,UTF-8,compiler with C++ ABI 1002,GCC 4.2.1,STL containers,compatible with 2.8)
Platform: Mac OS X (Darwin 15.3.0 x86_64), 64 bit, Little endian, wxMac
Boost version: 1.57.0
         USE_WX_GRAPHICS_CONTEXT=ON
         USE_WX_OVERLAY=ON
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=ON
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

Revision history for this message
Jesse (jesse-fsck) wrote :

I'm able to reproduce this reliably on 4.0.2, but not on 4.0.1, using the 'official' builds.

Adam Wolf (adamwolf)
tags: added: osx
Changed in kicad:
status: New → Confirmed
Revision history for this message
Christoph Nieß (toffi-mixedstuff) wrote :

Additional information (again) from playing around a bit with mac-style zooming and panning:

The Freeze happens the moment you hit maximum-out zoom ("Z 0.30"), regardless of any further action like zooming back in and regardless of how fast you zoom.

Still just crashes on one of two identical Macbooks, the only difference seems to be Cuda.

Working with a nightly build:
Application: kicad
Version: (2016-04-07 BZR 6671)-product, release build
Libraries: wxWidgets 3.0.2
           libcurl/7.43.0 SecureTransport zlib/1.2.5
Platform: Mac OS X (Darwin 15.4.0 x86_64), 64 bit, Little endian, wxMac
- Build Info -
wxWidgets: 3.0.2 (UTF-8,STL containers,compatible with 2.8)
Boost: 1.57.0
Curl: 7.21.4
KiCad - Compiler: Clang 7.0.0 with C++ ABI 1002
        Settings: USE_WX_GRAPHICS_CONTEXT=ON
                  USE_WX_OVERLAY=ON
                  KICAD_SCRIPTING=ON
                  KICAD_SCRIPTING_MODULES=ON
                  KICAD_SCRIPTING_WXPYTHON=ON
                  USE_FP_LIB_TABLE=HARD_CODED_ON
                  BUILD_GITHUB_PLUGIN=ON

Revision history for this message
fluffyfrog (frotteefrosch) wrote :

Same here. It seems to be related to screen resolution/window size.

On my native Laptop screen (1280*800) everything works.

Put the window on external screen (2560*1440), the freeze occurs when zooming out max with maximized window.

If the window is only 1/2 of the screen size, there is no problem.
Zoom out & Pull the window to 3/4 of screen size -> freeze.

Application: kicad
Version: (2016-03-31 BZR 6658)-product, release build
Libraries: wxWidgets 3.0.2
           libcurl/7.43.0 SecureTransport zlib/1.2.5
Platform: Mac OS X (Darwin 14.5.0 x86_64), 64 bit, Little endian, wxMac
- Build Info -
wxWidgets: 3.0.2 (UTF-8,STL containers,compatible with 2.8)
Boost: 1.57.0
Curl: 7.21.4
KiCad - Compiler: Clang 7.0.0 with C++ ABI 1002
        Settings: USE_WX_GRAPHICS_CONTEXT=ON
                  USE_WX_OVERLAY=ON
                  KICAD_SCRIPTING=ON
                  KICAD_SCRIPTING_MODULES=ON
                  KICAD_SCRIPTING_WXPYTHON=ON
                  USE_FP_LIB_TABLE=HARD_CODED_ON
                  BUILD_GITHUB_PLUGIN=ON

Revision history for this message
xzcvczx (xzcvczx) wrote :

@fluffyfrog are you running cuda?

Revision history for this message
xzcvczx (xzcvczx) wrote :

Hmmm, never mind... i have been able to reproduce the bug without cuda and on my macbook air by setting the pcbnew window size in the configuration file to 2560x1440 and zooming out

Will look and see if i can find what is causing it

Revision history for this message
xzcvczx (xzcvczx) wrote :

After doing some more testing i have found that EDA_DRAW_PANEL_GAL::onPaint is being called infinite times when you zoom out fully. Its not got an event object when this occurs (but there are other times when it doesn't have an event object).

Unfortunately i am a bit stuck on how to debug where the event is coming from, and am currently working on something else but if no one else picks up with this i will get back to it. If you are having trouble triggering this (and don't have a huge ass screen) i can have it reliably occur at 1600x500 and then zooming out, or having a smaller window zoom out all the way and then keep expanding the window width until it crashes

This has been tested on linux and does not do the same thing, however apparently you are unable to zoom out to 0.30 on linux with this display configuration.

Revision history for this message
xzcvczx (xzcvczx) wrote :

After doing additional testing this seems to be with the canvas size, as it will happen at any zoom level or even without zoom at all if you pan enough in the positive x or y direction. In the negative direction it will stop at a certain value depending on zoom level. I am curious as to whether this is an overflow of a signed value somehwere

Revision history for this message
xzcvczx (xzcvczx) wrote :

Attached is a patch that due to the broken nature of scroll bars in osx on both cairo and opengl it just disables/hides the scrollbars and stops them being updated.

On OpenGL the scrollbars are never visible
On Cairo the scollbars do not display the full width/height of the canvas and are only visible around the scroll handle

This has no effect on legacy canvas where the scrollbars do work correctly

Revision history for this message
xzcvczx (xzcvczx) wrote :

Attached is v2 that may be more suitable

Changed in kicad:
status: Confirmed → Fix Committed
Changed in kicad:
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.