Shizuo Fujita

Results 40 comments of Shizuo Fujita

I agree that the features should be carefully selected.

OK, I will also look this issue

Related to https://github.com/rmagick/rmagick/pull/756

https://github.com/rmagick/rmagick/blob/c77c3c3672fbba9e0ed3d9f64f8c326f4f744359/lib/rvg/rvg.rb#L63 Is there something wrong here? hmm. If you set the background color using `#background_fill`, seems you can avoid the issue. ```diff diff --git a/black.rb b/black.rb index ca30385..682f915 100644 ---...

It works as expected when using ImageMagick 6. Is there a miss in the implementation of ImageMagick 7 support? @dlemstra Do you know something for this issue?

The original code save as `gif`. https://github.com/rmagick/rmagick/blob/main/doc/ex/color_floodfill.rb Why does it work as expected when changed to `png` or `jpg` ? 🤔

When Ruby's GC was executed before using the value of the variable (`exc` `mesg` `extra`), it becomes an indefinite value. We can guard the value from GC using `RB_GC_GUARD` macro....

If allocated memory area of `ExceptionInfo` or `Image` in RMagick, we should release it before raising Ruby exception via `rm_magick_error()` https://github.com/rmagick/rmagick/blob/a4d15c7f0813aeddfc39f219db5d866050abcb1e/ext/RMagick/rmutil.c#L1561-L1569 It seems, in this case, it use `rm_check_exception()` instead...

If we use `rm_check_exception()` directly, we can release image object and `ExceptionInfo` object. https://github.com/rmagick/rmagick/blob/5c2e6a153f963ca67ae9a953fd47b6008fa1cab2/ext/RMagick/rmutil.c#L1690-L1694 https://github.com/rmagick/rmagick/blob/5c2e6a153f963ca67ae9a953fd47b6008fa1cab2/ext/RMagick/rmutil.c#L1732 If you use `rm_check_exception()` with `DestroyOnError` instead of `CHECK_EXCEPTION()`, you can release image and exception...

We don't touch any Ruby C APIs while unlocking GVL. `rm_check_exception()` might use Ruby C API to raise exception. it should not. - Safe APIs while unlocking GVL https://github.com/ruby/ruby/blob/ruby_2_7/thread.c#L1575-L1578