|
|
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Compilation warnings and random crashes
|
|
|
|
|
Re: Compilation warnings and random crashes [message #61019 is a reply to message #61016] |
Sat, 19 October 2024 16:26   |
 |
mirek
Messages: 14261 Registered: November 2005
|
Ultimate Member |
|
|
Oblivion wrote on Sat, 19 October 2024 13:24Quote:
(maybe those specific assemblies have custom icons to display in package list?)
No.
Quote:
Anyway, from backtraces it looks like indexer/libclang is running full steam. Can you try with assist++ off?
I have attached the logs. However, I noticed that it crashes less frequently when the indexer/assist++ is off.
Quote:
and perhaps separately try setting Image icon = Null;
Will try.
Best regards,
Oblivion
And the last obligatory question: It really is crashing only on opening new main package, right?
And BTW, when you test, do you test like for(;;) { Ctrl+M, Esc } or like for(;;) { Ctrl+M, select package, Enter } ?
|
|
|
Re: Compilation warnings and random crashes [message #61020 is a reply to message #61019] |
Sat, 19 October 2024 17:09   |
Oblivion
Messages: 1210 Registered: August 2007
|
Senior Contributor |
|
|
Quote:And the last obligatory question: It really is crashing only on opening new main package, right?
Yes, while TheIDE is loading the main packages list.
Quote:
And BTW, when you test, do you test like for(;;) { Ctrl+M, Esc } or like for(;;) { Ctrl+M, select package, Enter } ?
Doesn't make any difference, TheIDE crashes after it switches to the package selection dialog.
However, I'm suspecting this is a compiler error now. (maybe O3 optimization level related?). I'll try other options (O2 and GCC), report back asap.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
|
|
|
Re: Compilation warnings and random crashes [message #61021 is a reply to message #61020] |
Sat, 19 October 2024 17:32   |
 |
mirek
Messages: 14261 Registered: November 2005
|
Ultimate Member |
|
|
[quote title=Oblivion wrote on Sat, 19 October 2024 17:09]Quote:And the last obligatory question: It really is crashing only on opening new main package, right?
However, I'm suspecting this is a compiler error now. (maybe O3 optimization level related?). I'll try other options (O2 and GCC), report back asap.
Well, clang got picky over unaligned access undefined behaviour, simply ignoring code like dword x[2]; dword y = *(dword )((const char *)x + 1); which caused some problems, but I think compiler error there would appear with some regularity. Irregular pattern like this is usually a race condition or uninitialised data...
Anyway, other things to try
for(int i = 0; i < packages.GetCount(); i++) {
const PkInfo& pkg = packages[i];
DDUMP(IdeImg::GetCount());
Adding this log should might help to resolve whether IdeImg iml indeed gets damaged
And possibly
// alist.SetDisplay(alist.GetCount() - 1, 0, pkg.main ? bpd : pd);
Comment display out, just to test if it is somehow related (the only other thing that does something with icons in the loop).
[Updated on: Sat, 19 October 2024 17:33] Report message to a moderator
|
|
|
|
|
Re: Compilation warnings and random crashes [message #61025 is a reply to message #61023] |
Sun, 20 October 2024 09:23   |
 |
mirek
Messages: 14261 Registered: November 2005
|
Ultimate Member |
|
|
Noticed something:
#2 0x00005555557a129f in IdeImg::Get (i=225) at /home/maldoror/Geliştirme/upp/devel/uppsrc/Draw/iml_source. h:113
If gdb gets it right, 225 is out of range. Which would be consistent with random crashes in release mode and probably a compiler bug.
Can you try
DLOG("======== LOAD");
for(int i = 0; i < packages.GetCount(); i++) {
const PkInfo& pkg = packages[i];
Image icon = pkg.icon;
if(IsNull(icon)) {
if(pkg.main)
icon = pkg.upphub ? IdeImg::HubMainPackage() : IdeImg::MainPackage();
else
icon = pkg.upphub ? IdeImg::HubPackage() : IdeImg::Package();
}
nest_list.Add(pkg.nest);
clist.Add(pkg.package, DPI(icon, 16));
alist.Add(pkg.package, GetFileName(pkg.nest), pkg.description, icon);
alist.SetDisplay(alist.GetCount() - 1, 0, pkg.main ? bpd : pd);
}
DLOG("~~~ LOAD");
Image Iml::Get(int i)
{
DDUMP(i);
IImage& m = map[i];
if(!m.loaded) {
Mutex::Lock __(sImlLock);
if(!m.loaded) {
m.image = MakeImlImage(GetId(i), [&](int mode, const String& id) { return GetRaw(mode, id); }, global_flags);
m.loaded = true;
}
}
return m.image;
}
If it really dumps out of range numbers in the loop, can you send me disassembly of void SelectPackageDlg::SyncList(const String& find) ?
|
|
|
|
|
Re: Compilation warnings and random crashes [message #61028 is a reply to message #61027] |
Sun, 20 October 2024 13:45   |
Tom1
Messages: 1303 Registered: March 2007
|
Ultimate Contributor |
|
|
mirek wrote on Sun, 20 October 2024 10:55
Maybe we should move to gcc?
Hi,
I hope that 'moving to gcc' does not mean dropping support for clang.
My policy with platforms (including compilers) is to try to support more than one. When intermittent issues appear on one compiler, it is then easier to switch to another working compiler until the issue is resolved. When the code base is built to be compatible with MSC, CLANG and GCC (avoiding the known weak spots and/or bugs of each), the capability to handle new issues and avoid down time in such situations is far better.
Best regards,
Tom
|
|
|
|
Re: Compilation warnings and random crashes [message #61042 is a reply to message #60585] |
Mon, 21 October 2024 20:07   |
Oblivion
Messages: 1210 Registered: August 2007
|
Senior Contributor |
|
|
Hello Mirek,
I have attached the new logs.
Assuming that this is a compiler bug, I still wouldn't change the default on Linux. My reasons:
1) I didn't encounter it anywhere else. I have a lot of apps, tests etc, some have heavy inlining, and built with the same clang config. They are all stable (at least, they have yet to crash because of a really puzzling error.)
2) I tend to use ArchLinux on my machines (and other distros on VM), which ships the latest LLVM/clang, so this might be a bug in the latest version of the compiler. (At least, I did not have such crashes several months ago.)
3) GCC has significantly slower compilation speed.
4) I don't know of anyone else complaining about this bug, and I am fine with using the GCC build, it works as expected.
Best regards,
Oblivion
-
Attachment: log4.zip
(Size: 15.76KB, Downloaded 65 times)
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
|
|
|
Re: Compilation warnings and random crashes [message #61043 is a reply to message #61042] |
Mon, 21 October 2024 22:54   |
 |
mirek
Messages: 14261 Registered: November 2005
|
Ultimate Member |
|
|
Oblivion wrote on Mon, 21 October 2024 20:07Hello Mirek,
I have attached the new logs.
Assuming that this is a compiler bug, I still wouldn't change the default on Linux. My reasons:
1) I didn't encounter it anywhere else. I have a lot of apps, tests etc, some have heavy inlining, and built with the same clang config. They are all stable (at least, they have yet to crash because of a really puzzling error.)
2) I tend to use ArchLinux on my machines (and other distros on VM), which ships the latest LLVM/clang, so this might be a bug in the latest version of the compiler. (At least, I did not have such crashes several months ago.)
3) GCC has significantly slower compilation speed.
4) I don't know of anyone else complaining about this bug, and I am fine with using the GCC build, it works as expected.
Best regards,
Oblivion
======== LOAD
i = 39
i = 39
i = 39
i = 39
i = 39
i = 335
i = 335
Yep, out of range...
What is clang --version?
Should we file this in clang's bugzilla?
I have also pushed a bunch of changes which I suppose should fix this. Can you try master?
|
|
|
|
|
|
Goto Forum:
Current Time: Tue Jun 10 09:23:14 CEST 2025
Total time taken to generate the page: 0.04768 seconds
|
|
|