Qt creator (mac) crashes while opening .ui file - macos

When I try to open a .ui form in Qt Creator, it crashes.
Here's some strings from a crash report:
Application Specific Information:
terminating with uncaught exception of type std::bad_alloc:
std::bad_alloc abort() called
Does anyone know what to do? If so, help me out, please.

OK, here's the solution:
I have reinstalled the OS and Qt with all its parts works properly.
If someone has the same problem and has a Time Machine archive, do not restore from it, 'cause if you do, the bug will remain. Instead of that, install OS X and then restore files from Finder, if necessary.

Related

Prevent or clear app state persistence for MacOS SwiftUI Document Based App

I am developing a MacOS Document based app using SwitfUI on MacOS 12.0.1 using Xcode 13.1 on a MacbookPro M1 Pro. I am encountering an issue that the app is always re-opening the document browser at the last used directory. Which is OK when it is on the Machine but a pain if the last used was on a network drive. I am trying to find a way of suppressing this "always restore using the last directory" mode of operation.
I have tried using the #NSApplicationDelegateAdaptor approach and implementing;
func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
print(#function + " returning false")
return false
}
within my NSApplicationDelegate class, which does get called (although it seems sometimes after the dialog is presented), however this does not stop the app secretly remembering the last directory.
Does any know where this information might be being hidden or if it can be suppressed ?
I have looked for, but cannot find, a way of injecting a starting directory into a DocumentGroup as a possible solution.
TIA Alan.
Ok, for anyone who ends up here looking for a similar issue.
After a chunk of digging I found the answer, for me, was to add
UserDefaults.standard.removeObject(forKey: "NSNavLastRootDirectory")
into the app startup. It was also suggested to do
UserDefaults.standard.removeObject(forKey: "NSNavLastCurrentDirectory")
However, just doing the first appears to suppress the file open dialog, doing both causes the file open dialog to open with the user Documents directory.

Cocos desktop app can not access to files on MacOS

I have an application with the following structure:
./Data/test.txt
./TestMacOSApp
So my TestMacOSApp opens ./Data/test.txt and uses the content of test.txt. This app was working for a long time either on my MacBook or others MacBook. Recently I noticed that the app works on my MacBook fine,
but on others it crashes throwing "File is not found exception".
I create TestMacOSApp using XCode v9.1.
MacOS version is 10.12.6.
The App creation steps are Archive->Export->ExportApp (Without re-signing).
Does someone else have such an issue?
How can I solve this issue?
I don't know how you open the file because you didn't provide the code which does this.
But I know that, when you export your app on other computers, it is important to calculate the real path with fullPathForFilename, instead of giving directly the path that you know. Like this:
auto fileUtils = FileUtils::getInstance();
string content = fileUtils->getStringFromFile(fileUtils->fullPathForFilename(filename));
Have you done this? If you have, and it doesn't work, your file is probably just not where you expect it to be, so please check again.

Firemonkey deployment folders on a Mac

I am new to Mac development and are trying to understand the location that XE2 firemonkey apps are deployed. I understand that the application is deployed into a "package" however I am not sure how this work when getting path information from within my app.
My application loads a dylib that I moved over from Visual Studio to XCode and initializes it by passing in a driver path (intended to be off the application path). i.e.
UDMXLibInit(PAnsiChar(AnsiString(driver_path))
If I put a breakpoint on this line in Delphi I find that driver_path is:
.../PAServer/scratch-dir/MacMini/LightFactory3.app/Content/MacOS/drivers
In my dylib I put a breakpoint in XCode on the "Init" function I find that the path is now:
.../PAServer/scratch-dir/MacMini/LightFactory3.app/Content
There appears to be some vodo that is truncating the path. Is this because "LightFactory3.app" is a package and there is something I dont understand or is there something else I am missing about passing this string between app and library under OSX?
Thanks in advance.
This appears to be a bug in the Expressions view for XCode 3.2. For some reason it truncates strings.
The actual string was correct - figure this out by passing it back to to my app.

DEBUGCHK macro is failing in WINCE6.0 OS

I am trying to solve an issue in my application which is abruptly crashing whenever the application use 'MIngliu' font. In order to solving and finding that bug I tried to dedug the WinCE6.0 OS kernel, and found in the output window that "DEBUGCHK" macro is failing in fontfile.cpp. But the problem is that fontfile.cpp is not available with us.So please suggest what can be done inorder to fix that issue if it is a part of kernel..Here I am also attaching the snapshot of the output window of visual studio.The last line of the window is showing the error..

Why might my Xcode be crashing (or at least displaying an error on launch)?

I am getting an error thrown when I launch my Xcode 3.2 all of a sudden:
Uncaught Exception:
*** -[NSCFArray initWithObjects:count:]: attempt to insert nil object at objects[0]
I can click through the error and Xcode seems to launch properly. I removed and reinstalled Xcode to no avail, and yet cannot find a config or perference that might be the culprit.
I am running on 10.6.3 fwiw....
Has anyone else run into this problkem?
TIA!
Regards,
Steve O'Sullivan
I don't know specifically what your error is, but you need to turn on the Xcode debugging option to catch Objective-C exceptions.
Aha! I found !/Library/Preferences/com.apple.Xcode.plist.
Quit Xcode, deleted that file and relaunched with no error....
::sigh::

Resources