Xcode has started displaying a compiler error as soon as I open my project (i.e. a build is not required) but it's all a bit odd. One error is shown in the build time tab but when I open the compiler message window there are three identical errors spread across multiple files. The errors are not highlighted in the editor window so I can't trace them but as they're flagged in files I haven't touched recently I suspected the problem was with Xcode rather than my code.
The error is shown in the build time window as:
Swift Compiler Error - cannot convert value of type '()' to closure result type 'Observable<Void>'
In the messages window:
<unknown>:0: error: cannot convert value of type '()' to closure result type 'Observable<Void>'
These errors are spread across three files in the messages window, all of which use at least one RxSwift dependency (RxDataSources, RxSwift, and RxCocoa) and, as noted above, I haven't touched a couple of them for a week or two and my dependencies have not been recently amended so I can be reasonably certain they are not the issue.
I've done all the usual (clean, clear cache, reboot, checked error display settings, roll back to an earlier version, update dependencies, reinstall Xcode) but the error persists and I'm effectively locked out of further development until I can resolve it. To say that I'm frustrated would be an understatement!
I'm running Xcode 10.2.1 (10E1001)
Help!!
I took the app apart and then added in each class individually until the error popped up again. The problem was a typo (syntax error) in a view model struct, specifically, the line:
let editTapped = CocoaAction { return }
which should have been:
let editTapped = CocoaAction {
// do stuff
return .empty()
}
I'm guessing the failure of the compiler to highlight the error in the editor pane is a bug so I'll report it (unless anyone has views to the contrary?) as it was very time consuming to sort out. The odd things was that rolling back to a previous working version didn't fix it - I had to delete the entire app and then rebuild it from scratch manually adding the files as I went. Weird...
Related
My DES model was working well till I've added a new function (just like many others added before) and the model gave me all these error messages:
I wonder what do these messages mean and what made all of them appear suddenly. I was running the model just before it without any errors. Is there a way I could get my model back? :)
Thank you.
Edit 1:
Here is the newly created function: Newly created function
Given that I've ignored it, and made all the callings of it as comments, then the errors were still appearing. I've closed this model version and opened a backup then created the same function and the whole scenario happened again with the same 94 errors.
Is there something I need to change in the function itself?
The function checks the number of agents in certain parts of the model to stop delay blocks accordingly. That's done by adding variables that increment on exiting of agents and get the difference between them.
Typically this is caused by a syntax error in the new function that you created. See if you ignore this and then compile if it gets fixed.
Most of the time the compiler is smart enough to show you the error, but often if you replace a { with [ or you leave out a { the compiler get very confused and gives you 100s of errors.
If yous still cant find the issue maybe paste the code of your new function in the question.
I have been getting very frustrated with Dart as runtime exceptions seem to fail silently. Program execution will continue after some type of failure and leave me totally stumped about what is not working and why. For example, in using aqueduct for dart server (this is not an issue unique to aqueduct, but dart in general) I have this code:
jsonData.forEach((jsonObject) async {
ManagedObject record = Document();
record.read(jsonObject);
print(Util.jsonFormatToString(record.asMap()));
....more code
}
In this case, the application fails silently on record.read() falls out of the forEach loop and then continues code execution. During debugging, the application returns completely strange results and after debugging, presumably there is a problem with the jsonObject attempting to be read into the managed object, but Dart gives no notice that there is a problem or what that problem might be.
This is one example of many I have been running into.
Why does Dart fail so silently or am I missing some setting somewhere that is hiding critical info? I am using IntelliJ IDE.
I'm using columns of type "geography" for some few "point within polygon" queries. They are too few and too simple to bundle a GIS gem, I handle it all on the SQL level.
However, every time Rails boots (rake tasks, console etc), the following warning is spit:
unknown OID 17227: failed to recognize type of 'geography'. It will be treated as String.
I'm fine with "geography" being treated as "String", but the warning triggers warning mails every time a cronjob executes any rake task.
Any idea how I can silence this warning?
Thanks for your hints!
Looking at the source of ActiveRecord, I can answer the question myself:
The warning is hardcoded and therefore can't be silenced by AR configuration. However, RUBYOPT=-W0 gets rid of warnings altogether. This is a big chopper of course, but since I'm still getting those warnings in local development, I can live with a totally warning-less production system.
Since this is the first question/answer that appears given that the title is the error, I would recommend following this answer to fix it: What is the source of "unknown OID" errors in Rails?
I am using Xcode 9.2 and see the below messages in the debug area.
Shared Swift state for MYAPP has developed fatal errors and is being discarded.
REPL definitions and persistent names/types will be lost.
Also, expressions are not showing their values. They always show "invalid expression"
What could be the reason?
I only have 1 line of code, and this is:
pcrecpp::RE re("abc");
inside a function OnBnClickedButtonGo(). And this function fails in Release mode, but it works OK in debug mode.
(I am using Visual Studio 8 on Windows XP.)
The error message is:
A buffer overrun has occurred in testregex.exe which has corrupted the program's
internal state. Press Break to debug the program or Continue to terminate
the program.
For more details please see Help topic 'How to debug Buffer Overrun Issues'.
I suspect it is its destructor, which is invisible and implied... but I don't know really.
PS: I am statically linking to the PCRE lib version 7.8.
PS2: Not very relevant, but may help some people who have trouble linking to the PCRE library (it took me hours to sort it out): include the line #define PCRE_STATIC.
I had the same error message in my case. In debug is everything fine, but in release I get the error message. I have a native C/C++ library like native.dll. I have created a mixed unmanaged/managed C++ library, which is a wrapper for that library to .net. Somewhere in this mixed.dll I have an unmanaged function signature declaration, like:
typedef void ( *FunctionOnStartSend)();
for this the I get the message, but if I add a "magic word" there then there is no error message:
typedef void (__stdcall *FunctionOnStartSend)();
If it's happening only in release mode, it's possible that something is getting "optimized" out. Try doing something more than just the one liner, like a Match() and maybe even printing out the matches.
Here is my fresh history:
About a month ago I've got a strange link failure of the VS2008 and that day I dug that setting _SECURE_SCL=0 may help (see link text). And it helped. That day it helped me and I just propagated this setting to all the libs we build at team -- that's because MS says that two libs built with different _SECURE_SCL are incompartible.
Time passed and three days ago I've got a bug when VS2008 says that error message that we see in the first post. And there are no help from the debugger because it overruns only in Release build. I've spend almost 2 days pump'n'jump'n the code of the libs and the overrun was flawed from line to line. Finally I started checking build settings line by line and figured the diff in this setting!
Why, oh why Microsoft guys can't embed some small check in dynamic loader code to test that the library currently running and the one going to be dynamically loaded are incompartible?! Some pice of code that save people's time. Blah!