Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Compilation warnings and random crashes
| Compilation warnings and random crashes [message #60585] |
Wed, 22 May 2024 00:10  |
Novo
Messages: 1431 Registered: December 2006
|
Ultimate Contributor |
|
|
I get a bunch of warnings like below when compiling on MacOS 10.15:
/Users/XXX/dvlp/cpp/code/upp/git/uppsrc/ide/RepoSync.cpp:283:6: note: use non-reference type 'Upp::KeyValueRef<Upp::String, int>'
for(const auto& w : ~work) {
^~~~~~~~~~~~~~~
Basically, a reference is pointing to a temporary object.
And I'm getting random crashes with TheIDE when launching it on Linux (I'm not using a binary compiled on MacOS )
I guess, these crashes and references to temporary objects are related.
TIA
Regards,
Novo
[Updated on: Tue, 28 May 2024 20:31] Report message to a moderator
|
|
|
|
| Re: Compilation warnings and random crashes [message #60593 is a reply to message #60585] |
Sun, 26 May 2024 06:54   |
Novo
Messages: 1431 Registered: December 2006
|
Ultimate Contributor |
|
|
VectorMap<String, int> work;
work is VectorMap ...
MapKVRange<AMap, K, T> operator~() { return MapKVRange<AMap, K, T>(*this); }
operator~() returns a newly created object.
So, compiler is right: you are referencing temporary objects ...
Regards,
Novo
|
|
|
|
|
|
|
|
|
|
|
|
| Re: Compilation warnings and random crashes [message #60992 is a reply to message #60991] |
Thu, 17 October 2024 11:47   |
Oblivion
Messages: 1266 Registered: August 2007
|
Senior Contributor |
|
|
Hello Mirek,
It does not happen when I completely exit TheIdE. It only happens when I try to open another project. The package selection screen comes up and the app crashes (not always, but most of the time).
TheIDE on release mode (FULL_DEBUG flag) points to below line:
Thread 1 "theide" received signal SIGSEGV, Segmentation fault.
Upp::Image::Image (this=0x7ffffffe71e0, img=...) at /home/user/upp/devel/uppsrc/Draw/Image.cpp:295
295 data->Retain();
I hope this helps.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
|
|
|
|
| Re: Compilation warnings and random crashes [message #60993 is a reply to message #60992] |
Thu, 17 October 2024 12:03   |
 |
mirek
Messages: 14291 Registered: November 2005
|
Ultimate Member |
|
|
Oblivion wrote on Thu, 17 October 2024 11:47Hello Mirek,
It does not happen when I completely exit TheIdE. It only happens when I try to open another project. The package selection screen comes up and the app crashes (not always, but most of the time).
TheIDE on release mode (FULL_DEBUG flag) points to below line:
Thread 1 "theide" received signal SIGSEGV, Segmentation fault.
Upp::Image::Image (this=0x7ffffffe71e0, img=...) at /home/user/upp/devel/uppsrc/Draw/Image.cpp:295
295 data->Retain();
Excellent, that narrows it down probably to loading icons, but I bet there is a backtrace ("bt") ?
Mirek
[Updated on: Thu, 17 October 2024 12:03] Report message to a moderator
|
|
|
|
| Re: Compilation warnings and random crashes [message #60994 is a reply to message #60993] |
Thu, 17 October 2024 12:11   |
Oblivion
Messages: 1266 Registered: August 2007
|
Senior Contributor |
|
|
Oops, I forgot to attach that.
#0 Upp::Image::Image (this=0x7ffffffe71e0, img=...) at /home/user/upp/devel/uppsrc/Draw/Image.cpp:295
#1 Upp::Iml::Get (this=<optimized out>, i=<optimized out>) at /home/user/upp/devel/uppsrc/Draw/Iml.cpp:154
#2 0x00005555556e76e9 in SelectPackageDlg::SyncList (this=this@entry=0x7ffffffe7750, find=...) at /home/user/upp/devel/uppsrc/ide/SelectPkg.cpp:677
#3 0x00005555556deead in SelectPackageDlg::Load (this=this@entry=0x7ffffffe7750, find=...) at /home/user/upp/devel/uppsrc/ide/SelectPkg.cpp:761
#4 0x00005555556e3ac4 in SelectPackageDlg::OnBase (this=0x7ffffffe7750) at /home/user/upp/devel/uppsrc/ide/SelectPkg.cpp:420
#5 0x0000555555996e1f in Upp::Function<void()>::operator() (this=0x7ffffffe8800) at /home/user/upp/devel/uppsrc/Core/Function.h:76
#6 Upp::ArrayCtrl::SetCursor0 (this=0x7ffffffe8290, i=8, dosel=<optimized out>) at /home/user/upp/devel/uppsrc/CtrlLib/ArrayCtrl.cpp:1487
#7 0x00005555556e6a76 in SelectPackageDlg::SyncBase (this=this@entry=0x7ffffffe7750, initvars=...) at /home/user/upp/devel/uppsrc/ide/SelectPkg.cpp:837
#8 0x00005555556e630d in SelectPackageDlg::Run (this=this@entry=0x7ffffffe7750, nest=..., startwith=...) at /home/user/upp/devel/uppsrc/ide/SelectPkg.cpp:362
#9 0x00005555556ecd3b in SelectPackage (nest=..., title=title@entry=0x7ffff25d4bc8 "Select main package (TheIDE 17514)", startwith=0x7ffff273f748 "examples/SshTerminalSplitterExample", selectvars=<optimized out>, main=<optimized out>)
at /home/user/upp/devel/uppsrc/ide/SelectPkg.cpp:864
#10 0x000055555572ae45 in Ide::OpenMainPackage (this=0x7ffffffe9e10) at /home/user/upp/devel/uppsrc/ide/ide.cpp:215
#11 0x000055555572b0a2 in Ide::NewMainPackage (this=0x7ffffffe71e0) at /home/user/upp/devel/uppsrc/ide/ide.cpp:234
#12 0x0000555555cd932e in Upp::Function<void()>::operator() (this=<optimized out>) at /home/user/upp/devel/uppsrc/Core/Function.h:76
#13 Upp::Ctrl::Action (this=<optimized out>) at /home/user/upp/devel/uppsrc/CtrlCore/Ctrl.cpp:414
#14 0x0000555555a26f0b in Upp::MenuItem::LeftUp (this=0x7ffff26cdd60) at /home/user/upp/devel/uppsrc/CtrlLib/MenuItem.cpp:382
#15 0x0000555555ce71b0 in Upp::Ctrl::MouseEvent (this=0x7ffffffe71e0, event=<optimized out>, p=..., zdelta=115, keyflags=0) at /home/user/upp/devel/uppsrc/CtrlCore/CtrlMouse.cpp:190
#16 0x0000555555ce67bf in Upp::Ctrl::MouseEvent0 (this=this@entry=0x7ffff26cdd60, event=event@entry=145, p=..., zdelta=zdelta@entry=0, keyflags=keyflags@entry=0) at /home/user/upp/devel/uppsrc/CtrlCore/CtrlMouse.cpp:96
#17 0x0000555555ce6b46 in Upp::Ctrl::MouseEventH (this=this@entry=0x7ffff26cdd60, event=event@entry=145, p=..., zdelta=zdelta@entry=0, keyflags=0) at /home/user/upp/devel/uppsrc/CtrlCore/CtrlMouse.cpp:116
#18 0x0000555555ce81de in Upp::Ctrl::MEvent0 (this=this@entry=0x7ffff26cdd60, e=e@entry=145, p=..., zd=zd@entry=0) at /home/user/upp/devel/uppsrc/CtrlCore/CtrlMouse.cpp:364
#19 0x0000555555ce8837 in Upp::Ctrl::DispatchMouseEvent (this=<optimized out>, e=e@entry=145, p=..., zd=zd@entry=0) at /home/user/upp/devel/uppsrc/CtrlCore/CtrlMouse.cpp:648
#20 0x0000555555ce8810 in Upp::Ctrl::DispatchMouseEvent (this=<optimized out>, e=e@entry=145, p=..., zd=zd@entry=0) at /home/user/upp/devel/uppsrc/CtrlCore/CtrlMouse.cpp:648
#21 0x0000555555ce8810 in Upp::Ctrl::DispatchMouseEvent (this=this@entry=0x7ffff260ada0, e=e@entry=145, p=..., zd=zd@entry=0) at /home/user/upp/devel/uppsrc/CtrlCore/CtrlMouse.cpp:648
#22 0x0000555555ceaa88 in Upp::Ctrl::DispatchMouse (this=this@entry=0x7ffff260ada0, e=e@entry=145, p=..., zd=zd@entry=0) at /home/user/upp/devel/uppsrc/CtrlCore/CtrlMouse.cpp:622
#23 0x0000555555cfddb6 in Upp::Ctrl::DispatchMouseIn (this=0x7ffff260ada0, act=145, zd=0) at /home/user/upp/devel/uppsrc/CtrlCore/GtkEvent.cpp:444
#24 Upp::Ctrl::GtkMouseEvent (this=<optimized out>, action=<optimized out>, act=145, zd=zd@entry=0) at /home/user/upp/devel/uppsrc/CtrlCore/GtkEvent.cpp:454
#25 0x0000555555cfe04b in Upp::Ctrl::GtkButtonEvent (this=this@entry=0x7ffff260ada0, action=action@entry=144) at /home/user/upp/devel/uppsrc/CtrlCore/GtkEvent.cpp:478
#26 0x0000555555cfec24 in Upp::Ctrl::Proc (this=this@entry=0x7ffff260ada0) at /home/user/upp/devel/uppsrc/CtrlCore/GtkEvent.cpp:581
#27 0x0000555555cffb84 in Upp::Ctrl::ProcessEvent0 (quit=quit@entry=0x0, fetch=<optimized out>) at /home/user/upp/devel/uppsrc/CtrlCore/GtkEvent.cpp:766
#28 0x0000555555cffd81 in Upp::Ctrl::ProcessEvents0 (quit=quit@entry=0x0, fetch=<optimized out>) at /home/user/upp/devel/uppsrc/CtrlCore/GtkEvent.cpp:793
#29 0x0000555555cf171e in Upp::Ctrl::ProcessEvents (quit=0x0) at /home/user/upp/devel/uppsrc/CtrlCore/GtkEvent.cpp:810
#30 Upp::Ctrl::EventLoop (ctrl=ctrl@entry=0x7ffffffe9e10) at /home/user/upp/devel/uppsrc/CtrlCore/GtkEvent.cpp:844
#31 0x0000555555cf4ded in Upp::TopWindow::Run (this=0x7ffffffe9e10, appmodal=<optimized out>) at /home/user/upp/devel/uppsrc/CtrlCore/TopWindow.cpp:323
#32 0x00005555557bbdb6 in GuiMainFn_ () at /home/user/upp/devel/uppsrc/ide/main.cpp:435
#33 0x0000555555ae38ab in Upp::AppExecute__ (app=0x5555557bac20 <GuiMainFn_()>) at /home/user/upp/devel/uppsrc/Core/App.cpp:479
#34 0x00005555557bab45 in main (argc=1, argv=0x7fffffffe088, envptr=0x55555683fe00) at /home/user/upp/devel/uppsrc/ide/main.cpp:177
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
|
|
|
|
| Re: Compilation warnings and random crashes [message #60995 is a reply to message #60994] |
Thu, 17 October 2024 13:01   |
 |
mirek
Messages: 14291 Registered: November 2005
|
Ultimate Member |
|
|
Can I ask for a little experiment:
ide/SelectPkg.cpp:671
for(int i = 0; i < packages.GetCount(); i++) {
const PkInfo& pkg = packages[i];
Image icon = IdeImg::Package();
/*
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);
}
ide/SelectPkg.cpp:790
if(d.ispackage && 0) {
String icon_path;
if(IsUHDMode())
Does it crash with these?
Mirek
[Updated on: Thu, 17 October 2024 13:01] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: Compilation warnings and random crashes [message #61001 is a reply to message #61000] |
Thu, 17 October 2024 14:00   |
 |
mirek
Messages: 14291 Registered: November 2005
|
Ultimate Member |
|
|
What about this:
DLOG("==================");
for(int i = 0; i < packages.GetCount(); i++) {
const PkInfo& pkg = packages[i];
Image icon = pkg.icon;
RDUMP(IdeImg::HubMainPackage().GetSize());
RDUMP(IdeImg::MainPackage().GetSize());
RDUMP(IdeImg::HubPackage().GetSize());
RDUMP(IdeImg::Package().GetSize());
RDUMP(~IdeImg::HubMainPackage());
RDUMP(~IdeImg::MainPackage());
RDUMP(~IdeImg::HubPackage());
RDUMP(~IdeImg::Package());
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);
}
(log after crash...)
Mirek
[Updated on: Thu, 17 October 2024 14:01] Report message to a moderator
|
|
|
|
| Re: Compilation warnings and random crashes [message #61002 is a reply to message #61001] |
Thu, 17 October 2024 14:40   |
Oblivion
Messages: 1266 Registered: August 2007
|
Senior Contributor |
|
|
==================
IdeImg::HubMainPackage().GetSize() = (16, 16)
IdeImg::MainPackage().GetSize() = (16, 16)
IdeImg::HubPackage().GetSize() = (16, 16)
IdeImg::Package().GetSize() = (16, 16)
~IdeImg::HubMainPackage() = 0x7e845c9a8850
~IdeImg::MainPackage() = 0x7e845c8edb50
~IdeImg::HubPackage() = 0x7e845cb31750
~IdeImg::Package() = 0x7e845c979a50
IdeImg::HubMainPackage().GetSize() = (16, 16)
IdeImg::MainPackage().GetSize() = (16, 16)
IdeImg::HubPackage().GetSize() = (16, 16)
IdeImg::Package().GetSize() = (16, 16)
~IdeImg::HubMainPackage() = 0x7e845c9a8850
~IdeImg::MainPackage() = 0x7e845c8edb50
~IdeImg::HubPackage() = 0x7e845cb31750
~IdeImg::Package() = 0x7e845c979a50
IdeImg::HubMainPackage().GetSize() = (16, 16)
IdeImg::MainPackage().GetSize() = (16, 16)
IdeImg::HubPackage().GetSize() = (16, 16)
IdeImg::Package().GetSize() = (16, 16)
~IdeImg::HubMainPackage() = 0x7e845c9a8850
~IdeImg::MainPackage() = 0x7e845c8edb50
~IdeImg::HubPackage() = 0x7e845cb31750
~IdeImg::Package() = 0x7e845c979a50
IdeImg::HubMainPackage().GetSize() = (16, 16)
IdeImg::MainPackage().GetSize() = (16, 16)
IdeImg::HubPackage().GetSize() = (16, 16)
IdeImg::Package().GetSize() = (16, 16)
~IdeImg::HubMainPackage() = 0x7e845c9a8850
~IdeImg::MainPackage() = 0x7e845c8edb50
~IdeImg::HubPackage() = 0x7e845cb31750
~IdeImg::Package() = 0x7e845c979a50
IdeImg::HubMainPackage().GetSize() = (16, 16)
IdeImg::MainPackage().GetSize() = (16, 16)
IdeImg::HubPackage().GetSize() = (16, 16)
IdeImg::Package().GetSize() = (16, 16)
~IdeImg::HubMainPackage() = 0x7e845c9a8850
~IdeImg::MainPackage() = 0x7e845c8edb50
~IdeImg::HubPackage() = 0x7e845cb31750
~IdeImg::Package() = 0x7e845c979a50
****************** PANIC: Invalid memory access!
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
|
|
|
|
| Re: Compilation warnings and random crashes [message #61003 is a reply to message #60585] |
Thu, 17 October 2024 14:48   |
Oblivion
Messages: 1266 Registered: August 2007
|
Senior Contributor |
|
|
This time I get another error
LOG
==================
IdeImg::HubMainPackage().GetSize() = (16, 16)
IdeImg::MainPackage().GetSize() = (16, 16)
IdeImg::HubPackage().GetSize() = (16, 16)
IdeImg::Package().GetSize() = (16, 16)
~IdeImg::HubMainPackage() = 0x7ffff25a8850
~IdeImg::MainPackage() = 0x7ffff24edb50
~IdeImg::HubPackage() = 0x7ffff2731750
~IdeImg::Package() = 0x7ffff2579a50
IdeImg::HubMainPackage().GetSize() = (16, 16)
IdeImg::MainPackage().GetSize() = (16, 16)
IdeImg::HubPackage().GetSize() = (16, 16)
IdeImg::Package().GetSize() = (16, 16)
~IdeImg::HubMainPackage() = 0x7ffff25a8850
~IdeImg::MainPackage() = 0x7ffff24edb50
~IdeImg::HubPackage() = 0x7ffff2731750
~IdeImg::Package() = 0x7ffff2579a50
IdeImg::HubMainPackage().GetSize() = (16, 16)
IdeImg::MainPackage().GetSize() = (16, 16)
IdeImg::HubPackage().GetSize() = (16, 16)
IdeImg::Package().GetSize() = (16, 16)
~IdeImg::HubMainPackage() = 0x7ffff25a8850
~IdeImg::MainPackage() = 0x7ffff24edb50
~IdeImg::HubPackage() = 0x7ffff2731750
~IdeImg::Package() = 0x7ffff2579a50
IdeImg::HubMainPackage().GetSize() = (16, 16)
IdeImg::MainPackage().GetSize() = (16, 16)
IdeImg::HubPackage().GetSize() = (16, 16)
IdeImg::Package().GetSize() = (16, 16)
~IdeImg::HubMainPackage() = 0x7ffff25a8850
~IdeImg::MainPackage() = 0x7ffff24edb50
~IdeImg::HubPackage() = 0x7ffff2731750
~IdeImg::Package() = 0x7ffff2579a50
IdeImg::HubMainPackage().GetSize() = (16, 16)
IdeImg::MainPackage().GetSize() = (16, 16)
IdeImg::HubPackage().GetSize() = (16, 16)
IdeImg::Package().GetSize() = (16, 16)
~IdeImg::HubMainPackage() = 0x7ffff25a8850
~IdeImg::MainPackage() = 0x7ffff24edb50
~IdeImg::HubPackage() = 0x7ffff2731750
~IdeImg::Package() = 0x7ffff2579a50
IdeImg::HubMainPackage().GetSize() = (16, 16)
IdeImg::MainPackage().GetSize() = (16, 16)
IdeImg::HubPackage().GetSize() = (16, 16)
IdeImg::Package().GetSize() = (16, 16)
~IdeImg::HubMainPackage() = 0x7ffff25a8850
~IdeImg::MainPackage() = 0x7ffff24edb50
~IdeImg::HubPackage() = 0x7ffff2731750
~IdeImg::Package() = 0x7ffff2579a50
Backtrace:
--------------------------------
#0 Upp::String0::LSet (this=0x7ffffffe70e0, s=...) at /home/user/upp/devel/uppsrc/Core/StringMem.i:10
#1 0x0000555555c65b47 in Upp::String0::Set0 (this=0x7ffffffe70e0, s=...) at /home/user/upp/devel/uppsrc/Core/String.h:264
#2 Upp::String::String (this=0x7ffffffe70e0, s=...) at /home/user/upp/devel/uppsrc/Core/String.h:385
#3 Upp::Iml::GetId (this=0x5555566b3250 <IdeImg::Iml()::iml>, i=<optimized out>) at /home/user/upp/devel/uppsrc/Draw/Image.h:317
#4 Upp::Iml::Get (this=0x5555566b3250 <IdeImg::Iml()::iml>, i=<optimized out>) at /home/user/upp/devel/uppsrc/Draw/Iml.cpp:150
#5 0x00005555557a11ff in IdeImg::Get (i=327) at /home/user/upp/devel/uppsrc/Draw/iml_source.h:113
#6 0x000055555588db97 in SelectPackageDlg::SyncList (this=this@entry=0x7ffffffe7750, find=...) at /home/user/upp/devel/uppsrc/ide/SelectPkg.cpp:686
#7 0x000055555588556b in SelectPackageDlg::Load (this=this@entry=0x7ffffffe7750, find=...) at /home/user/upp/devel/uppsrc/ide/SelectPkg.cpp:769
#8 0x0000555555889ea4 in SelectPackageDlg::OnBase (this=0x7ffffffe7750) at /home/user/upp/devel/uppsrc/ide/SelectPkg.cpp:420
#9 0x000055555599743f in Upp::Function<void()>::operator() (this=0x7ffffffe8800) at /home/user/upp/devel/uppsrc/Core/Function.h:76
#10 Upp::ArrayCtrl::SetCursor0 (this=0x7ffffffe8290, i=8, dosel=<optimized out>) at /home/user/upp/devel/uppsrc/CtrlLib/ArrayCtrl.cpp:1487
#11 0x000055555588c9c6 in SelectPackageDlg::SyncBase (this=this@entry=0x7ffffffe7750, initvars=...) at /home/user/upp/devel/uppsrc/ide/SelectPkg.cpp:846
#12 0x000055555588c2b7 in SelectPackageDlg::Run (this=this@entry=0x7ffffffe7750, nest=..., startwith=...) at /home/user/upp/devel/uppsrc/ide/SelectPkg.cpp:362
#13 0x0000555555891c3b in SelectPackage (nest=..., title=title@entry=0x7fff9a50a388 "Select main package (TheIDE 17522)", startwith=0x7ffffffea630 "GLDrawDemo", selectvars=<optimized out>, main=<optimized out>)
at /home/user/upp/devel/uppsrc/ide/SelectPkg.cpp:873
#14 0x000055555571c835 in Ide::OpenMainPackage (this=0x7ffffffe9e10) at /home/user/upp/devel/uppsrc/ide/ide.cpp:215
#15 0x000055555571ca92 in Ide::NewMainPackage (this=0x7ffffffe70e0) at /home/user/upp/devel/uppsrc/ide/ide.cpp:234
#16 0x0000555555cd9d2e in Upp::Function<void()>::operator() (this=<optimized out>) at /home/user/upp/devel/uppsrc/Core/Function.h:76
#17 Upp::Ctrl::Action (this=<optimized out>) at /home/user/upp/devel/uppsrc/CtrlCore/Ctrl.cpp:414
#18 0x0000555555a2752b in Upp::MenuItem::LeftUp (this=0x7ffff26cdd60) at /home/user/upp/devel/uppsrc/CtrlLib/MenuItem.cpp:382
#19 0x0000555555ce7b00 in Upp::Ctrl::MouseEvent (this=0x7ffffffe70e0, event=<optimized out>, p=..., zdelta=0, keyflags=1447356480) at /home/user/upp/devel/uppsrc/CtrlCore/CtrlMouse.cpp:190
#20 0x0000555555ce710f in Upp::Ctrl::MouseEvent0 (this=this@entry=0x7ffff26cdd60, event=event@entry=145, p=..., zdelta=zdelta@entry=0, keyflags=keyflags@entry=0) at /home/user/upp/devel/uppsrc/CtrlCore/CtrlMouse.cpp:96
#21 0x0000555555ce7496 in Upp::Ctrl::MouseEventH (this=this@entry=0x7ffff26cdd60, event=event@entry=145, p=..., zdelta=zdelta@entry=0, keyflags=0) at /home/user/upp/devel/uppsrc/CtrlCore/CtrlMouse.cpp:116
#22 0x0000555555ce8b2e in Upp::Ctrl::MEvent0 (this=this@entry=0x7ffff26cdd60, e=e@entry=145, p=..., zd=zd@entry=0) at /home/user/upp/devel/uppsrc/CtrlCore/CtrlMouse.cpp:364
#23 0x0000555555ce9187 in Upp::Ctrl::DispatchMouseEvent (this=<optimized out>, e=e@entry=145, p=..., zd=zd@entry=0) at /home/user/upp/devel/uppsrc/CtrlCore/CtrlMouse.cpp:648
#24 0x0000555555ce9160 in Upp::Ctrl::DispatchMouseEvent (this=<optimized out>, e=e@entry=145, p=..., zd=zd@entry=0) at /home/user/upp/devel/uppsrc/CtrlCore/CtrlMouse.cpp:648
#25 0x0000555555ce9160 in Upp::Ctrl::DispatchMouseEvent (this=this@entry=0x7ffff260aa80, e=e@entry=145, p=..., zd=zd@entry=0) at /home/user/upp/devel/uppsrc/CtrlCore/CtrlMouse.cpp:648
#26 0x0000555555ceb3d8 in Upp::Ctrl::DispatchMouse (this=this@entry=0x7ffff260aa80, e=e@entry=145, p=..., zd=zd@entry=0) at /home/user/upp/devel/uppsrc/CtrlCore/CtrlMouse.cpp:622
#27 0x0000555555cfea56 in Upp::Ctrl::DispatchMouseIn (this=0x7ffff260aa80, act=145, zd=0) at /home/user/upp/devel/uppsrc/CtrlCore/GtkEvent.cpp:444
#28 Upp::Ctrl::GtkMouseEvent (this=<optimized out>, action=<optimized out>, act=145, zd=zd@entry=0) at /home/user/upp/devel/uppsrc/CtrlCore/GtkEvent.cpp:454
#29 0x0000555555cfeceb in Upp::Ctrl::GtkButtonEvent (this=this@entry=0x7ffff260aa80, action=action@entry=144) at /home/user/upp/devel/uppsrc/CtrlCore/GtkEvent.cpp:478
#30 0x0000555555cff8c4 in Upp::Ctrl::Proc (this=this@entry=0x7ffff260aa80) at /home/user/upp/devel/uppsrc/CtrlCore/GtkEvent.cpp:581
#31 0x0000555555d00824 in Upp::Ctrl::ProcessEvent0 (quit=quit@entry=0x0, fetch=<optimized out>) at /home/user/upp/devel/uppsrc/CtrlCore/GtkEvent.cpp:766
#32 0x0000555555d00a21 in Upp::Ctrl::ProcessEvents0 (quit=quit@entry=0x0, fetch=<optimized out>) at /home/user/upp/devel/uppsrc/CtrlCore/GtkEvent.cpp:793
#33 0x0000555555cf206e in Upp::Ctrl::ProcessEvents (quit=0x0) at /home/user/upp/devel/uppsrc/CtrlCore/GtkEvent.cpp:810
#34 Upp::Ctrl::EventLoop (ctrl=ctrl@entry=0x7ffffffe9e10) at /home/user/upp/devel/uppsrc/CtrlCore/GtkEvent.cpp:844
#35 0x0000555555cf573d in Upp::TopWindow::Run (this=0x7ffffffe9e10, appmodal=<optimized out>) at /home/user/upp/devel/uppsrc/CtrlCore/TopWindow.cpp:323
#36 0x00005555557adda6 in GuiMainFn_ () at /home/user/upp/devel/uppsrc/ide/main.cpp:435
#37 0x0000555555ae3ecb in Upp::AppExecute__ (app=0x5555557acc10 <GuiMainFn_()>) at /home/user/upp/devel/uppsrc/Core/App.cpp:479
#38 0x00005555557acb35 in main (argc=1, argv=0x7fffffffe088, envptr=0x55555683fe00) at /home/user/upp/devel/uppsrc/ide/main.cpp:177
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
|
|
|
|
| Re: Compilation warnings and random crashes [message #61004 is a reply to message #61002] |
Thu, 17 October 2024 15:08   |
 |
mirek
Messages: 14291 Registered: November 2005
|
Ultimate Member |
|
|
Oblivion wrote on Thu, 17 October 2024 14:40
==================
IdeImg::HubMainPackage().GetSize() = (16, 16)
IdeImg::MainPackage().GetSize() = (16, 16)
IdeImg::HubPackage().GetSize() = (16, 16)
IdeImg::Package().GetSize() = (16, 16)
~IdeImg::HubMainPackage() = 0x7e845c9a8850
~IdeImg::MainPackage() = 0x7e845c8edb50
~IdeImg::HubPackage() = 0x7e845cb31750
~IdeImg::Package() = 0x7e845c979a50
IdeImg::HubMainPackage().GetSize() = (16, 16)
IdeImg::MainPackage().GetSize() = (16, 16)
IdeImg::HubPackage().GetSize() = (16, 16)
IdeImg::Package().GetSize() = (16, 16)
~IdeImg::HubMainPackage() = 0x7e845c9a8850
~IdeImg::MainPackage() = 0x7e845c8edb50
~IdeImg::HubPackage() = 0x7e845cb31750
~IdeImg::Package() = 0x7e845c979a50
IdeImg::HubMainPackage().GetSize() = (16, 16)
IdeImg::MainPackage().GetSize() = (16, 16)
IdeImg::HubPackage().GetSize() = (16, 16)
IdeImg::Package().GetSize() = (16, 16)
~IdeImg::HubMainPackage() = 0x7e845c9a8850
~IdeImg::MainPackage() = 0x7e845c8edb50
~IdeImg::HubPackage() = 0x7e845cb31750
~IdeImg::Package() = 0x7e845c979a50
IdeImg::HubMainPackage().GetSize() = (16, 16)
IdeImg::MainPackage().GetSize() = (16, 16)
IdeImg::HubPackage().GetSize() = (16, 16)
IdeImg::Package().GetSize() = (16, 16)
~IdeImg::HubMainPackage() = 0x7e845c9a8850
~IdeImg::MainPackage() = 0x7e845c8edb50
~IdeImg::HubPackage() = 0x7e845cb31750
~IdeImg::Package() = 0x7e845c979a50
IdeImg::HubMainPackage().GetSize() = (16, 16)
IdeImg::MainPackage().GetSize() = (16, 16)
IdeImg::HubPackage().GetSize() = (16, 16)
IdeImg::Package().GetSize() = (16, 16)
~IdeImg::HubMainPackage() = 0x7e845c9a8850
~IdeImg::MainPackage() = 0x7e845c8edb50
~IdeImg::HubPackage() = 0x7e845cb31750
~IdeImg::Package() = 0x7e845c979a50
****************** PANIC: Invalid memory access!
Weird...
What about
for(int i = 0; i < packages.GetCount(); i++) {
const PkInfo& pkg = packages[i];
Image icon = pkg.icon;
#define DD(x) RDUMP(x.GetSize()); RLOGHEXDUMP(~x, min(32, int(x.GetLength() * sizeof(RGBA))));
DD(IdeImg::HubMainPackage());
DD(IdeImg::MainPackage());
DD(IdeImg::Package());
DD(IdeImg::HubPackage());
DD(icon);
#undef DD
if(IsNull(icon)) {
As far I can see it is either
- compiler bug
- IdeImg is busted, but it is weird that it does not happen in the first iteration
- pkg.icon is busted, although this is hardly explains final crash in Image copy contructor (that AFAIK is call to Retain the data from Iml)
Another thing to try is
for(int i = 0; i < packages.GetCount(); i++) {
const PkInfo& pkg = packages[i];
Image icon = Null; // <<<<<=============
#define DD(x) RDUMP(x.GetSize()); RLOGHEXDUMP(~x, min(32, int(x.GetLength() * sizeof(RGBA))));
DD(IdeImg::HubMainPackage());
DD(IdeImg::MainPackage());
DD(IdeImg::Package());
DD(IdeImg::HubPackage());
DD(icon);
#undef DD
if(IsNull(icon)) {
Uh and please send the whole log - want to compare with "good run" (first invocation of dialog)
[Updated on: Thu, 17 October 2024 15:08] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: Compilation warnings and random crashes [message #61019 is a reply to message #61016] |
Sat, 19 October 2024 16:26   |
 |
mirek
Messages: 14291 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: 1266 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
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: 14291 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: 14291 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: 1319 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: 1266 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 172 times)
Github page: https://github.com/ismail-yilmaz
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: 14291 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: Fri May 15 19:56:56 GMT+2 2026
Total time taken to generate the page: 0.01387 seconds
|