rabbit-shocker/rabbit

Rabbit on macOS Catalina - malloc: Incorrect checksum for freed object

kingdonb opened this issue · 5 comments

malloc: Incorrect checksum for freed object 0x7fe10809bce8: probably modified after being freed.

I get this error after some others

Rabbit seems to load OK at first, except that the presentation frame does not match the window size, (picture attached)

Screen Shot 2021-09-24 at 11 53 52 AM

When I start introducing any input to the window, the behavior is very strange. Slides are not always in order, and sometimes the window frame goes black without any cause of new user input. Slides can also change without user input. Again very strange, but it is almost usable as long as I only do keyboard input and only left click. As soon as I right click, sometimes it crashes right away, sometimes only crash when I enter full screen. Something is apparently very wrong with my system.

I have had this bug consistently on MacOS whenever I tried using Rabbit here. I love Rabbit! This program is practically the only reason I still maintain a linux VM on my Mac laptop, so I can use Rabbit for presentations (and MacOS for proper Zoom support.) On the Linux VM, and on any of my Linux machines in general, everything for Rabbit works perfectly as long as I am on ruby <3.

There are problems though that prevent using it on Ruby 3 but I can live with that for now, and that can be a separate report. I run Ruby 2.7.4 with Rabbit on Linux with zero issues and everything is great. I would like to be able to take this experience with me to MacOS, or share it with Mac using friends. I wonder if it is possible.

Has anyone overcome this or worked around before without using Linux?

System info:
MacOS Catalina 10.15.7
Ruby version tried:

$ rvm list
=* ruby-2.7.4 [ x86_64 ]
   ruby-3.0.2 [ x86_64 ]

Gemfile and Gemfile.lock excerpt:

    rabbit (3.0.0)

DEPENDENCIES
  rabbit
  rabbit-slide-rabbit-theme-benchmark-en (~> 1.0, >= 1.0.3)
  rabbit-theme-yart
  rake

RUBY VERSION
   ruby 2.7.4p191

BUNDLED WITH
   2.2.22

I am on the latest published version of Rabbit and I will try again with Git main branch to confirm the problem still exists.

Anyway, thanks so much for Rabbit!

The full errors from my terminal:

$ be rake
Unable to revert mtime: /Library/Fonts
/Users/kingdonb/.rvm/gems/ruby-2.7.4/gems/rabbit-3.0.0/lib/rabbit/parser/ext/image.rb:112: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open
2021-09-24 11:47:03.548 ruby[62649:763752] unlockFocus called too many times. Called on <GdkQuartzView: 0x7fe109556050>.
2021-09-24 11:47:05.617 ruby[62649:763752] unlockFocus called too many times. Called on <GdkQuartzView: 0x7fe109556050>.
2021-09-24 11:47:09.269 ruby[62649:763752] unlockFocus called too many times. Called on <GdkQuartzView: 0x7fe109556050>.
ruby /Users/kingdonb/.rvm/gems/ruby-2.7.4/bin/rake(62649,0x10b195dc0) malloc: Incorrect checksum for freed object 0x7fe10809bce8: probably modified after being freed.
Corrupt value: 0x103007fe1080426e
ruby /Users/kingdonb/.rvm/gems/ruby-2.7.4/bin/rake(62649,0x10b195dc0) malloc: *** set a breakpoint in malloc_error_break to debug
Abort trap: 6
$ be rake
/Users/kingdonb/.rvm/gems/ruby-2.7.4/gems/rabbit-3.0.0/lib/rabbit/parser/ext/image.rb:112: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open
2021-09-24 11:53:35.123 ruby[62769:767995] unlockFocus called too many times. Called on <GdkQuartzView: 0x7fe8cc512a90>.
2021-09-24 11:54:00.780 ruby[62769:767995] unlockFocus called too many times. Called on <GdkQuartzView: 0x7fe8cc512a90>.
2021-09-24 11:54:22.414 ruby[62769:767995] unlockFocus called too many times. Called on <GdkQuartzView: 0x7fe8cc512a90>.
2021-09-24 11:54:26.839 ruby[62769:767995] unlockFocus called too many times. Called on <GdkQuartzView: 0x7fe8cc512a90>.
ruby /Users/kingdonb/.rvm/gems/ruby-2.7.4/bin/rake(62769,0x11780fdc0) malloc: Incorrect checksum for freed object 0x7fe8ccb2ac08: probably modified after being freed.
Corrupt value: 0x228007fe8ccb2a80
ruby /Users/kingdonb/.rvm/gems/ruby-2.7.4/bin/rake(62769,0x11780fdc0) malloc: *** set a breakpoint in malloc_error_break to debug
Abort trap: 6

Also to confirm, the problem still exists when these dependencies are used:

GIT
  remote: git@github.com:rabbit-shocker/rabbit.git
  revision: 225e2b89808a7e655e7c1424b20e4fcba63a79c3
  specs:
    rabbit (3.0.1)
      coderay (>= 1.0.0)
      faraday
      gdk_pixbuf2 (>= 3.0.9)
      gettext (>= 3.0.1)
      gtk3
      hikidoc
      kramdown-parser-gfm
      nokogiri
      poppler (>= 3.2.5)
      rdtool
      rouge
      rsvg2 (>= 3.1.4)
      rttool
kou commented

Thanks for using Rabbit!

I'll add support for GTK 4 to Rabbit in a few years. It may solve this.

There are problems though that prevent using it on Ruby 3 but I can live with that for now, and that can be a separate report.

Could your report it as a separated report?
I'm always using Rabbit master with Ruby master and it works.

Awesome! I was able to get a very acceptable qemu working with qemu-virgl, so I can run Rabbit on Linux, on MacOS, and everything is fine now (at least as far as how I will be able to use this myself without going crazy or changing OS.)

I will give it a test with some newer versions of Ruby again soon, (probably when my presentation is over!) I will try to reproduce the issue with Ruby 3 and get back to you later. Thanks again!

Hello, I'm giving a talk at GitOpsCon in Vancouver today, and I spent hours messing with VMs again, thinking I had found a way to forward X11 and make it work "good enough" – but today I tried Rabbit in MacOS and it works almost flawlessly! Thank you, if you have done this 🎉 I think the issue can be closed now?

My mac environment today is Ventura (13.3.1)

kou commented

That's good to know!
(I don't do anything... :-)

I close this.