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

fix JSON crash, run as root properly on macOS, update Qt #70

Merged
merged 4 commits into from
Aug 7, 2024

Conversation

kambala-decapitator
Copy link
Collaborator

@kambala-decapitator kambala-decapitator commented Jul 26, 2024

  • fix random JSON parser crash
  • macOS: switch back to running executable through sudo directly with using --askpass. Our app is used as askpass program and presents a simple password entry dialog.
  • CI: use Qt 6.7.2

@kambala-decapitator
Copy link
Collaborator Author

@phunkyfish could you check if this build works better for you?

@kambala-decapitator kambala-decapitator marked this pull request as draft July 26, 2024 20:44
@phunkyfish
Copy link
Contributor

Quits on startup:

Screenshot 2024-07-27 at 07 25 54

@chewitt
Copy link
Member

chewitt commented Jul 27, 2024

@kambala-decapitator I downloaded the artefact, but it crashed for me. See: https://pastebin.com/raw/sp4Zf2yr

@kambala-decapitator
Copy link
Collaborator Author

Yes, that's why I moved PR to draft

@kambala-decapitator
Copy link
Collaborator Author

@chewitt @phunkyfish please check the new build, seems to run fine on my ARM. I think I also fixed strange JSON parser crash.

@phunkyfish
Copy link
Contributor

phunkyfish commented Jul 30, 2024

Firstly, I can't repro the crash so that's definitely fixed!


So just launching prompts for password, but write to disk doesn't work as no permissions.

Screenshot 2024-07-30 at 21 00 33

Launching with sudo I get the same blue bar phenomenon as with a local build and still no writing to disk:

Screenshot 2024-07-30 at 20 56 32

@kambala-decapitator
Copy link
Collaborator Author

@phunkyfish @chewitt fixed the drag'n'drop issue in the new build. Now password will be asked by our own dialog (again), but now it's coming from our Qt app instead of some mysterious JS script.

Screenshot 2024-08-04 at 22 31 00

@phunkyfish
Copy link
Contributor

Nice, I have confirmed this runs (without a crash) and successfully writes an SD card on both my Intel mac mini and my M3 macbook, nice work!

@kambala-decapitator kambala-decapitator changed the title [CI] update Qt, ad-hoc code signing on macOS fix JSON crash, run as root properly on macOS, update Qt Aug 5, 2024
@kambala-decapitator kambala-decapitator marked this pull request as ready for review August 5, 2024 10:39
@phunkyfish
Copy link
Contributor

@kambala-decapitator, can you add the following to your improve JSON Parser commit?

diff --git a/jsonparser.cpp b/jsonparser.cpp
index c6f8353..99ddf3f 100644
--- a/jsonparser.cpp
+++ b/jsonparser.cpp
@@ -152,10 +152,12 @@ void JsonParser::parseAndSet(const QByteArray &data, const QString label)
                     const auto releaseItemsNode = itReleaseItems.value().toObject();

                     const auto itFile = releaseItemsNode.find("file");
-                    ReadImageName(itFile.value().toObject(), projectIndex, imagesList, projectList);
+                    if (itFile != releaseItemsNode.end())
+                        ReadImageName(itFile.value().toObject(), projectIndex, imagesList, projectList);

                     const auto itImage = releaseItemsNode.find("image");
-                    ReadImageName(itImage.value().toObject(), projectIndex, imagesList, projectList);
+                    if (itImage != releaseItemsNode.end())
+                        ReadImageName(itImage.value().toObject(), projectIndex, imagesList, projectList);

                     const auto itUbootsNode = releaseItemsNode.find("uboot");
                     if (itUbootsNode != releaseItemsNode.end())

@kambala-decapitator
Copy link
Collaborator Author

can you add the following to your improve JSON Parser commit?

Will do

@kambala-decapitator
Copy link
Collaborator Author

@chewitt can be merged

Copy link
Contributor

@phunkyfish phunkyfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@chewitt chewitt merged commit d961c40 into LibreELEC:master Aug 7, 2024
4 checks passed
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