GithubHelp home page GithubHelp logo

Crashing quite often about injectioniii HOT 26 CLOSED

everlof avatar everlof commented on May 27, 2024
Crashing quite often

from injectioniii.

Comments (26)

johnno1962 avatar johnno1962 commented on May 27, 2024

Hi, thanks for reporting this. What version of Xcode are you using? Have you tried the new release candidate? https://github.com/johnno1962/InjectionIII/releases/tag/4.7.3

from injectioniii.

everlof avatar everlof commented on May 27, 2024

I'm on Xcode: Version 14.3 (14E222b). I will give it a try!

from injectioniii.

johnno1962 avatar johnno1962 commented on May 27, 2024

Thanks. When did this start happening? Have you tried older versions of the app as well? Not much has changed lately.

from injectioniii.

everlof avatar everlof commented on May 27, 2024

I don't think I've seen it when I used it on the simulator. But I started using it on a real device lately and that's also when I noticed that it started happening. But I also upgraded at the same time as I tried using on real device, so hard to tell for now.

If I get more info I can post it, like, if I see it on the simulator as well on this version.

from injectioniii.

johnno1962 avatar johnno1962 commented on May 27, 2024

That's all useful information. Thanks! On-device injection versus simulator is most likely a major factor. Could you try various versions of the app back as far as 4.5.6 (which responds to HotReloading package tag 4.9.0) please to see if we can bisect if any particular change has caused a regression. Hopefully you should be able to roll back and forwards the versions of the app and the package independently.

from injectioniii.

everlof avatar everlof commented on May 27, 2024

Yeah, I haven't noticed any crashes yet, after upgrading to [4.7.3]. (https://github.com/johnno1962/InjectionIII/releases/tag/4.7.3)

Let's so how it goes, and if it happens on 4.7.3 I can go back and see.

from injectioniii.

johnno1962 avatar johnno1962 commented on May 27, 2024

Good to hear though I don't have an explanation why that would be. I've updated the 4.7.3 release candidate (build 7815) if you want to download it again to be sure you're testing what should be the final version.

from injectioniii.

everlof avatar everlof commented on May 27, 2024

I've got a new crash yesterday on 4.7.3 (7811). I've now updated to 7815. Is there a way to view the version of Injection while running? Without opening the Info.plist?

from injectioniii.

johnno1962 avatar johnno1962 commented on May 27, 2024

This is going to be tricky to track down. It's also strange it would be device injection only that is crashing the app. Could this be a networking problem? There is a way to see the build number in the app. If you hover the mouse over the "Quit Injection" menu item there is a tool tip with the build number. Have you tried downgrading to older versions of the app, for example 4.7.0?

from injectioniii.

everlof avatar everlof commented on May 27, 2024

Oh, great, thanks!

Yes, surely. I'm on wifi, but I've been at different wifi's today and yesterday.

I haven't tried downgrading, as I wanted to verify it was happening on the latest version as well, which I now have. It's crashes twice on #7815 twice in the last two hours. I'll download 4.7.0 and try!

from injectioniii.

johnno1962 avatar johnno1962 commented on May 27, 2024

Thanks, that would be a big help. Networking problem seem unlikely. Another alternative would be if you could build your own version of the app and run it in Xcode so the crash would be "symbolicated" and we could get the location.

from injectioniii.

everlof avatar everlof commented on May 27, 2024

Yeah, alright, I'll try that!

from injectioniii.

everlof avatar everlof commented on May 27, 2024

Are there any limitations when I launch from Xcode?

I get πŸ”₯ ⚠️ HotReloading loaded but could not connect to 192.168.1.243. Is injectiond running? ⚠️

from injectioniii.

johnno1962 avatar johnno1962 commented on May 27, 2024

Shouldn't be. You're running your app on a device and running the App inside Xcode? Have you worked through the checklist for connecting in the HotReloading project README talking about open ports etc? injectiond is an old name for the InjectionIII app.

from injectioniii.

everlof avatar everlof commented on May 27, 2024

Okay okay, now I got it working. Sorry, my bad. I didn't check those stuff and just expected it to work, since it was working before...

I had to re-set the deviceUnlock to any and then also I got this useful error, which I've set:

defaults write com.johnholdsworth.InjectionIII "$PROJECT_FILE_PATH" "$EXPANDED_CODE_SIGN_IDENTITY"

Now I'm running it live through Xcode on device. Let's see what we can find when it crashes.

from injectioniii.

everlof avatar everlof commented on May 27, 2024

Btw, side-note, this fails while hot-reloading: activeField = textField as? RTSTextInputField. I think I've read about this somewhere, am I right? That checking for class like that can fail for hot-reloading?

from injectioniii.

johnno1962 avatar johnno1962 commented on May 27, 2024

Thanks for persisting with this. It's appreciated. Casting can fail unexpectedly if RTSTextInputField has been injected but it doesn't crash, it just fails as the identity of the class may have changed. Good news you're up and running though. The defaults problem can occur when you switch between App Store (sandboxed) and GitHub releases which shouldn't be the case for device injection. Let me know how you get on; I'm particularly interested in crashes of the app itself.

from injectioniii.

everlof avatar everlof commented on May 27, 2024

Yeah, that was just something else that popped up.

I just noticed that InjectionIII had finished running without catching a crash. But found this in the end of the log tho:

2023-09-07 21:20:16.096728+0200 InjectionIII[27269:1925201] πŸ’‰ InjectionIII evalError: Compiling .... /List/RTSListCell.swift
2023-09-07 21:20:16.804429+0200 InjectionIII[27269:1925201] πŸ’‰ InjectionIII Signing with identity: 0F3062264D490B08756F7F37AA8D03AB6B5A3786
2023-09-07 21:20:16.970657+0200 InjectionIII[27269:1918323] [<InjectionIII.DeviceServer: 0x60000079ca80> readInt:0x16d6fdea4 length:4] error: 0 No such file or directory
2023-09-07 21:20:17.134360+0200 codesign[31122:1928167] [logging] open flag(s) 0x01000000 are reserved for VFS use and do not affect behaviour when passed to sqlite3_open_v2
2023-09-07 21:20:17.134620+0200 codesign[31122:1928167] [logging-persist] cannot open file at line 46922 of [554764a6e7]
2023-09-07 21:20:17.134625+0200 codesign[31122:1928167] [logging-persist] os_unix.c:46922: (0) open(/private/var/db/DetachedSignatures) - Undefined error: 0
2023-09-07 21:20:17.177972+0200 InjectionIII[27269:1925201] <InjectionIII.UnhidingEval: 0x113610af0>.deinit()
InjectionIII/DeviceServer.swift:115: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
2023-09-07 21:20:17.178160+0200 InjectionIII[27269:1925201] InjectionIII/DeviceServer.swift:115: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

from injectioniii.

everlof avatar everlof commented on May 27, 2024

Here it is:

builder.txt

Screenshot 2023-09-08 at 09 12 58

from injectioniii.

johnno1962 avatar johnno1962 commented on May 27, 2024

Hi, thanks for that. Looks like it was a networking problem after all though it shouldn't take out the app. The only way the builder can become nil is when the service loop has a read error and exits (at the precise instant you inject a file which seems quite a co-incidence πŸ€”) though I'll think about it some more and get back to you with a new release.

from injectioniii.

everlof avatar everlof commented on May 27, 2024

Alright, interesting! Looking forward to it!

from injectioniii.

johnno1962 avatar johnno1962 commented on May 27, 2024

Assuming it was a network problem I've added a check for "nil builder" (implicitly unwrapped properties are a curse!) and had the client reconnect on network failure (I hope it detects it). Could you please git pull the InjectionIII/HotReloading sub-repo and restart InjectionIII.app then select HotReloading revision b2084cd74f7fe2c9ca796ca9564d80d6f6f8cfd4 for the Swift Package inside Xcode for your app and see how we get on?

from injectioniii.

johnno1962 avatar johnno1962 commented on May 27, 2024

OK so I fixed the wrong file yesterday πŸ˜€. I've uploaded a new release candidate (build 7831) with a fix for device injection. I think I understand what's happening now. InjectionIII was likely crashing at the moment you restarted your app. The thing you were doing that was a bit out of the ordinary was probably restarting your app without saving an edited file. As Xcode saves all files when you restart this created two events in short succession for injection - a file change event and a close of the connection as the app restarts. The file change queued a recompile and while this was happing the connection closure nilled out the "builder" which then crashed when it was referred to.

It would be better if there weren't two similar, confusable places with almost the same code but they are slightly different and trying to merge them at this stage might regress something so I'll run with things as they are for a bit longer. Let me know how you get on. The HotReloading project is now at f268f41.

from injectioniii.

johnno1962 avatar johnno1962 commented on May 27, 2024

Thanks very much for reporting this. This has been a weakness in the code for years. I went ahead a performed the refactor to remove the duplicated code and renovate it at long last and have released version 4.7.3 is you want to update. Be sure to let me know if you see this problem still.

from injectioniii.

everlof avatar everlof commented on May 27, 2024

@johnno1962 sorry for not having tested it yet, finished that ticket and right now nothing direct to use it with! I’ll just report back if it doesn’t solve it! Thanks for the prompt fix!

from injectioniii.

johnno1962 avatar johnno1962 commented on May 27, 2024

Thank you for taking the time to report it. It's prompted a few changes for the better in the code.

from injectioniii.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.