avoid careless calls to unref functions
As for avoiding
eprintln!in deltachat-ffi, maybe make a macro that logs these errors via event emitter in all functions wherecontextis passed as an argument? This will prevent the core from breaking layout in all places except when the context itself cannot be constructed.
can you do that? also in lib.rs when the db path can be opened due to file permissions an error is printed to screen despite error being tracked via IMEX anyway
As for avoiding
eprintln!in deltachat-ffi, maybe make a macro that logs these errors via event emitter in all functions wherecontextis passed as an argument? This will prevent the core from breaking layout in all places except when the context itself cannot be constructed.can you do that? also in lib.rs when the db path can be opened due to file permissions an error is printed to screen despite error being tracked via IMEX anyway
This actually does not make much sense, because lots of functions print "ignoring careless call" when they receive NULL instead of a context.
is this still worthwhile to pursue this issue at all now that jsonrpc-python-bindings are on the rise?
At least the PR I think can be closed, it's not a solution really, just a workaround.
yeah I tried just to avoid calling the unref on NULL but the real issue is that the bindings are not checking for NULL values, I don't even know if all that calls can return NULL, the one I was having issues with was dc_context_unref when passing a db path that core didn't have permission to write.
Made a fix for this: #3818 If there are more problems like this, they should be solved similarly, not just by ignoring them.
hi, yes, completely forgot about this, this PR was just a hack, we can close it,
side comment: btw the current state of the python bindings is bad I see a lot of "unref warnings" stuff and here are some reports that it sometimes freeze, and not to mention the potential memory leak making the bot go from 50MB to GBs of RAM over time, so I think it is good that we plan to move to the rpc thing