
@mflatt I’m getting a instantiate-linklet: mismatch
error I don’t understand: instantiate-linklet: mismatch;
reference to a variable that is unintialized;
possibly, bytecode file needs re-compile because dependencies changed
name: idY51.2
exporting instance: "/Users/alexis/gits/racket/mutation-testing/data-queue.rkt"
importing instance: (submod "/Users/alexis/gits/racket/mutation-testing/data-queue.rkt" test)
I don’t really understand what this error means in general, but I’m especially confused about how a submodule could be out of sync with its parent module. Does this error message mean anything to you?

The “possibly” is clearly a wrong guess there. I’m at a loss for a second guess. Is there something I could run?

Unfortunately, my naïve attempts to reproduce the error with a smaller program didn’t work, but if you don’t have any ideas from the error message alone, I can certainly work harder to come up with a minimal example.

The name idY51.2
suggests an interaction with the contract system, perhaps a lift that has gone wrong. Maybe the contract system is seeing a context (in the sense of syntax-local-context
) where it thinks it has already lifted an expression, but it hasn’t. Maybe it’s something about a re-expansion that claims to be the same context as earlier but has actually thrown away lifts.

I think you’re probably right about it being an issue related to lifts. I thought that might be related, myself, but it wasn’t immediately obvious to me why that might be, and I didn’t think to just try providing the same identifiers without the contracts on them. Trying that now, it does indeed seem to fix the problem, so I’ll try and figure out where the lifts are getting lost.

is there a memory profiler in racket or at least a way to check at a certain point in the program execution how much memory is being used and which location was the source of the allocation?

@pocmatos there are a few things; see dump-memory-stats
and the --enable-backtrace
configure option

is that --enable-backtrace
from the racket ./configure
or something else?

what are the v
s in the dump-memory-stats
. The docs look a bit vague to me.

Yes, and it depends on the configuration of racket, and if they’re supported then calling it with no arguments will explain it

ah… got it. thanks.

Hi! I’m struggling a bit on embedding racket into a c program in windows. If anyone is familiar with it, what I’m finding is an access violation when trying to call scheme_main_setup
https://gyazo.com/95891f2c26a18567469b912aa80db099 The docs mention that you need “libracketx.lib” to link to the executable, but since that doesn’t exist on a default install, I created it myself from the included “libracketx.def” I’m not exactly sure of what I’m doing wrong and I’m feeling dumb about it… Any feedback would be very appreciated. Peace :slightly_smiling_face:

@samuel.falcon.fdez If you can show some C code and how you’re compiling & linking, we can probably help more.

Sure thing @mflatt. Posting as gist https://gist.github.com/sfalcon/cb2e757519dd8e7aeb3fa33156e4806e

Does anyone know if, in scribble, I can replace any x
(where x
is a content?
), with (make-element #f x)
?

(Or basically, I want to wrap an arbitrary content?
with the sf
style. If that’s possible.)

You’ll have to do more to cooperate with 3m GC, but I don’t think you’re getting far enough for the problem to be registering local variables with the GC.
The immediate problem maybe that you need to call scheme_register_tls_space
before scheme_main_setup
. Look for scheme_register_tls_space
here: http://docs.racket-lang.org/inside/embedding.html?q=inside#%28part._.C.G.C_.Embedding%29
I’m not certain that’s the only issue to avoid an immediate crash, but let’s try that first.

@leif Yes, that should work. Are you running into a problem?