Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foundation: unmask Windows events on the main RunLoop #4759

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

compnerd
Copy link
Member

When processing events on the main runloop, we should unmask the Windows message pump events. If we do not unmask these events, the main RunLoop is unable to process the UI events and the user has no mechanism for integrating the Windows message pump events into the run loop.

This is a slightly restrictive compromise to enable the use of RunLoop on Windows for pumping a UI application. Because CoreFoundation is not a supported API surface a user cannot simply invoke the appropriate CoreFoundation function on the RunLoop's inner (CFRunLoop) object. In order to not expose any new CoreFoundation APIs, we need to expose the functionality from the Swift layer. This is motivated by the desire to minimise the divergence from the reference implementation of CoreFoundation.

The Swift API surface is meant to be near identical to the Objective-C implementation. An option would be to expose a SPI for users to control the behvaiour of the RunLoop with regards to the Windows message loop. One caveat that exists is that CoreFoundation seems to exempt the common modes from being able to participate in the windows message loop. Fortunately, the main run loop, which is tied to the main thread, is configured to run in the default mode which may participate in the OS message loop. Additionally, the Windows UI system expects to perform the operations on the main thread, which gives us a natural point to alter the behaviour of RunLoop.

There are two instances of CFRunLoopGetMain, one which provides the storage for the main runloop, and one which is the accessor for the main runloop. Because the accessor will perform additional reference counting and bridging behavioural changes, use the CFRunLoop storage of the _mainRunLoop to acquire the main run loop.

@compnerd
Copy link
Member Author

CC: @parkera

@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@ItaiBear this doesn't really do what #4734 states but might have the desired effect though. Would you be able to test this and see if it would be sufficient for your needs?

@compnerd
Copy link
Member Author

Please test with following PRs:
swiftlang/swift#66555

@swift-ci please test Windows platform

@compnerd
Copy link
Member Author

CC: @iCharlesHu @itingliu

When processing events on the main runloop, we should unmask the Windows
message pump events.  If we do not unmask these events, the main RunLoop
is unable to process the UI events and the user has no mechanism for
integrating the Windows message pump events into the run loop.

This is a slightly restrictive compromise to enable the use of RunLoop
on Windows for pumping a UI application.  Because CoreFoundation is not
a supported API surface a user cannot simply invoke the appropriate
CoreFoundation function on the RunLoop's inner (CFRunLoop) object.  In
order to not expose any new CoreFoundation APIs, we need to expose the
functionality from the Swift layer.  This is motivated by the desire to
minimise the divergence from the reference implementation of
CoreFoundation.

The Swift API surface is meant to be near identical to the Objective-C
implementation.  An option would be to expose a SPI for users to control
the behvaiour of the `RunLoop` with regards to the Windows message loop.
One caveat that exists is that CoreFoundation seems to exempt the common
modes from being able to participate in the windows message loop.
Fortunately, the main run loop, which is tied to the main thread, is
configured to run in the default mode which may participate in the OS
message loop.  Additionally, the Windows UI system expects to perform
the operations on the main thread, which gives us a natural point to
alter the behaviour of `RunLoop`.

There are two instances of `CFRunLoopGetMain`, one which provides the
storage for the main runloop, and one which is the accessor for the main
runloop.  Because the accessor will perform additional reference
counting and bridging behavioural changes, use the `CFRunLoop` storage
of the `_mainRunLoop` to acquire the main run loop.

Co-authored-by: Darin Fisher <darinf@gmail.com>
@compnerd compnerd force-pushed the driving-everyone-loopy branch from 9eaaba7 to aea8b22 Compare June 12, 2023 21:55
@compnerd
Copy link
Member Author

Please test with following PRs:
swiftlang/swift#66555

@swift-ci please test Windows platform

@compnerd
Copy link
Member Author

@swift-ci please test Linux platform

@ItaiBear
Copy link

First of all, thank you for taking the time to fix this.
I've been trying to test this for my app, however I couldn't manage to build everything from source.
I followed the instructions from https://github.com/compnerd/swift-build/blob/main/docs/WindowsQuickStart.md, and I did multiple tries, yet each time I received the same error. Do you have any idea why it fails?

For clarification, this happens trying to build without checking this PR.
This is everything I believe to be related to the error:

S:/b/101/lib/swift\windows\CRT.swiftmodule\x86_64-unknown-windows-msvc.swiftmodule:1:1: error: fatal error encountered while reading from module 'CRT'; please submit a bug report (https://swift.org/contributing/#reporting-bugs)
<binary format>
^
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0.      Program arguments: S:\\b\\1\\bin\\swiftc.exe -frontend -c -filelist C:\\Users\\itaib\\AppData\\Local\\Temp\\sources-12bf7c -primary-file S:\\SourceCache\\swift-corelibs-foundation\\Sources\\Foundation\\CGFloat.swift -emit-module-path Sources\\Foundation\\CMakeFiles\\Foundation.dir\\CGFloat.swift.swiftmodule -emit-module-doc-path Sources\\Foundation\\CMakeFiles\\Foundation.dir\\CGFloat.swift.swiftdoc -emit-module-source-info-path Sources\\Foundation\\CMakeFiles\\Foundation.dir\\CGFloat.swift.swiftsourceinfo -emit-dependencies-path Sources\\Foundation\\CMakeFiles\\Foundation.dir\\CGFloat.swift.obj.d -emit-reference-dependencies-path Sources\\Foundation\\CMakeFiles\\Foundation.dir\\CGFloat.swift.obj.swiftdeps -target x86_64-unknown-windows-msvc -disable-objc-interop -I S:\\b\\103\\CoreFoundation.framework\\Headers -I S:\\b\\102\\src\\swift\\swift -I S:\\b\\102 -I S:\\SourceCache\\swift-corelibs-libdispatch -I S:\\SourceCache\\swift-corelibs-libdispatch\\src -I S:\\b\\102\\src -I S:\\SourceCache\\swift-corelibs-libdispatch\\src\\BlocksRuntime -vfsoverlay S:/b/101/stdlib/windows-vfs-overlay.yaml -vfsoverlay S:/b/102/dispatch-vfs-overlay.yaml -gnone -module-link-name Foundation -resource-dir S:/b/101/lib/swift -O -D DEPLOYMENT_RUNTIME_SWIFT -D Foundation_EXPORTS -plugin-path S:\\b\\1\\lib\\swift\\host\\plugins -plugin-path S:\\b\\1\\local\\lib\\swift\\host\\plugins -Xcc -FS:/b/103 -autolink-library oldnames -autolink-library msvcrt -Xcc -D_MT -Xcc -D_DLL -parse-as-library -module-name Foundation -o Sources\\Foundation\\CMakeFiles\\Foundation.dir\\CGFloat.swift.obj
1.      Swift version 5.9-dev (LLVM dab342a05f4ad9a, Swift d230a1a49e4c6c6)
2.      Compiling with the current language version
3.      Contents of C:\Users\itaib\AppData\Local\Temp\sources-12bf7c:
---
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\AffineTransform.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Array.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\AttributedString\AttributedString.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\AttributedString\AttributedStringAttribute.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\AttributedString\AttributedStringCodable.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\AttributedString\AttributedStringRunCoalescing.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\AttributedString\AttributedString+Locking.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Boxing.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Bridging.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Bundle.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\ByteCountFormatter.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Calendar.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\CGFloat.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\CharacterSet.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Codable.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Collections+DataProtocol.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\ContiguousBytes.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\AttributedString\Conversion.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Data.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\DataProtocol.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Date.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\DateComponents.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\DateComponentsFormatter.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\DateFormatter.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\DateInterval.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\DateIntervalFormatter.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Decimal.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Dictionary.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\DispatchData+DataProtocol.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\EnergyFormatter.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\ExtraStringAPIs.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\FileHandle.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\FileManager.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\FileManager+POSIX.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\FileManager+Win32.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\FileManager+XDG.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Formatter.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\AttributedString\FoundationAttributes.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\FoundationErrors.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Host.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\IndexPath.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\IndexSet.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\ISO8601DateFormatter.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\JSONDecoder.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\JSONEncoder.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\JSONSerialization.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\JSONSerialization+Parser.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\LengthFormatter.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Locale.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\MassFormatter.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Measurement.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\MeasurementFormatter.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Morphology.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Notification.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NotificationQueue.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSArray.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSAttributedString.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSCache.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSCalendar.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSCFArray.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSCFBoolean.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSCFCharacterSet.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSCFDictionary.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSCFSet.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSCFString.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSCFTypeShims.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSCharacterSet.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSCoder.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSComparisonPredicate.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSCompoundPredicate.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSConcreteValue.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSData+DataProtocol.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSData.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSDate.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSDateComponents.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSDecimalNumber.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSDictionary.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSEnumerator.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSError.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSExpression.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSGeometry.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSIndexPath.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSIndexSet.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSKeyedArchiver.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSKeyedArchiverHelpers.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSKeyedCoderOldStyleArray.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSKeyedUnarchiver.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSLocale.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSLock.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSLog.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSMeasurement.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSNotification.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSNull.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSNumber.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSObjCRuntime.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSObject.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSOrderedSet.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSPathUtilities.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSPersonNameComponents.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSPlatform.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSPredicate.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSRange.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSRegularExpression.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSSet.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSSortDescriptor.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSSpecialValue.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSString.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSStringAPI.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSSwiftRuntime.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSTextCheckingResult.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSTimeZone.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSURL.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSURLComponents.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSURLQueryItem.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSURLError.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSUUID.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSValue.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\NumberFormatter.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Operation.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\PersonNameComponents.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\PersonNameComponentsFormatter.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Pointers+DataProtocol.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Port.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\PortMessage.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Process.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\ProcessInfo.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Progress.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\ProgressFraction.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\PropertyListEncoder.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\PropertyListSerialization.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\ReferenceConvertible.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\RunLoop.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Scanner.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\ScannerAPI.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Set.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Stream.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\String.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\StringEncodings.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Thread.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Timer.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\TimeZone.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\Unit.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\URL.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\URLComponents.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\URLQueryItem.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\URLResourceKey.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\UserDefaults.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\UUID.swift
S:\SourceCache\swift-corelibs-foundation\Sources\Foundation\WinSDK+Extensions.swift
---
4.      While evaluating request ExecuteSILPipelineRequest(Run pipelines { Mandatory Diagnostic Passes + Enabling Optimization Passes } on SIL for Foundation)
5.      While running pass #3575 SILModuleTransform "MandatoryInlining".
6.      While deserializing SIL function "$s3CRT6remquoySd_SitSd_SdtF"
7.      While deserializing SIL function "remquo"
8.      *** DESERIALIZATION FAILURE ***
*** If any module named here was modified in the SDK, please delete the ***
*** new swiftmodule files from the SDK and keep only swiftinterfaces.   ***
module 'CRT', builder version '5.9(5.9)/Swift version 5.9-dev (LLVM dab342a05f4ad9a, Swift d230a1a49e4c6c6)', built from source, resilient, loaded from 'S:/b/101/lib/swift\windows\CRT.swiftmodule\x86_64-unknown-windows-msvc.swiftmodule'
module 'corecrt' was not loaded

Exception Code: 0x80000003
 #0 0x00007ff664608ba5 (S:\b\1\bin\swiftc.exe+0x5818ba5)
 #1 0x00007ffbad001881 (C:\WINDOWS\System32\ucrtbase.dll+0x71881)
 #2 0x00007ffbad002851 (C:\WINDOWS\System32\ucrtbase.dll+0x72851)
 #3 0x00007ff65fd62339 (S:\b\1\bin\swiftc.exe+0xf72339)
 #4 0x00007ff65fe5116f (S:\b\1\bin\swiftc.exe+0x106116f)
 #5 0x00007ff65fe513be (S:\b\1\bin\swiftc.exe+0x10613be)
 #6 0x00007ff65fe54cdb (S:\b\1\bin\swiftc.exe+0x1064cdb)
 #7 0x00007ff65fe0b346 (S:\b\1\bin\swiftc.exe+0x101b346)
 #8 0x00007ff65fe024d7 (S:\b\1\bin\swiftc.exe+0x10124d7)
 #9 0x00007ff65fe11beb (S:\b\1\bin\swiftc.exe+0x1021beb)
#10 0x00007ff65fe0c19f (S:\b\1\bin\swiftc.exe+0x101c19f)
#11 0x00007ff65fe04cdf (S:\b\1\bin\swiftc.exe+0x1014cdf)
#12 0x00007ff65fdcbcef (S:\b\1\bin\swiftc.exe+0xfdbcef)
#13 0x00007ff65fea8a11 (S:\b\1\bin\swiftc.exe+0x10b8a11)
#14 0x00007ff65f9ef33e (S:\b\1\bin\swiftc.exe+0xbff33e)
#15 0x00007ff65f9f161a (S:\b\1\bin\swiftc.exe+0xc0161a)
#16 0x00007ff65f9f09a2 (S:\b\1\bin\swiftc.exe+0xc009a2)
#17 0x00007ff65f776f08 (S:\b\1\bin\swiftc.exe+0x986f08)
#18 0x00007ff65f774fef (S:\b\1\bin\swiftc.exe+0x984fef)
#19 0x00007ff65f775234 (S:\b\1\bin\swiftc.exe+0x985234)
#20 0x00007ff65f774c87 (S:\b\1\bin\swiftc.exe+0x984c87)
#21 0x00007ff65f785ddd (S:\b\1\bin\swiftc.exe+0x995ddd)
#22 0x00007ff65f77194b (S:\b\1\bin\swiftc.exe+0x98194b)
#23 0x00007ff65f7752d4 (S:\b\1\bin\swiftc.exe+0x9852d4)
#24 0x00007ff65f765b69 (S:\b\1\bin\swiftc.exe+0x975b69)
#25 0x00007ff65f200c94 (S:\b\1\bin\swiftc.exe+0x410c94)
#26 0x00007ff65eff352d (S:\b\1\bin\swiftc.exe+0x20352d)
#27 0x00007ff65eff4472 (S:\b\1\bin\swiftc.exe+0x204472)
#28 0x00007ff65eff2c65 (S:\b\1\bin\swiftc.exe+0x202c65)
#29 0x00007ff65eff31fb (S:\b\1\bin\swiftc.exe+0x2031fb)
#30 0x00007ff65eff5882 (S:\b\1\bin\swiftc.exe+0x205882)
#31 0x00007ff65ee7a084 (S:\b\1\bin\swiftc.exe+0x8a084)
#32 0x00007ff65ee79a89 (S:\b\1\bin\swiftc.exe+0x89a89)
#33 0x00007ff6646942ec (S:\b\1\bin\swiftc.exe+0x58a42ec)
#34 0x00007ffbad1c7614 (C:\WINDOWS\System32\KERNEL32.DLL+0x17614)
#35 0x00007ffbaf1426f1 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x526f1)
<unknown>:0: error: compile command failed due to signal -2147483645 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Error: cmake.exe exited with code 1.
Invocation:
  cmake.exe --build S:\b\103
Call stack:
  at Invoke-Program, S:\SourceCache\swift-build\build.ps1: line 278
  at <ScriptBlock>, S:\SourceCache\swift-build\build.ps1: line 486
  at Isolate-EnvVars, S:\SourceCache\swift-build\build.ps1: line 297
  at Build-CMakeProject, S:\SourceCache\swift-build\build.ps1: line 478
  at <ScriptBlock>, S:\SourceCache\swift-build\build.ps1: line 892
  at Isolate-EnvVars, S:\SourceCache\swift-build\build.ps1: line 297
  at Build-Foundation, S:\SourceCache\swift-build\build.ps1: line 863
  at <ScriptBlock>, S:\SourceCache\swift-build\build.ps1: line 1447
At S:\SourceCache\swift-build\build.ps1:282 char:7
+       throw $ErrorMessage
+       ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Error: cmake.ex...ps1: line 1447
:String) [], RuntimeException
    + FullyQualifiedErrorId : Error: cmake.exe exited with code 1.
Invocation:
  cmake.exe --build S:\b\103
Call stack:
  at Invoke-Program, S:\SourceCache\swift-build\build.ps1: line 278
  at <ScriptBlock>, S:\SourceCache\swift-build\build.ps1: line 486
  at Isolate-EnvVars, S:\SourceCache\swift-build\build.ps1: line 297
  at Build-CMakeProject, S:\SourceCache\swift-build\build.ps1: line 478
  at <ScriptBlock>, S:\SourceCache\swift-build\build.ps1: line 892
  at Isolate-EnvVars, S:\SourceCache\swift-build\build.ps1: line 297
  at Build-Foundation, S:\SourceCache\swift-build\build.ps1: line 863
  at <ScriptBlock>, S:\SourceCache\swift-build\build.ps1: line 1447

@compnerd
Copy link
Member Author

@ItaiBear its difficult to say without seeing the full output. I suspect that there might be some mixups - note that currently if you have Swift installed, you will not be able to build the full toolchain.

@compnerd compnerd merged commit 866c512 into swiftlang:main Jun 29, 2023
@compnerd compnerd deleted the driving-everyone-loopy branch June 29, 2023 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants