-
Notifications
You must be signed in to change notification settings - Fork 8
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
Invalid Memory Access on windows #35
Comments
I've tested both Adwaita samples on Windows 10 with Therefore I need more information to be able to reproduce this
|
when i get home today i will try and run the demo apps as well as my program on 0.4.0 also, my repo is me6262/JavaAutoBuilder |
Your code has some issues. I've made some changes and added some comments (These are only suggestions and are not tested): me6262/JavaAutoBuilder@master...bailuk:JavaAutoBuilder:master |
ohhhhh, conflicting imports could definitely do it. i suppose when doing c interop, a lot of things can create nonsense memory related errors. i am in the process of testing the changes on linux, i will test on windows later today since I don't have it on my laptop. thanks a lot for all the help too. this is really going beyond the call of duty |
also, in the code, you say that the style manager could cause crashes. in what situations? stuff like missing resources? |
just tested your forked code, the error doesn't change. it crashes with "Invalid memory access" on line 141, which is where app.run(argc, argv) is called. from my preliminary research on the topic of this kind of error with jna is when something (usually on windows) uses a different sized object than *nix systems, like with certain types of strings and stuff. however, this is the limit of my knowledge |
also, all iterations of this code has worked perfectly on linux |
It crashes on my Linux system when calling The issue is most likely an API violation somewhere in your code. Some ideas for debugging:
|
if the code works perfectly for you on windows, what gtk related libraries do you have installed? it seems like the deciding factor could be system configuration. i will test all of the debugging stuff later, but at this point, i am just left to theory craft until i can actually try it later. from my research it looks like a package that seems fairly necessary that i may have overlooked is gsettings-desktop-schemas |
a handful of months ago, i went through the lengthy process of copying all of the necessary dlls and all other necessary resources from msys2 into some random zip file so that it could be used by me to test out packaging. if i put the updated code in that, everything works flawlessly. i suppose some gtk/libadwaita related files that come from some packages are missing in my system installation(this is a new install of msys2), although i haven't pinned down exactly what is missing, but for context, the only thing i installed was libadwaita, gtk4, libadwaita icon theme, and whatever was considered a required dependency. i suppose that i should close this issue as it is not an issue with the library seeing as i have gotten it to work |
whenever i use various Adw related classes in my main method, such as running App.run() just like the example, when running on windows, the program immediately crashes, citing an "Invalid memory access" error. the same thing happens when i use Adw.init().
i am on 0.5.0
the libraries were downloaded from msys2 and added to PATH
The text was updated successfully, but these errors were encountered: