Re: [racket-users] Help me understand FFI callouts in this context?

2019-10-31 Thread Hendrik Boom
On Thu, Oct 31, 2019 at 07:00:23AM -0700, Thomas Dickerson wrote: > Hi Sage - > > Does your SIGSEGV MAPERR show up only while attached to a debugger? > If so I noticed similar behavior while debugging my own project this week, > and opened #2882 . >

Re: [racket-users] Help me understand FFI callouts in this context?

2019-10-31 Thread Thomas Dickerson
Hi Sage - Does your SIGSEGV MAPERR show up only while attached to a debugger? If so I noticed similar behavior while debugging my own project this week, and opened #2882 . It took me quite a bit of head scratching before I realized that (a) it only

Re: [racket-users] Help me understand FFI callouts in this context?

2019-10-30 Thread Sage Gerard
Hi Matthew, I reproduced "SIGSEGV MAPERR si_code 1 fault on addr (nil)" after specifying '#:atomic? #t', so not out of the woods yet. If you wish I can help you set up Vulkan off-list. > Will the callback definitely be invoked in the same OS-level thread as calls > to Vulkan functions? Yes.

Re: [racket-users] Help me understand FFI callouts in this context?

2019-10-29 Thread Matthew Flatt
I haven't been able to get Vulkan going on my machines, so I can't run your code enough to offer reliable advice. Still, I wonder whether making the callback atomic has any effect. To make the callback atomic: * Change the definition of `_PFN_vkDebugReportCallbackEXT` to add `#:atomic? #t`

Re: [racket-users] Help me understand FFI callouts in this context?

2019-10-27 Thread Sage Gerard
I was still stumped on this one due to the opaque error message and repeated comparisons to the original source appearing correct. I stepped away for a while to think about it, and the only option I see to help me along is to write a shared library in C that behaves similarly, and have it log

Re: [racket-users] Help me understand FFI callouts in this context?

2019-10-24 Thread Sage Gerard
Hi Ryan, and thank you for the detailed and informative reply! I gathered that I should trust Racket's handling of values across the foreign boundary more, and used what I learned from your email to get past one error. Sadly, I landed on "SIGSEGV MAPERR si_code 1 fault on addr (nil)" right

Re: [racket-users] Help me understand FFI callouts in this context?

2019-10-24 Thread Ryan Culpepper
On 10/25/19 12:45 AM, Sage Gerard wrote: I am porting some C++ code to Racket that uses a function pointer. C++ origin: See 294 through 306: https://github.com/Erkaman/vulkan_minimal_compute/blob/master/src/main.cpp#L294 Racket destination:

[racket-users] Help me understand FFI callouts in this context?

2019-10-24 Thread Sage Gerard
I am porting some C++ code to Racket that uses a function pointer. C++ origin: See 294 through 306: https://github.com/Erkaman/vulkan_minimal_compute/blob/master/src/main.cpp#L294 Racket destination: https://github.com/zyrolasting/racket-vulkan/blob/master/examples/mandelbrot.rkt#L240 How do I