-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Random runtime crashes in pkg on Windows #89
Comments
Hi @mikiher , that The code that handles that is here: https://github.com/yao-pkg/pkg/blob/main/prelude/bootstrap.js#L2199-L2255 |
The strange thing is the folder should be different. Starting from 5.12.0 we moved the cache folder to homedir: #55 Could you try to switch to pkg latest first? I see you are not specifing a version here: https://github.com/mikiher/audiobookshelf-windows/blob/master/.github/workflows/build-installer.yml#L27 I suggest you to put a fixed version instead when installing it |
Ah, sorry for the confusion - some of the user reports may date back to when we used previous versions.
OK, thanks for the suggestion, will do. It looks like I unintentionally used the latest version anyway when building the executable, but as I said above, some of the reports may have used older versions. At which point in my code would dlopen() be called? if this has to do with loading the sqlite native addon, I expect this would happen at server startup, but it looks like the crashes occur at random times. Is the dll sometimes unloaded and needs to be reloaded? |
It is called when a dll is required in code somewhere (so in theory only on startup). Problem is that if for some reason sometihng (like an anti virus) or else cleans the dir where we store this files the error could happen also during runtime. I suggest you to try replicate the issue with latest version as we changed the location where we load those files and so the issue may not happen anymore |
Hello, I have a user that experienced similar issue, the application crashes with In my case the application tries to read a simple .txt file that is built into the .exe. The application was built using pkg 6.2.0.
I've looked at that code and I think it's not the right place - it creates the tmp path in the We should probably be looking at that's the only place I've found that uses the @robertsLando could you reopen this issue (I don't have permissions to do that)? |
What version of pkg are you using?
5.12.0
What version of Node.js are you using?
18.5.0
What operating system are you using?
Windows
What CPU architecture are you using?
x86_64
What Node versions, OSs and CPU architectures are you building for?
node18-win-x64
Describe the Bug
This was reported by serveral audiobookshelf-windows users (I'm maintaining this app) in this bug.
In a nutshell, audiobookshelf-windows packs the Audiobookshelf server into a windows executable using yao-pkg and runs it from tray application. The pkg command and config can be found here. The server also uses a native addon (sqlite3) and pkg config puts the relevant
.node
files in theassets
section.Users have reported random crashes inside pkg runtime code, which I have not been able to reproduce, but I wanted to see if you've seen this before or have some advice.
The crashes seems to happen at random points, and all look roughly like this:
Expected Behavior
Obviously, not crash :)
To Reproduce
Unfortunately, I have not been able to repro this - I'm not quite sure how to trigger this as it seems to happen randomly and quite rarely.
The text was updated successfully, but these errors were encountered: