Crash when using Edit > Selection > Make Cell

edited April 2016 in KLayout Support

Hi Matthias,

I am getting a crash in both Windows and OSX, on version 0.24.6, when using the menu Edit > Selection > Make Cell.

To reproduce this bug:

Video of the crash
https://www.dropbox.com/s/qtww4kbemurck8l/KLayout_Crash_Edit_Selection_MakeCell.mp4?dl=0

Windows error is "Runtime Error! Program: C:\Us... R6025 - pure virtual function call":

Exception code: 0x20000016
Program Version: KLayout 0.24.6 (2016-03-22 r3214) AMD64
Backtrace:
0x7ffbcca48a5c - (KERNELBASE.dll) +35420
0x50e50ef1 - (MSVCR100.dll) +462577
0x50e561ac - (MSVCR100.dll) +483756
0x7ffbb728d911 - (klayout.dll) +383249
0x7ffbb733cb1f - (klayout.dll) +1100575
0x7ffbb7239e33 - (klayout.dll) +40499
0x7ffbb723a585 - (klayout.dll) +42373
0x7ffbb723a64a - (klayout.dll) +42570
0x7ffbb7624271 - (klayout.dll) +4145777
0x7ffbb762810c - (klayout.dll) +4161804
0x7ffbb79d680c - (klayout.dll) +8022028
0x7ffbb7a5463e - (klayout.dll) +8537662
0x7ffbb7a54974 - (klayout.dll) +8538484
0x50fdab0b - (QtCore4.dll) +1157899
0x7769cf40 - (QtGui4.dll) +53056
0x77a33a3c - (QtGui4.dll) +3815996
0x77a399f2 - (QtGui4.dll) +3840498
0x776f40ac - (QtGui4.dll) +409772
0x77a39d83 - (QtGui4.dll) +3841411
0x776affa6 - (QtGui4.dll) +130982
0x776b175e - (QtGui4.dll) +137054
0x7ffbb78e7fb8 - (klayout.dll) +7045048
0x50fc7572 - (QtCore4.dll) +1078642
0x776b0dae - (QtGui4.dll) +134574
0x7770afeb - (QtGui4.dll) +503787
0x7770dced - (QtGui4.dll) +515309
0x7ffbccd123fd - (USER32.dll) +9213
0x7ffbccd1249d - (USER32.dll) +9373
0x50fee75a - (QtCore4.dll) +1238874
0x7770d305 - (QtGui4.dll) +512773
0x50fc69e1 - (QtCore4.dll) +1075681
0x50fcb090 - (QtCore4.dll) +1093776
0x7ffbb78eb309 - (klayout.dll) +7058185
0x7ffbb78eca1d - (klayout.dll) +7064093
0x7ff668c71364 - (klayout_app.exe) +4964
0x7ff668c71569 - (klayout_app.exe) +5481
0x7ff668c719a6 - (klayout_app.exe) +6566
0x7ffbcee713d2 - (KERNEL32.DLL) +5074
0x7ffbcf4f54e4 - (ntdll.dll) +87268

OSX error is:

Signal number: 11
Address: 0x11
Program Version: KLayout 0.24.6 (2016-03-22 r3214)
Backtrace:
2   ???                                 0x00007fa09223d5d0 0x0 + 140327623316944
3   klayout                             0x00000001014e1df3 _ZN2db9Instances9do_insertERKNS_8InstanceERN2tl18func_delegate_baseIjEERNS5_ImEE + 403
4   klayout                             0x00000001018e7ede _ZN3edt11MainService12cm_make_cellEv + 2142
5   klayout                             0x0000000106140c4c _ZN3lay10LayoutView14menu_activatedERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 44
6   klayout                             0x00000001061f9fba _ZN3lay10MainWindow12generic_menuERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 138
7   klayout                             0x00000001061f9e20 _ZN3lay10MainWindow12generic_menuEv + 144
8   QtCore                              0x000000010c4b3632 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 2498
9   QtGui                               0x000000010b97513a _ZN7QAction8activateENS_11ActionEventE + 250
10  QtGui                               0x000000010b9275b1 _ZNK16QMacInputContext11isComposingEv + 26449
11  libsystem_trace.dylib               0x00007fff8905307a _os_activity_initiate + 75
12  AppKit                              0x00007fff87f2a51d -[NSApplication sendAction:to:from:] + 460
13  AppKit                              0x00007fff87f2a2b7 -[NSMenuItem _corePerformAction] + 336
14  AppKit                              0x00007fff87f2a017 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 114
15  libsystem_trace.dylib               0x00007fff8905307a _os_activity_initiate + 75
16  AppKit                              0x00007fff87fea1f0 -[NSMenu performActionForItemAtIndex:] + 131
17  AppKit                              0x00007fff87fea163 -[NSMenu _internalPerformActionForItemAtIndex:] + 35
18  AppKit                              0x00007fff87fe9fbb -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 107
19  AppKit                              0x00007fff87f12ea1 NSSLMMenuEventHandler + 708
20  HIToolbox                           0x00007fff86b2d7be _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1231
21  HIToolbox                           0x00007fff86b2cc48 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 404
22  HIToolbox                           0x00007fff86b429e6 SendEventToEventTarget + 40
23  HIToolbox                           0x00007fff86b8c99a _ZL18SendHICommandEventjPK9HICommandjjhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 411
24  HIToolbox                           0x00007fff86bb7d5b SendMenuCommandWithContextAndModifiers + 59
25  HIToolbox                           0x00007fff86bb7d0c SendMenuItemSelectedEvent + 188
26  HIToolbox                           0x00007fff86bb7be8 _ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 96
27  HIToolbox                           0x00007fff86bb8596 _ZL14MenuSelectCoreP8MenuData5PointdjPP13OpaqueMenuRefPt + 711
28  HIToolbox                           0x00007fff86bb8230 _HandleMenuSelection2 + 460
29  AppKit                              0x00007fff87e3d75e _NSHandleCarbonMenuEvent + 277
30  AppKit                              0x00007fff87d7d435 _DPSNextEvent + 1906
31  AppKit                              0x00007fff88149943 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
32  AppKit                              0x00007fff87d72fc8 -[NSApplication run] + 682
33  QtGui                               0x000000010b930f3e _ZN14QDesktopWidget11resizeEventEP12QResizeEvent + 7086
34  QtCore                              0x000000010c497de2 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 498
35  QtCore                              0x000000010c49afa7 _ZN16QCoreApplication4execEv + 199
36  klayout                             0x00000001021b336b _ZN3lay11Application4execEv + 2187
37  klayout                             0x00000001021b2417 _ZN3lay11Application3runEv + 5207
38  klayout                             0x0000000101409445 _Z12klayout_mainiPPc + 341
39  klayout                             0x000000010140925b main + 251
40  libdyld.dylib                       0x00007fff8631c5ad start + 1
41  ???                                 0x0000000000000001 0x0 + 1

Comments

  • edited November -1

    And a couple more very simple GDS libraries, each containing only 1 box on layer 1:

    https://www.dropbox.com/s/295yarsjzjmxfaf/test.GDS?dl=1

    https://www.dropbox.com/s/uknongiszfspnig/test2.GDS?dl=1

    They also cause it to crash when adding two of them and making a cell.

  • edited November -1

    Hi Matthias,

    It turns out that it crashes for the simplest test. Fresh install. Empty user folder. Add 2 circles. Make cell. Crash.

    Video: https://www.dropbox.com/s/yx37v83rliei3wp/KLayout_Crash_Edit_Selection_MakeCell_Circle.mp4?dl=0

  • edited November -1

    Hi Lukas,

    thanks for that notice. Good news is that I can reproduce it on Linux too. Which means that the MacOS build is comparable to the other builds.

    Apparently "Make cells" is broken since some time when instances are involved. I'll try to fix that ASAP.

    Best regards,

    Matthias

  • edited April 2016

    Hi Matthias,

    I'm glad I'm able to report a bug that you can reproduce! And even more glad that it isn't my SiEPIC Python code that was causing it. Possibly some of the other crashing issues I've had with PCells may originate from this bug too...

    Good luck and thanks for looking into it!

    p.s. we have an edX class presently designing using your tool, and our tape-out is May 1. I made a video to showing the "make cell" option, which strangely worked when I made the first video.

    I then made a 2nd video that avoids the use of the Make Cell.

  • edited November -1

    Hi Matthias,

    I could reproduce this problem using the Mac OSX binary package (0.24.6) I provided.

    The video by Lukas was useful to trace the steps quickly.

    Once you made a patch release, I'll also rebuild it ASAP.

    Kazzz

  • edited November -1

    Hi all,

    I was able to locate and fix the problem. I'll release it soon with 0.24.7.

    It was not readily reproducible always but it could be seen in valgrind. The reason was a deleted object in the array instance cache.

    Thanks for the bug report and sorry for the inconvenience.

    Matthias

  • edited November -1

    Thank you. I noticed this occurs during copy & paste operations, so perhaps it is the same issue.

  • edited May 2016

    Hi all,

    A binary package of KLayout 0.24.7 for MacOS 10.10 and 10.11 has been built.

    I've confirmed that this issue is solved in this version as shown in
    the image file.

    Kazzz

  • edited November -1

    Thank you very much!

Sign In or Register to comment.