All of my code is fine when I build/run the application; whenever I edit it, up comes a lot of error messages with errors such as
"Use of undeclared type '-object type-'"
as you can see in the picture below. From what I have observed, it happens after #NSApplicationMain but if I remove it, the code errors for good. Any insights on why this happens?
It also terminates itself when I run it with the error "an uncaught exception was raised". The app gets terminated on line 29 where the AppDelegate class is defined. I put the error log in a GitHub Gist here.
I was on an old beta of Xcode 6.1.
Related
I was trying to update my project from Xcode 13 to Xcode 14.
But I got a lot of errors. They are similar but I don't know how to fix them. Take a look in the image below:
It's the same error that appears in a lot of files.
I try to click on "Type declared here".
But it didn't appear the error inside the Swift file.
When I click on "self declared here", I see this
It shows no error on the file.
When I was clicking on the errors, they vanish sometimes, but for some unknown reason, they reappear after some time.
Anyone got any idea of how to fix this?
EDIT 1:
The problem is related to the "OcrProcessingViewController" class.
I comment this class and the code starts to work again. But I still din't find what was causing the problem.
If I restore the code, I can see only one error now.
This is the full code on my "OcrProcessingViewController" class file
https://swiftfiddle.com/kfmxwr6snrbknne3msmapvkx5m
I suspect it is related to the "protocol CodigoOcrDataDelegate: AnyObject", but I don't know how yet how this happens.
I find out what was causing the problem.
It was the property
lazy var textDetectionRequest: VNRecognizeTextRequest = {
let request = VNRecognizeTextRequest(completionHandler: handleDetectedText)
request.recognitionLevel = .accurate
request.recognitionLanguages = ["en_GB"]
return request
}()
I just need to move it to start of the class(removing it from inside the function) and everything works perfectly now on Xcode 14
I have an issue with an iOS app I'm working on (https://github.com/nodoid/WeatherApp). It builds and deploys fine but when you hit any UI element that isn't a label, it crashes with an error such as
ViewController btnGetWeather unrecognised selector sent to instance
Error: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: ViewController btnGetWeather unrecognised selector sent to instance
It's been a long time since I've done anything with iOS native (I was still using xibs!). It looks like everything is correct on the storyboard but I'm at a loss as to why this is happening given everything builds.
I've done the usual trick of deleting the obj folder in the iOS project, but still get this issue.
I downloaded your code to try it out. When I click the button, the error message :Name: NSInvalidArgumentException Reason: Application tried to present modal view controller on itself. Presenting controller is <UIAlertController: 0x7fb648008a00>.
I found the reason for this problem: In the ShowError method of your ViewController.cs, you use the alert.PresentViewController() method, you need to change the alert of this line of code to "this.PresentViewController()".
I created a simple UWP app from the VS 2017 blank UWP template. No added XAML or C# code-behind:
Create new app with Blank Universal Windows template
Set Debugger type to Mixed (Managed and Native)
Build and Run (No XAML or code added)
Following error: WinRT originate error - 0x80070490 : 'Element not found.'
This happens every time. Does anyone have a handle on this error? If I don't have Mixed Mode debugging on, I don't see the error but I'm assuming it's still there. Is this an error that I should be concerned about?
Thank you.
A lot of problem may result this error, and it should not be a fatal error in your case. Most likely you changed the default Exception Settings in visual studio.
Just like all other apps, Windows use exceptions and catch them at different level.
For end user, you should not see this exception and app should not crash.
In your situation, I think you click continue and the program should not crash, and it should not be a big concern.
I suggest you:
1, start and debug your app, open Debug|Windows|Exception Setting, then click the 'restore the list to default settings' button
2, restart your app.
3, You should not catch the exception, but you still see error message in Output window.
If you still see a exception window popup, you need to post more information like your os version, and then someone can help you
I met this error when I call the winRT api CommunityToolkit.WinUI.Notifications.ToastNotificationHistoryCompat.Clear(). Then let the app toast someting once the error had gone.
I have made a Windows Phone application with Xamarin and Mvvmcross. When debugging the application it works perfectly. So the application was uploaded to the app store. but when the application got downloaded and run from the store it shut down immidiately after the icon gets clicked. So now i found out that the application does not work when running it on a device in release mode. (on a emulator it works fine).
First i got this exception
Error 1 Error : DEP6810 : MdilXapCompile.exe failed with error code 1004. See log file '~project.WinPhone\obj\Release\MDIL\MDILXapCompileLog.txt' for more details.
in this file there was an error
Compile filter argument specified non-existent file: ~project.WinPhone\obj\Release\MSIL\nl-NL\project.resources.dll
Invalid argument
This error made it unable to deploy the application to the device in release mode. I still have no idea why i got this error and how i am supposed to solve it. But i found a form of workaround by creating a 'nl-NL' map in the MSIL and adding the resource.dll to it. This made it able to deploy the application.
But when deploying the application in this state it crashed immediately. with the native debugger i could get it to break. it gave me this exception
Unhandled exception at 0x775E062F (COMBASE.DLL) in project.WinPhone.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x04F80AB8, 0x00000006).
Clicking on the Disassembly it had it's pointer on this line
77808534 bl SignalStartWerSvc (777FED78h)
It probably has something to do with my localizedresources, where i define some .resx files for filling the app with text. I did find out that this is causing me some problem with WP but i am not sure what i could do against it, i cannot use .resw files as have been suggested.
Has anyone ever had this sort of issue before and does anyone know how to solve it? It is keeping me from placing a working application on the app store, which is really frustrating.
Thank you in advance
I've assembled my new PC yesterday, and I've decided to give Windows 8 a try. However, today, during the debugging of moderate Qt application, debugger yielded "Invalid Binding Handle" error message on a pretty simple line (it was line that is auto-generated by Qt's moc.exe:
// QWebView *view (...)
view->setUrl(QUrl(QString::fromUtf8("about:blank")));
// Failing in setUrl call, not in QUrl constructor, or in fromUtf8 function.
However, running this application without debugger works just fine, both in Release and Debug versions.
I've got some clues on the internet to enable Terminal Services, but it seems that there is no such service in Windows 8.
Does anybody have any clue what should I check?
Edit
Moving the widget into other application yielded no error, so apparently, widget (which is pretty small - just QWebView and QProgressBar) is fine. But, when I show this widget in my main function:
QApplication app(argc, argv);
MyWidget w;
w.show();
return app.exec();
it is still failing with the same error. Examining call stack (which is not very helpful when error appear) and stepping into function calls, I've tracked error down to retval = HeapFree(_crtheap, 0, pBlock); in function _free_base, in file free.c And it seems that function is called from dbgdel.cpp, function _free_dbg( pUserData, pHead->nBlockUse ); and it is called from unlock() function.
Attaching the debugger to already active process is still yielding the same error.
I am linking a lot of 3rd party libraries here, so I will try without them, as I'm run out of ideas...
Edit 2:
If I pass this exception to the program, it seems to be running fine.
Edit 3
Commenting setUrl line raises the same exception somewhere in QWebKit, where strdup function is called...
Well, this was easy, but it took me two months to solve (while ignoring the error in the meantime).
This was not an unhandled exception - this was handled exception, and stepping into assembly code and watching the stack frame told me that this exception was handled.
Then I remembered that I've set debugger to break when all C++ and Win32 exceptions are raised. Resetting the debugger settings removed the issue.