-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
refactor(native): use wrapped pointers #992
Conversation
Thanks for the help with this, Zach! Much appreciated |
@bryphe -- I think I implemented all the fixes I caught (including the ones you mentioned), but I'm still getting a segfault on |
@bryphe after our conversation last night I realized that was probably why I couldn't get this PR working. I changed the wrap and unwrap functions and, lo and behold, it works! Let me know if there is anything else you need me to do! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code change looks great, @zbaylin - thanks for the heroic work here. One step closer to multicore... 😎
We should validate it across platforms - a sanity check running the example app Onivim 2 against this PR should be sufficient. There's some C bindings that aren't covered in our tests yet, so I just want to make sure we test those:
- Windows - Example App
- Windows - Onivim 2
- OSX - Example App
- OSX - Onivim 2
- Linux - Example App
- Linux - Onivim 2
OSX looks good! Wasn't sure if you already tested on Windows / Linux - let me know if I can help validate either of those platforms |
…re/native/pointer_wrap
The Icon Features bit (progress displayed on the Icon) example crashes for me on Windows with:
It doesn't crash on master for me, so I assume that its because of these changes? Unless its just because this PR is lagging behind master a bit... |
On Oni2 I'm not getting any crashes (from a basic opening it up and opening a few files etc) but I am missing out on window handles (or whatever the name is). I.e. the ability to drag the window around, and the resize on the edges. |
Revery example is happy with the latest changes, I'm getting a crash now for Oni2 though:
|
Thanks @CrossR ! Looks like the crash is occurring when we try to compare windows:
Which, because they are wrapped in We'll need to have another way to compare windows - like using the https://wiki.libsdl.org/SDL_GetWindowID API |
This is looking good now! Just need another round of cross-plat testing to make sure everything is OK |
…re/native/pointer_wrap
…-ui/revery into chore/native/pointer_wrap
@bryphe I just merged this up with I think it would be a good idea to get this merged before I start work on the native menus, since that will require passing pointers back and forth from the FFI a decent amount. |
Windows works with both the Examples and Oni as of f2d6793 (the Window compare fix) |
Excellent! Sounds like you already verified on Windows - I'll try out on Linux.
Right, that makes sense - I was just thinking about this change in the context of the NSObject PR 👍 |
Linux looks good! Sounds like we're all set with this 👍 |
This is currently breaking very early on -- I get a segfault with the Window in SDL2 and I can't seem to figure out why.
Here's a stack trace from LLDB:
If anybody has any ideas, let me know! I'll keep looking at it.