Open gui failed on latest macOS 13.3.1

I think @Axel is already aware of these issues on MacOS, but he’s on vacation right now…

This seems to be caused by a broken / inconsistent build. 6.26 is not expected to work. How did you build ROOT, did you copy files around / fix something yourself to make the build succeed?

for old release version, some Change needed to be done by oneself.
for example, ver6.28 using the method in

I’ve built with the latest master version of root 6.29.01 without any system changes.
now I use the root7 webgui instead of cocoa gui. works fine.

for ver6.26.10, I close most of the option which default=ON. also some environment changes needed

nobody meet the same problem? cannot open gui with cocoa

root [0] new TBrowser
root.exe(29254,0x16d62f000) malloc: *** error for object 0x600002e1a980: pointer being freed was not allocated
root.exe(29254,0x16d62f000) malloc: *** set a breakpoint in malloc_error_break to debug

No, it works fine for me.
The following should work:

$  git clone https://github.com/root-project/root.git root_src
$  mkdir root_bin
$  cd root_bin
$  cmake ../root_src -Dall=ON
$  make

Same here, also build applications that use my root installation (like DD4hep display) crash.

1 Like

That does assume practically all dependencies installed and not using the builtin_x option.

Does it work for you if you try what I suggested?

I am just compiling main/HEAD

on MacOS 13.3.1 (22E261)

(had to switch some builtin_X options on), and will try.

I do not really need a TBrowser, so would be fine with the Browser option, but I have DD4hep geoPlugin also using the root viewer, and this crashes similarly than if trying to use the ROOT6 type TBrowser. I have tried with 6.28.02 so far (did not work), will keep you posted.

Noop.

What I did:

git clone https://github.com/root-project/root.git root_src
mkdir root_build
cmake -S root_src -B root_build -Dall=ON -Dbuiltin_glew=ON
cmake --build  root_build -j6

Result:

   ------------------------------------------------------------------
  | Welcome to ROOT 6.29/01                        https://root.cern |
  | (c) 1995-2022, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for macosxarm64 on Apr 27 2023, 13:58:17                   |
  | From heads/master@v6-29-01-1251-g3e712217df                      |
  | With Apple clang version 14.0.3 (clang-1403.0.22.14.1)           |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------

root [0] TBrowser a
root.exe(19591,0x1dc455b40) malloc: Heap corruption detected, free list is damaged at 0x600001d0fbd0
*** Incorrect guard value: 0
root.exe(19591,0x1dc455b40) malloc: *** set a breakpoint in malloc_error_break to debug

I have also tried:

  • some derivate of 6.26. and get to the same result.
  • install the latest available installation with brew and this also crashes (though there’s no binary for 13.3.1 yet available).

These were just cross-checks, not the environment I would like to have eventually.

MacOS 13.3.1 is the issue. I guess @Axel can tell more.
But see: Search results for '13.3.1' - ROOT Forum

MayBe it is time to remove OpenGL from macOS, as apple has mentioned it long time ago

Yes, I was pretty sure it had to do with that - I tested other XQuartz applications that seem to work, well, well …

We are on it. The problem is somewhere in:

unsigned FontCache::GetTextWidth(FontStruct_t font, const char *text, int nChars)

I managed to make it work by putting a printf in.
That’s weird. we need to understand.

That usually means that (without the explicit “printf”) the compiler optimization decided to either “delay” or completely “skip” some action.

1 Like

Ha, that sounds like an invalid_read to me then, but I can only guess here, haven’t done any diagnostics…

… thanks, anyway, for the very fast handling of it. Let me know if you have a patch you want me to try.

Well, the patch is not found yet.
One thing you can try, to see if you see the same as me, is to put:

printf("\n");

at the line 430 of graf2d/cocoa/src/FontCache.mm. i.e. just after:

   std::vector<UniChar> unichars(text, text + nChars);
1 Like

Thanks for your reports. This is now fixed in master and v6-28-00-patches (and thus part of the latest nightly builds); it will be part of 6.28/04 which is about to be released.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.