pcbnew: Crash when deleting track with Delete Clicked Items
Description
PCB editor crashes when deleting a track with Delete Clicked Items. Deleting with the delete key works.
Steps to reproduce
- Open a PCB
- Press "Delete clicked items"
- Click on track segment
KiCad Version
Application: KiCad PCB Editor
Version: (6.0.8-1)-1, release build
Libraries:
wxWidgets 3.1.5
libcurl/7.79.1 SecureTransport (LibreSSL/3.3.6) zlib/1.2.11 nghttp2/1.45.1
Platform: macOS Version 12.5 (Build 21G72), 64 bit, Little endian, wxMac
Build Info:
Date: Sep 28 2022 15:09:52
wxWidgets: 3.1.5 (wchar_t,wx containers)
Boost: 1.79.0
OCC: 7.6.3
Curl: 7.64.1
ngspice: 37
Compiler: Clang 12.0.0 with C++ ABI 1002
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON
Additional Information
MacOS problem reporter output:
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: kicad [6074]
Path: /Applications/KiCad/KiCad.app/Contents/MacOS/kicad
Identifier: org.kicad.kicad
Version: (6.0.8-1) ((6.0.8-1)-1)
Code Type: X86-64 (Native)
Parent Process: launchd [1]
User ID: 501
Date/Time: 2022-10-07 14:27:21.0949 -0500
OS Version: macOS 12.5 (21G72)
Report Version: 12
Anonymous UUID: 03BEE8FA-7181-015C-5A03-29DDEBCD0E8D
Sleep/Wake UUID: B6C91B63-DADD-48EC-B804-B09907FAEA47
Time Awake Since Boot: 370000 seconds
Time Since Wake: 13099 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00006000079823f0
Exception Codes: 0x0000000000000002, 0x00006000079823f0
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 10 Bus error: 10
Terminating Process: exc handler [6074]
VM Region Info: 0x6000079823f0 is in 0x600000000000-0x600008000000; bytes after start: 127411184 bytes before end: 6806543
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
__LINKEDIT 1356ca000-135772000 [ 672K] r--/rwx SM=COW ....3.18.0.dylib
GAP OF 0x5ffeca88e000 BYTES
---> MALLOC_NANO 600000000000-600008000000 [128.0M] rw-/rwx SM=PRV
MALLOC_NANO 600008000000-600010000000 [128.0M] rw-/rwx SM=PRV
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 ??? 0x6000079823f0 ???
Thread 1:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x7ff8194d697a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x7ff8194d6ce8 mach_msg + 56
2 CoreFoundation 0x7ff8195da39d __CFRunLoopServiceMachPort + 319
3 CoreFoundation 0x7ff8195d8a28 __CFRunLoopRun + 1276
4 CoreFoundation 0x7ff8195d7e6c CFRunLoopRunSpecific + 562
5 AppKit 0x7ff81c17f9ce _NSEventThread + 132
6 libsystem_pthread.dylib 0x7ff8195134e1 _pthread_start + 125
7 libsystem_pthread.dylib 0x7ff81950ef6b thread_start + 15
Thread 2:: com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x7ff8194ded5a __select + 10
1 CoreFoundation 0x7ff819601649 __CFSocketManager + 641
2 libsystem_pthread.dylib 0x7ff8195134e1 _pthread_start + 125
3 libsystem_pthread.dylib 0x7ff81950ef6b thread_start + 15
Thread 3:
0 libsystem_pthread.dylib 0x7ff81950ef48 start_wqthread + 0
Thread 4:
0 libsystem_pthread.dylib 0x7ff81950ef48 start_wqthread + 0
Thread 5:
0 libsystem_pthread.dylib 0x7ff81950ef48 start_wqthread + 0
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x00007f7791382b78 rbx: 0x0000000000000000 rcx: 0x0000000000000001 rdx: 0x00007f7791382b78
rdi: 0x00007f7791382b78 rsi: 0x00007f77928e64a0 rbp: 0x0000004000000100 rsp: 0x00007f77928e64e0
r8: 0x00006000079823f0 r9: 0x0000000000000000 r10: 0x00000000ffffff00 r11: 0x0000600003ad4298
r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x0000000000000000
rip: 0x00006000079823f0 rfl: 0x0000000000010202 cr2: 0x00006000079823f0
Logical CPU: 3
Error Code: 0x00000015 (invalid protections for user instruction read)
Trap Number: 14
Binary Images:
0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
0x7ff8194d5000 - 0x7ff81950cfff libsystem_kernel.dylib (*) <a8ff3bd6-3ce8-3eee-813d-8a9202478b49> /usr/lib/system/libsystem_kernel.dylib
0x7ff81955a000 - 0x7ff819a5cfff com.apple.CoreFoundation (6.9) <c39123bf-9d62-3577-a11f-0a97cc4d9991> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7ff81bfd3000 - 0x7ff81ce62fff com.apple.AppKit (6.9) <bcb46e9b-acd5-3b26-878f-a3988bc5df7e> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x7ff81950d000 - 0x7ff819518fff libsystem_pthread.dylib (*) <f32b6d06-b156-3da0-b086-a31cf011362b> /usr/lib/system/libsystem_pthread.dylib
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=1.2G resident=0K(0%) swapped_out_or_unallocated=1.2G(100%)
Writable regions: Total=4.1G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=4.1G(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Accelerate framework 3840K 30
Activity Tracing 256K 1
CG backing stores 2640K 8
CG image 3152K 474
CG raster data 500K 58
ColorSync 232K 28
CoreAnimation 34.9M 77
CoreGraphics 16K 3
CoreUI image data 5200K 55
Foundation 52K 2
Kernel Alloc Once 8K 1
MALLOC 3.9G 795
MALLOC guard page 32K 8
MALLOC_LARGE (reserved) 640K 3 reserved VM address space (unallocated)
MALLOC_NANO (reserved) 128.0M 1 reserved VM address space (unallocated)
ObjC additional data 15K 1
OpenGL GLSL 256K 3
STACK GUARD 20K 5
Stack 10.5M 6
Stack Guard 56.0M 1
VM_ALLOCATE 64.5M 40
__CTF 756 1
__DATA 42.1M 501
__DATA_CONST 24.7M 298
__DATA_DIRTY 1017K 146
__FONT_DATA 4K 1
__GLSLBUILTINS 5176K 1
__LINKEDIT 689.7M 88
__TEXT 538.6M 502
__UNICODE 592K 1
dyld private memory 1536K 3
mapped file 199.9M 35
shared memory 800K 20
=========== ======= =======
TOTAL 5.6G 3197
TOTAL, minus reserved VM space 5.5G 3197
-----------
Full Report
-----------
{"app_name":"kicad","timestamp":"2022-10-07 14:27:22.00 -0500","app_version":"(6.0.8-1)","slice_uuid":"7f3b26bf-53d9-3340-9695-326e9c433981","build_version":"(6.0.8-1)-1","platform":1,"bundleID":"org.kicad.kicad","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 12.5 (21G72)","incident_id":"1B0F156C-DB7B-4F6A-A122-ECD76E9E3E52","name":"kicad"}
{
"uptime" : 370000,
"procLaunch" : "2022-10-07 14:23:13.7486 -0500",
"procRole" : "Foreground",
"version" : 2,
"userID" : 501,
"deployVersion" : 210,
"modelCode" : "MacBookPro12,1",
"procStartAbsTime" : 370215171380955,
"coalitionID" : 27130,
"osVersion" : {
"train" : "macOS 12.5",
"build" : "21G72",
"releaseType" : "User"
},
"captureTime" : "2022-10-07 14:27:21.0949 -0500",
"incident" : "1B0F156C-DB7B-4F6A-A122-ECD76E9E3E52",
"bug_type" : "309",
"pid" : 6074,
"procExitAbsTime" : 370462493200908,
"cpuType" : "X86-64",
"procName" : "kicad",
"procPath" : "\/Applications\/KiCad\/KiCad.app\/Contents\/MacOS\/kicad",
"bundleInfo" : {"CFBundleShortVersionString":"(6.0.8-1)","CFBundleVersion":"(6.0.8-1)-1","CFBundleIdentifier":"org.kicad.kicad"},
"storeInfo" : {"deviceIdentifierForVendor":"12411604-D0EE-5B85-9D2F-567C424323B9","thirdParty":true},
"parentProc" : "launchd",
"parentPid" : 1,
"coalitionName" : "org.kicad.kicad",
"crashReporterKey" : "03BEE8FA-7181-015C-5A03-29DDEBCD0E8D",
"wakeTime" : 13099,
"sleepWakeUUID" : "B6C91B63-DADD-48EC-B804-B09907FAEA47",
"sip" : "enabled",
"vmRegionInfo" : "0x6000079823f0 is in 0x600000000000-0x600008000000; bytes after start: 127411184 bytes before end: 6806543\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n __LINKEDIT 1356ca000-135772000 [ 672K] r--\/rwx SM=COW ....3.18.0.dylib\n GAP OF 0x5ffeca88e000 BYTES\n---> MALLOC_NANO 600000000000-600008000000 [128.0M] rw-\/rwx SM=PRV \n MALLOC_NANO 600008000000-600010000000 [128.0M] rw-\/rwx SM=PRV ",
"isCorpse" : 1,
"exception" : {"codes":"0x0000000000000002, 0x00006000079823f0","rawCodes":[2,105553243677680],"type":"EXC_BAD_ACCESS","signal":"SIGBUS","subtype":"KERN_PROTECTION_FAILURE at 0x00006000079823f0"},
"termination" : {"flags":0,"code":10,"namespace":"SIGNAL","indicator":"Bus error: 10","byProc":"exc handler","byPid":6074},
"vmregioninfo" : "0x6000079823f0 is in 0x600000000000-0x600008000000; bytes after start: 127411184 bytes before end: 6806543\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n __LINKEDIT 1356ca000-135772000 [ 672K] r--\/rwx SM=COW ....3.18.0.dylib\n GAP OF 0x5ffeca88e000 BYTES\n---> MALLOC_NANO 600000000000-600008000000 [128.0M] rw-\/rwx SM=PRV \n MALLOC_NANO 600008000000-600010000000 [128.0M] rw-\/rwx SM=PRV ",
"extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
"faultingThread" : 0,
"threads" : [{"triggered":true,"id":2829111,"threadState":{"r13":{"value":0},"rax":{"value":140151514213240},"rflags":{"value":66050},"cpu":{"value":3},"r14":{"value":0},"rsi":{"value":140151536641184},"r8":{"value":105553243677680},"cr2":{"value":105553243677680},"rdx":{"value":140151514213240},"r10":{"value":4294967040},"r9":{"value":0},"r15":{"value":0},"rbx":{"value":0},"trap":{"value":14,"description":"(invalid protections for user instruction read)"},"err":{"value":21},"r11":{"value":105553177952920},"rip":{"value":105553243677680,"matchesCrashFrame":1},"rbp":{"value":274877907200},"rsp":{"value":140151536641248},"r12":{"value":0},"rcx":{"value":1},"flavor":"x86_THREAD_STATE","rdi":{"value":140151514213240}},"queue":"com.apple.main-thread","frames":[{"imageOffset":105553243677680,"imageIndex":0}]},{"id":2829140,"name":"com.apple.NSEventThread","frames":[{"imageOffset":6522,"symbol":"mach_msg_trap","symbolLocation":10,"imageIndex":1},{"imageOffset":7400,"symbol":"mach_msg","symbolLocation":56,"imageIndex":1},{"imageOffset":525213,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":319,"imageIndex":2},{"imageOffset":518696,"symbol":"__CFRunLoopRun","symbolLocation":1276,"imageIndex":2},{"imageOffset":515692,"symbol":"CFRunLoopRunSpecific","symbolLocation":562,"imageIndex":2},{"imageOffset":1755598,"symbol":"_NSEventThread","symbolLocation":132,"imageIndex":3},{"imageOffset":25825,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":4},{"imageOffset":8043,"symbol":"thread_start","symbolLocation":15,"imageIndex":4}]},{"id":2829147,"name":"com.apple.CFSocket.private","frames":[{"imageOffset":40282,"symbol":"__select","symbolLocation":10,"imageIndex":1},{"imageOffset":685641,"symbol":"__CFSocketManager","symbolLocation":641,"imageIndex":2},{"imageOffset":25825,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":4},{"imageOffset":8043,"symbol":"thread_start","symbolLocation":15,"imageIndex":4}]},{"id":2830178,"frames":[{"imageOffset":8008,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":4}]},{"id":2830547,"frames":[{"imageOffset":8008,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":4}]},{"id":2830569,"frames":[{"imageOffset":8008,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":4}]}],
"usedImages" : [
{
"size" : 0,
"source" : "A",
"base" : 0,
"uuid" : "00000000-0000-0000-0000-000000000000"
},
{
"source" : "P",
"arch" : "x86_64",
"base" : 140703553114112,
"size" : 229376,
"uuid" : "a8ff3bd6-3ce8-3eee-813d-8a9202478b49",
"path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
"name" : "libsystem_kernel.dylib"
},
{
"source" : "P",
"arch" : "x86_64h",
"base" : 140703553658880,
"CFBundleShortVersionString" : "6.9",
"CFBundleIdentifier" : "com.apple.CoreFoundation",
"size" : 5255168,
"uuid" : "c39123bf-9d62-3577-a11f-0a97cc4d9991",
"path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
"name" : "CoreFoundation",
"CFBundleVersion" : "1866"
},
{
"source" : "P",
"arch" : "x86_64",
"base" : 140703598194688,
"CFBundleShortVersionString" : "6.9",
"CFBundleIdentifier" : "com.apple.AppKit",
"size" : 15269888,
"uuid" : "bcb46e9b-acd5-3b26-878f-a3988bc5df7e",
"path" : "\/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit",
"name" : "AppKit",
"CFBundleVersion" : "2113.60.148"
},
{
"source" : "P",
"arch" : "x86_64",
"base" : 140703553343488,
"size" : 49152,
"uuid" : "f32b6d06-b156-3da0-b086-a31cf011362b",
"path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
"name" : "libsystem_pthread.dylib"
}
],
"sharedCache" : {
"base" : 140703550087168,
"size" : 19331678208,
"uuid" : "cc386fb1-8c26-3cb7-8329-cc63095fca7d"
},
"vmSummary" : "ReadOnly portion of Libraries: Total=1.2G resident=0K(0%) swapped_out_or_unallocated=1.2G(100%)\nWritable regions: Total=4.1G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=4.1G(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nAccelerate framework 3840K 30 \nActivity Tracing 256K 1 \nCG backing stores 2640K 8 \nCG image 3152K 474 \nCG raster data 500K 58 \nColorSync 232K 28 \nCoreAnimation 34.9M 77 \nCoreGraphics 16K 3 \nCoreUI image data 5200K 55 \nFoundation 52K 2 \nKernel Alloc Once 8K 1 \nMALLOC 3.9G 795 \nMALLOC guard page 32K 8 \nMALLOC_LARGE (reserved) 640K 3 reserved VM address space (unallocated)\nMALLOC_NANO (reserved) 128.0M 1 reserved VM address space (unallocated)\nObjC additional data 15K 1 \nOpenGL GLSL 256K 3 \nSTACK GUARD 20K 5 \nStack 10.5M 6 \nStack Guard 56.0M 1 \nVM_ALLOCATE 64.5M 40 \n__CTF 756 1 \n__DATA 42.1M 501 \n__DATA_CONST 24.7M 298 \n__DATA_DIRTY 1017K 146 \n__FONT_DATA 4K 1 \n__GLSLBUILTINS 5176K 1 \n__LINKEDIT 689.7M 88 \n__TEXT 538.6M 502 \n__UNICODE 592K 1 \ndyld private memory 1536K 3 \nmapped file 199.9M 35 \nshared memory 800K 20 \n=========== ======= ======= \nTOTAL 5.6G 3197 \nTOTAL, minus reserved VM space 5.5G 3197 \n",
"legacyInfo" : {
"threadTriggered" : {
"queue" : "com.apple.main-thread"
}
},
"trialInfo" : {
"rollouts" : [
{
"rolloutId" : "60f8ddccefea4203d95cbeef",
"factorPackIds" : {
},
"deploymentId" : 240000020
},
{
"rolloutId" : "6112dda2fc54bc3389840642",
"factorPackIds" : {
"SIRI_DICTATION_ASSETS" : "620aec83b02b354d3afd2f50"
},
"deploymentId" : 240000141
}
],
"experiments" : [
{
"treatmentId" : "5b729754-3882-4560-826f-9c0bc27d77c6",
"experimentId" : "6192fb082171a2330e561df0",
"deploymentId" : 400000035
}
]
}
}
Model: MacBookPro12,1, BootROM 430.140.3.0.0, 2 processors, Dual-Core Intel Core i5, 2.7 GHz, 8 GB, SMC 2.28f7
Graphics: Intel Iris Graphics 6100, Intel Iris Graphics 6100, Built-In
Display: Color LCD, 2560 x 1600 Retina, Main, MirrorOff, Online
Display: HP 24mh, 1920 x 1080 (1080p FHD - Full High Definition), MirrorOff, Online
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1867 MHz, 0x80CE, 0x4B3445364533303445452D45474346000000
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1867 MHz, 0x80CE, 0x4B3445364533303445452D45474346000000
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x133), Broadcom BCM43xx 1.0 (7.77.111.1 AirPortDriverBrcmNIC-1710.4)
AirPort:
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM0256G, 251 GB
USB Device: USB30Bus
USB Device: USB3.0 Hub
USB Device: USB3.0 Hub
USB Device: Bluetooth USB Host Controller
USB Device: USB2.0 Hub
USB Device: AMAZON MD005 Wired Keyboard
USB Device: USB2.0 Hub
USB Device: 2.4G Keyboard Mouse
Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1