TGTextEditor crash

ROOT Version: 6.24/06
Platform: MacOS 12.1 or Debian 10
Compiler: g++

My problem is simple. in root cling

root[0] : TGTextEditor haha(“few_kb_text.txt”)

A window or the TGTextEditor will pop out.

If I use mouse click or drag the text, it will crash.
If I use my keyboard, especially press shift up or down, it will crash.

The crash in Mac, the message is

root.exe(61794,0x108a74600) malloc: *** error for object 0x600002cdccd0: pointer being freed was not allocated
root.exe(61794,0x108a74600) malloc: *** set a breakpoint in malloc_error_break to debug

The crash in Debain 10 is

free(): double free detected in tcache 2

The error messages for both machines are saying the same thing, 2 pointers point to the same thing and that thing was deleted.

Please help.

Welcome to the ROOT forum.

I just tried with the latest ROOT on MacOs 12.3.
I cannot reproduce the crash.

Thanks. I will update my root version.

The crash is happen not immediately. In my 2 machines, press shift+up/down like selecting text, after a while it will crash.

I am not sure why it does not crash immediately, sometimes it crash sooner, sometimes it crash later. But shift + up/down will crash eventually.

I tried again, I cannot make it crash.
May be @bellenot have some idea.
You said it crashes also on Debian ?

I tried with ROOT v6.24.06 on Ubuntu 20.04.4 LTS and it works well, until it crashes when selecting Exit from the menu. Trying the same with ROOT v6.26.00 works just fine.
Correction: it prints root [1] double free or corruption (out) but doesn’t crash. I’ll check what’s wrong.

P.S. Can you try with:

root [0] TGTextEditor *haha = new TGTextEditor("few_kb_text.txt")

At least that solves the double free or corruption error (with ROOT v6.26.00).

thanks a lot!!

I tested on v6.24, using new TGTextEditor still crash.

but it does not crash anymore in v6.26.

thank you very much. Problem solved.


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