Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » TheIDE stuck in infinite loop (waiting for clipboard on wayland)
TheIDE stuck in infinite loop [message #60954] Sun, 13 October 2024 22:28 Go to next message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 226
Registered: June 2011
Experienced Member
Not sure how to reproduce this one, I just know that it only happens on wayland.

After a period of development if you start typing theIDE will just freeze. You kill it, reopen it and try typing again, it will freeze again. A gdb external session indicates it's stuck in an infinite loop waiting for input from the clipboard. I've tried clearing the global clipboard and it still freezes. When I switch to X11 the problem goes away. I'll try to get a backtrace on it next time it happens.

EDIT Just remembered something: I have been able to get it to break out of the loop by copying something into the clipboard from another app.

[Updated on: Sun, 13 October 2024 23:56]

Report message to a moderator

Re: TheIDE stuck in infinite loop [message #61231 is a reply to message #60954] Sat, 14 December 2024 10:14 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 705
Registered: November 2008
Location: France
Contributor
Hello,

Since last week I have the exact same problem (never had this one in all the years using Ide before) : Ide freezes when I type a letter (It comes back to life after some time I didn't measure the time but about 20s or more ==> the poll timeout ?)

It all started when I created a new sub package for my app and directly decided to erase it (using delete form Ide menu).
Since it started on an action I rarely do: I thought some congif or tmp files were messes up, so I tried erasing all the working data in the directories but Ide would still always freeze once I type the first letter.
To make it work again I had to rename my Ide to something else in order to provoque a fresh install (and therefor new .cache and working directories).

Since this morning, Here it is again Confused
I compiled theide in debug mode (I have the lattest git version no more than a few days old) and launched in debug ==> same freeze happens !
I erased the clipboard ==> still getting freeze

Here is the backtrace I get:
Thread 1 "ide" received signal SIGINT, Interrupt.
0x00007ffff632736d in __GI___poll (fds=0x1aa5340, nfds=3, timeout=20) at ../sysdeps/unix/sysv/linux/poll.c:29
29        return SYSCALL_CANCEL (poll, fds, nfds, timeout);                                                                                                                                                                                                                     
(gdb) bt
#0  0x00007ffff632736d in __GI___poll (fds=0x1aa5340, nfds=3, timeout=20) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6db2629 in g_main_context_poll (priority=<optimized out>, n_fds=3, fds=0x1aa5340, timeout=<optimized out>, context=0x1ac67f0) at ../glib/gmain.c:4584
#2  g_main_context_iterate.isra.0 (context=0x1ac67f0, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4271
#3  0x00007ffff6d53aff in g_main_loop_run (loop=0x1fd3420) at ../glib/gmain.c:4479
#4  0x00007ffff779dc8e in gtk_clipboard_wait_for_contents (clipboard=clipboard@entry=0x1fd3340, target=0x8b) at ../gtk/gtkclipboard.c:1436
#5  0x00007ffff77a0038 in gtk_clipboard_wait_is_text_available (clipboard=0x1fd3340) at ../gtk/gtkclipboard.c:1720
#6  0x0000000000d86992 in Upp::Ctrl::Gclipboard::IsAvailable (this=0x19f7278 <Upp::Ctrl::gclipboard()::c>, fmt=...) at GtkClip.cpp:133
#7  0x0000000000d87b40 in Upp::IsClipboardAvailableText () at GtkClip.cpp:299
#8  0x00000000004b4695 in Ide::EditorMenu (this=0x7ffffffcfca0, bar=...) at Insert.cpp:333
#9  0x000000000061211a in Upp::callback<Ide, Ide, Upp::Bar&>(Ide*, void (Ide::*)(Upp::Bar&))::{lambda(Upp::Bar&)#1}::operator()(Upp::Bar&) const (this=0x7ffff48b59d0, a1=...) at /home/..../git_trunk/uppsrc/Core/CallbackNP.i:38
#10 0x0000000000612051 in Upp::Function<void (Upp::Bar&)>::Wrapper<Upp::callback<Ide, Ide, Upp::Bar&>(Ide*, void (Ide::*)(Upp::Bar&))::{lambda(Upp::Bar&)#1}>::Execute(Upp::Bar&) (this=0x7ffff48b59c0, args=...)
    at /home/...../git_trunk/uppsrc/Core/Function.h:17
#11 0x0000000000813132 in Upp::Function<void (Upp::Bar&)>::operator()(Upp::Bar&) const (this=0x7ffffffceba0, args=...) at /home/...../git_trunk/uppsrc/Core/Function.h:86
#12 0x000000000073897b in Upp::Bar::Scan(Upp::Function<void (Upp::Bar&)>, unsigned int) (proc=..., key=67108873) at Bar.cpp:525
#13 0x0000000000748913 in Upp::LineEdit::Key (this=0x7ffffffd1068, key=67108873, count=1) at LineEdit.cpp:1258
#14 0x0000000000712e32 in Upp::CodeEditor::Key (this=0x7ffffffd1068, code=67108873, count=1) at CodeEditor.cpp:1274
#15 0x000000000048e7ba in AssistEditor::Key (this=0x7ffffffd1068, key=67108873, count=1) at Assist.cpp:1073
#16 0x0000000000d6d282 in Upp::Ctrl::DispatchKey (keycode=67108873, count=1) at CtrlKbd.cpp:101
#17 0x0000000000d84292 in Upp::Ctrl::Proc (this=0x7ffffffcfca0) at GtkEvent.cpp:690
#18 0x0000000000d84bcf in Upp::Ctrl::ProcessEvent0 (quit=0x0, fetch=true) at GtkEvent.cpp:766
#19 0x0000000000d84d15 in Upp::Ctrl::ProcessEvents0 (quit=0x0, fetch=true) at GtkEvent.cpp:793
#20 0x0000000000d5234f in Upp::Ctrl::ProcessEvents (quit=0x0) at GtkEvent.cpp:810
#21 0x0000000000d720d4 in Upp::Ctrl::EventLoop (ctrl=0x7ffffffcfca0) at GtkEvent.cpp:844
#22 0x0000000000d7606c in Upp::TopWindow::Run (this=0x7ffffffcfca0, appmodal=false) at TopWindow.cpp:323
#23 0x00000000004e62c3 in GuiMainFn_ () at main.cpp:436
#24 0x00000000009346ec in Upp::AppExecute__ (app=0x4e4c30 <GuiMainFn_()>) at App.cpp:479
#25 0x00000000004e4b7d in main (argc=1, argv=0x7fffffffdae8, envptr=0x7fffffffdaf8) at main.cpp:177

Note the key pressed should be a 'v' or 'tab' (I may be mistaken)

I tried to get other backtraces in other conditions : I always get the same backtrace result
It seems quite strange : I type a letter, it freezes, and the backtrace points at Upp::Bar::Scan() which, at the end waits for clipboard entry ???

My exact Git version is:
* commit b99c26b267b2a484ee709024ae0e1e0a1e5e1258 (HEAD -> master, origin/master, origin/HEAD)
| Author: Mirek Fidler <mirek.fidler@gmail.com>
| Date:   Sat Dec 7 12:57:52 2024 +0100
| 
|     ide: Error list skin sensitivity fixed
| 


Here is the code for Upp::LineEdit:1258
bool LineEdit::Key(dword key, int count) {
	NextUndo();
	switch(key) {
	case K_CTRL_UP:
		ScrollUp();
		return true;
	case K_CTRL_DOWN:
		ScrollDown();
		return true;
	case K_INSERT:
		OverWriteMode(!IsOverWriteMode());
		break;
	}
	bool sel = key & K_SHIFT;
	dorectsel = key & K_ALT;
	dword k = key & ~K_SHIFT;
	if((key & (K_SHIFT|K_ALT)) == (K_SHIFT|K_ALT))
		k &= ~K_ALT;
	switch(k) {
	case K_CTRL_LEFT:
		{
			PlaceCaret(GetPrevWord(cursor), sel);
			break;
		}
	case K_CTRL_RIGHT:
		{
			PlaceCaret(GetNextWord(cursor), sel);
			break;
		}
	case K_LEFT:
		MoveLeft(sel);
		break;
	case K_RIGHT:
		MoveRight(sel);
		break;
	case K_HOME:
		MoveHome(sel);
		break;
	case K_END:
		MoveEnd(sel);
		break;
	case K_UP:
		MoveUp(sel);
		break;
	case K_DOWN:
		MoveDown(sel);
		break;
	case K_PAGEUP:
		MovePageUp(sel);
		break;
	case K_PAGEDOWN:
		MovePageDown(sel);
		break;
	case K_CTRL_PAGEUP:
	case K_CTRL_HOME:
		MoveTextBegin(sel);
		break;
	case K_CTRL_PAGEDOWN:
	case K_CTRL_END:
		MoveTextEnd(sel);
		break;
	case K_CTRL_C:
	case K_CTRL_INSERT:
		Copy();
		break;
	case K_CTRL_A:
		SelectAll();
		break;
	default:
		dorectsel = false;
		if(IsReadOnly())
			return MenuBar::Scan(WhenBar, key);
		switch(key) {
		case K_DELETE:
			DeleteChar();
			break;
		case K_BACKSPACE:
		case K_SHIFT|K_BACKSPACE:
			Backspace();
			break;
		case K_SHIFT_TAB:
			AlignChar();
			break;
		case K_CTRL_Y:
		case K_CTRL_L:
			if(cutline) {
				CutLine();
				break;
			}
		default:
			if(InsertChar(key, count, true))
				return true;
			return MenuBar::Scan(WhenBar, key);   ******************* L1258 *******************
		}
		return true;
	}
	dorectsel = false;
	Sync();
	return true;
}

I guess InsertChar() didn't work for some reason ?

Note : all is running again ... and I didn't do anything to correct it (Assist is still running)

[Updated on: Sat, 14 December 2024 10:25]

Report message to a moderator

Re: TheIDE stuck in infinite loop [message #61232 is a reply to message #61231] Sat, 14 December 2024 10:26 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 705
Registered: November 2008
Location: France
Contributor
Here are all the other backtraces : they are all very similar but just in case they help

(gdb) bt
#0  0x00007ffff632736d in __GI___poll (fds=0x1aa4c80, nfds=3, timeout=20) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6db2629 in g_main_context_poll (priority=<optimized out>, n_fds=3, fds=0x1aa4c80, timeout=<optimized out>, context=0x1ac5e20) at ../glib/gmain.c:4584
#2  g_main_context_iterate.isra.0 (context=0x1ac5e20, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4271
#3  0x00007ffff6d53aff in g_main_loop_run (loop=0x1fc5380) at ../glib/gmain.c:4479
#4  0x00007ffff779dc8e in gtk_clipboard_wait_for_contents (clipboard=clipboard@entry=0x1fc15d0, target=0x8b) at ../gtk/gtkclipboard.c:1436
#5  0x00007ffff77a0038 in gtk_clipboard_wait_is_text_available (clipboard=0x1fc15d0) at ../gtk/gtkclipboard.c:1720
#6  0x0000000000d86992 in Upp::Ctrl::Gclipboard::IsAvailable (this=0x19f7278 <Upp::Ctrl::gclipboard()::c>, fmt=...) at GtkClip.cpp:133
#7  0x0000000000d87b40 in Upp::IsClipboardAvailableText () at GtkClip.cpp:299
#8  0x00000000004b4695 in Ide::EditorMenu (this=0x7ffffffcfca0, bar=...) at Insert.cpp:333
#9  0x000000000061211a in Upp::callback<Ide, Ide, Upp::Bar&>(Ide*, void (Ide::*)(Upp::Bar&))::{lambda(Upp::Bar&)#1}::operator()(Upp::Bar&) const (this=0x7ffff48b59d0, a1=...)
    at /home/...../git_trunk/uppsrc/Core/CallbackNP.i:38
#10 0x0000000000612051 in Upp::Function<void (Upp::Bar&)>::Wrapper<Upp::callback<Ide, Ide, Upp::Bar&>(Ide*, void (Ide::*)(Upp::Bar&))::{lambda(Upp::Bar&)#1}>::Execute(Upp::Bar&) (this=0x7ffff48b59c0, args=...)
    at /home/...../git_trunk/uppsrc/Core/Function.h:17
#11 0x0000000000813132 in Upp::Function<void (Upp::Bar&)>::operator()(Upp::Bar&) const (this=0x7ffffffce1b0, args=...) at /home/...../git_trunk/uppsrc/Core/Function.h:86
#12 0x000000000073897b in Upp::Bar::Scan(Upp::Function<void (Upp::Bar&)>, unsigned int) (proc=..., key=67108873) at Bar.cpp:525
#13 0x0000000000748913 in Upp::LineEdit::Key (this=0x7ffffffd1068, key=67108873, count=1) at LineEdit.cpp:1258
#14 0x0000000000712e32 in Upp::CodeEditor::Key (this=0x7ffffffd1068, code=67108873, count=1) at CodeEditor.cpp:1274
#15 0x000000000048e7ba in AssistEditor::Key (this=0x7ffffffd1068, key=67108873, count=1) at Assist.cpp:1073
#16 0x0000000000d6d282 in Upp::Ctrl::DispatchKey (keycode=67108873, count=1) at CtrlKbd.cpp:101
#17 0x0000000000d84292 in Upp::Ctrl::Proc (this=0x7ffffffcfca0) at GtkEvent.cpp:690
#18 0x0000000000d84bcf in Upp::Ctrl::ProcessEvent0 (quit=0x0, fetch=true) at GtkEvent.cpp:766
#19 0x0000000000d84d15 in Upp::Ctrl::ProcessEvents0 (quit=0x0, fetch=true) at GtkEvent.cpp:793
#20 0x0000000000d5234f in Upp::Ctrl::ProcessEvents (quit=0x0) at GtkEvent.cpp:810
#21 0x00000000006cfd79 in SyncRefsDir (dir=0x7ffff4a59d28 "/home/...../git_trunk/uppsrc", rel=..., pi=...) at TopicBase.cpp:248
#22 0x00000000006d0030 in SyncRefs () at TopicBase.cpp:268
#23 0x00000000004e6252 in GuiMainFn_ () at main.cpp:428
#24 0x00000000009346ec in Upp::AppExecute__ (app=0x4e4c30 <GuiMainFn_()>) at App.cpp:479
#25 0x00000000004e4b7d in main (argc=1, argv=0x7fffffffdae8, envptr=0x7fffffffdaf8) at main.cpp:177
(gdb) continue
Continuing.
^C
Thread 1 "ide" received signal SIGINT, Interrupt.
0x00007ffff632736d in __GI___poll (fds=0x1aa4c80, nfds=3, timeout=20) at ../sysdeps/unix/sysv/linux/poll.c:29
29        return SYSCALL_CANCEL (poll, fds, nfds, timeout);
(gdb) 
Continuing.
[Detaching after fork from child process 5196]
[New Thread 0x7fffc10006c0 (LWP 5197)]



^C
Thread 1 "ide" received signal SIGINT, Interrupt.
0x00007ffff632736d in __GI___poll (fds=0x1aa4c80, nfds=3, timeout=20) at ../sysdeps/unix/sysv/linux/poll.c:29
29        return SYSCALL_CANCEL (poll, fds, nfds, timeout);
(gdb) bt
#0  0x00007ffff632736d in __GI___poll (fds=0x1aa4c80, nfds=3, timeout=20) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6db2629 in g_main_context_poll (priority=<optimized out>, n_fds=3, fds=0x1aa4c80, timeout=<optimized out>, context=0x1ac5e20) at ../glib/gmain.c:4584
#2  g_main_context_iterate.isra.0 (context=0x1ac5e20, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4271
#3  0x00007ffff6d53aff in g_main_loop_run (loop=0x1f58ee0) at ../glib/gmain.c:4479
#4  0x00007ffff779dc8e in gtk_clipboard_wait_for_contents (clipboard=clipboard@entry=0x1fc15d0, target=0x8b) at ../gtk/gtkclipboard.c:1436
#5  0x00007ffff77a0038 in gtk_clipboard_wait_is_text_available (clipboard=0x1fc15d0) at ../gtk/gtkclipboard.c:1720
#6  0x0000000000d86992 in Upp::Ctrl::Gclipboard::IsAvailable (this=0x19f7278 <Upp::Ctrl::gclipboard()::c>, fmt=...) at GtkClip.cpp:133
#7  0x0000000000d87b40 in Upp::IsClipboardAvailableText () at GtkClip.cpp:299
#8  0x00000000004b4695 in Ide::EditorMenu (this=0x7ffffffcfca0, bar=...) at Insert.cpp:333
#9  0x000000000061211a in Upp::callback<Ide, Ide, Upp::Bar&>(Ide*, void (Ide::*)(Upp::Bar&))::{lambda(Upp::Bar&)#1}::operator()(Upp::Bar&) const (this=0x7ffff48b59d0, a1=...) at /home/...../git_trunk/uppsrc/Core/CallbackNP.i:38
#10 0x0000000000612051 in Upp::Function<void (Upp::Bar&)>::Wrapper<Upp::callback<Ide, Ide, Upp::Bar&>(Ide*, void (Ide::*)(Upp::Bar&))::{lambda(Upp::Bar&)#1}>::Execute(Upp::Bar&) (this=0x7ffff48b59c0, args=...)
    at /home/...../git_trunk/uppsrc/Core/Function.h:17
#11 0x0000000000813132 in Upp::Function<void (Upp::Bar&)>::operator()(Upp::Bar&) const (this=0x7ffffffceba0, args=...) at /home/...../git_trunk/uppsrc/Core/Function.h:86
#12 0x000000000073897b in Upp::Bar::Scan(Upp::Function<void (Upp::Bar&)>, unsigned int) (proc=..., key=69206102) at Bar.cpp:525
#13 0x0000000000748913 in Upp::LineEdit::Key (this=0x7ffffffd1068, key=69206102, count=1) at LineEdit.cpp:1258
#14 0x0000000000712e32 in Upp::CodeEditor::Key (this=0x7ffffffd1068, code=69206102, count=1) at CodeEditor.cpp:1274
#15 0x000000000048e7ba in AssistEditor::Key (this=0x7ffffffd1068, key=69206102, count=1) at Assist.cpp:1073
#16 0x0000000000d6d282 in Upp::Ctrl::DispatchKey (keycode=69206102, count=1) at CtrlKbd.cpp:101
#17 0x0000000000d84292 in Upp::Ctrl::Proc (this=0x7ffffffcfca0) at GtkEvent.cpp:690
#18 0x0000000000d84bcf in Upp::Ctrl::ProcessEvent0 (quit=0x0, fetch=true) at GtkEvent.cpp:766
#19 0x0000000000d84d15 in Upp::Ctrl::ProcessEvents0 (quit=0x0, fetch=true) at GtkEvent.cpp:793
#20 0x0000000000d5234f in Upp::Ctrl::ProcessEvents (quit=0x0) at GtkEvent.cpp:810
#21 0x0000000000d720d4 in Upp::Ctrl::EventLoop (ctrl=0x7ffffffcfca0) at GtkEvent.cpp:844
#22 0x0000000000d7606c in Upp::TopWindow::Run (this=0x7ffffffcfca0, appmodal=false) at TopWindow.cpp:323
#23 0x00000000004e62c3 in GuiMainFn_ () at main.cpp:436
#24 0x00000000009346ec in Upp::AppExecute__ (app=0x4e4c30 <GuiMainFn_()>) at App.cpp:479
#25 0x00000000004e4b7d in main (argc=1, argv=0x7fffffffdae8, envptr=0x7fffffffdaf8) at main.cpp:177
(gdb) 



#0  0x00007ffff632736d in __GI___poll (fds=0x1aa4c80, nfds=3, timeout=20) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6db2629 in g_main_context_poll (priority=<optimized out>, n_fds=3, fds=0x1aa4c80, timeout=<optimized out>, context=0x1ac5e20) at ../glib/gmain.c:4584
#2  g_main_context_iterate.isra.0 (context=0x1ac5e20, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4271
#3  0x00007ffff6d53aff in g_main_loop_run (loop=0x1f58ee0) at ../glib/gmain.c:4479
#4  0x00007ffff779dc8e in gtk_clipboard_wait_for_contents (clipboard=clipboard@entry=0x1fc15d0, target=0x8b) at ../gtk/gtkclipboard.c:1436
#5  0x00007ffff77a0038 in gtk_clipboard_wait_is_text_available (clipboard=0x1fc15d0) at ../gtk/gtkclipboard.c:1720
#6  0x0000000000d86992 in Upp::Ctrl::Gclipboard::IsAvailable (this=0x19f7278 <Upp::Ctrl::gclipboard()::c>, fmt=...) at GtkClip.cpp:133
#7  0x0000000000d87b40 in Upp::IsClipboardAvailableText () at GtkClip.cpp:299
#8  0x00000000004b4695 in Ide::EditorMenu (this=0x7ffffffcfca0, bar=...) at Insert.cpp:333
#9  0x000000000061211a in Upp::callback<Ide, Ide, Upp::Bar&>(Ide*, void (Ide::*)(Upp::Bar&))::{lambda(Upp::Bar&)#1}::operator()(Upp::Bar&) const (this=0x7ffff48b59d0, a1=...) at /home/...../git_trunk/uppsrc/Core/CallbackNP.i:38
#10 0x0000000000612051 in Upp::Function<void (Upp::Bar&)>::Wrapper<Upp::callback<Ide, Ide, Upp::Bar&>(Ide*, void (Ide::*)(Upp::Bar&))::{lambda(Upp::Bar&)#1}>::Execute(Upp::Bar&) (this=0x7ffff48b59c0, args=...)
    at /home/...../git_trunk/uppsrc/Core/Function.h:17
#11 0x0000000000813132 in Upp::Function<void (Upp::Bar&)>::operator()(Upp::Bar&) const (this=0x7ffffffceba0, args=...) at /home/...../git_trunk/uppsrc/Core/Function.h:86
#12 0x000000000073897b in Upp::Bar::Scan(Upp::Function<void (Upp::Bar&)>, unsigned int) (proc=..., key=69206102) at Bar.cpp:525
#13 0x0000000000748913 in Upp::LineEdit::Key (this=0x7ffffffd1068, key=69206102, count=1) at LineEdit.cpp:1258
#14 0x0000000000712e32 in Upp::CodeEditor::Key (this=0x7ffffffd1068, code=69206102, count=1) at CodeEditor.cpp:1274
#15 0x000000000048e7ba in AssistEditor::Key (this=0x7ffffffd1068, key=69206102, count=1) at Assist.cpp:1073
#16 0x0000000000d6d282 in Upp::Ctrl::DispatchKey (keycode=69206102, count=1) at CtrlKbd.cpp:101
#17 0x0000000000d84292 in Upp::Ctrl::Proc (this=0x7ffffffcfca0) at GtkEvent.cpp:690
#18 0x0000000000d84bcf in Upp::Ctrl::ProcessEvent0 (quit=0x0, fetch=true) at GtkEvent.cpp:766
#19 0x0000000000d84d15 in Upp::Ctrl::ProcessEvents0 (quit=0x0, fetch=true) at GtkEvent.cpp:793
#20 0x0000000000d5234f in Upp::Ctrl::ProcessEvents (quit=0x0) at GtkEvent.cpp:810
#21 0x0000000000d720d4 in Upp::Ctrl::EventLoop (ctrl=0x7ffffffcfca0) at GtkEvent.cpp:844
#22 0x0000000000d7606c in Upp::TopWindow::Run (this=0x7ffffffcfca0, appmodal=false) at TopWindow.cpp:323
#23 0x00000000004e62c3 in GuiMainFn_ () at main.cpp:436
#24 0x00000000009346ec in Upp::AppExecute__ (app=0x4e4c30 <GuiMainFn_()>) at App.cpp:479
#25 0x00000000004e4b7d in main (argc=1, argv=0x7fffffffdae8, envptr=0x7fffffffdaf8) at main.cpp:177
(gdb) 



#0  0x00007ffff632736d in __GI___poll (fds=0x1aa4c80, nfds=3, timeout=20) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6db2629 in g_main_context_poll (priority=<optimized out>, n_fds=3, fds=0x1aa4c80, timeout=<optimized out>, context=0x1ac5e20) at ../glib/gmain.c:4584
#2  g_main_context_iterate.isra.0 (context=0x1ac5e20, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4271
#3  0x00007ffff6d53aff in g_main_loop_run (loop=0x1f58ee0) at ../glib/gmain.c:4479
#4  0x00007ffff779dc8e in gtk_clipboard_wait_for_contents (clipboard=clipboard@entry=0x1fc15d0, target=0x8b) at ../gtk/gtkclipboard.c:1436
#5  0x00007ffff77a0038 in gtk_clipboard_wait_is_text_available (clipboard=0x1fc15d0) at ../gtk/gtkclipboard.c:1720
#6  0x0000000000d86992 in Upp::Ctrl::Gclipboard::IsAvailable (this=0x19f7278 <Upp::Ctrl::gclipboard()::c>, fmt=...) at GtkClip.cpp:133
#7  0x0000000000d87b40 in Upp::IsClipboardAvailableText () at GtkClip.cpp:299
#8  0x00000000004b4695 in Ide::EditorMenu (this=0x7ffffffcfca0, bar=...) at Insert.cpp:333
#9  0x000000000061211a in Upp::callback<Ide, Ide, Upp::Bar&>(Ide*, void (Ide::*)(Upp::Bar&))::{lambda(Upp::Bar&)#1}::operator()(Upp::Bar&) const (this=0x7ffff48b59d0, a1=...) at /home/...../git_trunk/uppsrc/Core/CallbackNP.i:38
#10 0x0000000000612051 in Upp::Function<void (Upp::Bar&)>::Wrapper<Upp::callback<Ide, Ide, Upp::Bar&>(Ide*, void (Ide::*)(Upp::Bar&))::{lambda(Upp::Bar&)#1}>::Execute(Upp::Bar&) (this=0x7ffff48b59c0, args=...)
    at /home/...../git_trunk/uppsrc/Core/Function.h:17
#11 0x0000000000813132 in Upp::Function<void (Upp::Bar&)>::operator()(Upp::Bar&) const (this=0x7ffffffceba0, args=...) at /home/...../git_trunk/uppsrc/Core/Function.h:86
#12 0x000000000073897b in Upp::Bar::Scan(Upp::Function<void (Upp::Bar&)>, unsigned int) (proc=..., key=69206102) at Bar.cpp:525
#13 0x0000000000748913 in Upp::LineEdit::Key (this=0x7ffffffd1068, key=69206102, count=1) at LineEdit.cpp:1258
#14 0x0000000000712e32 in Upp::CodeEditor::Key (this=0x7ffffffd1068, code=69206102, count=1) at CodeEditor.cpp:1274
#15 0x000000000048e7ba in AssistEditor::Key (this=0x7ffffffd1068, key=69206102, count=1) at Assist.cpp:1073
#16 0x0000000000d6d282 in Upp::Ctrl::DispatchKey (keycode=69206102, count=1) at CtrlKbd.cpp:101
#17 0x0000000000d84292 in Upp::Ctrl::Proc (this=0x7ffffffcfca0) at GtkEvent.cpp:690
#18 0x0000000000d84bcf in Upp::Ctrl::ProcessEvent0 (quit=0x0, fetch=true) at GtkEvent.cpp:766
#19 0x0000000000d84d15 in Upp::Ctrl::ProcessEvents0 (quit=0x0, fetch=true) at GtkEvent.cpp:793
#20 0x0000000000d5234f in Upp::Ctrl::ProcessEvents (quit=0x0) at GtkEvent.cpp:810
#21 0x0000000000d720d4 in Upp::Ctrl::EventLoop (ctrl=0x7ffffffcfca0) at GtkEvent.cpp:844
#22 0x0000000000d7606c in Upp::TopWindow::Run (this=0x7ffffffcfca0, appmodal=false) at TopWindow.cpp:323
#23 0x00000000004e62c3 in GuiMainFn_ () at main.cpp:436
#24 0x00000000009346ec in Upp::AppExecute__ (app=0x4e4c30 <GuiMainFn_()>) at App.cpp:479
#25 0x00000000004e4b7d in main (argc=1, argv=0x7fffffffdae8, envptr=0x7fffffffdaf8) at main.cpp:177
(gdb) continue
Continuing.






^C
Thread 1 "ide" received signal SIGINT, Interrupt.
0x00007ffff632736d in __GI___poll (fds=0x1aa4c80, nfds=3, timeout=20) at ../sysdeps/unix/sysv/linux/poll.c:29
29        return SYSCALL_CANCEL (poll, fds, nfds, timeout);
(gdb) bt
#0  0x00007ffff632736d in __GI___poll (fds=0x1aa4c80, nfds=3, timeout=20) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6db2629 in g_main_context_poll (priority=<optimized out>, n_fds=3, fds=0x1aa4c80, timeout=<optimized out>, context=0x1ac5e20) at ../glib/gmain.c:4584
#2  g_main_context_iterate.isra.0 (context=0x1ac5e20, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4271
#3  0x00007ffff6d53aff in g_main_loop_run (loop=0x1f58ee0) at ../glib/gmain.c:4479
#4  0x00007ffff779dc8e in gtk_clipboard_wait_for_contents (clipboard=clipboard@entry=0x1fc15d0, target=0x8b) at ../gtk/gtkclipboard.c:1436
#5  0x00007ffff77a0038 in gtk_clipboard_wait_is_text_available (clipboard=0x1fc15d0) at ../gtk/gtkclipboard.c:1720
#6  0x0000000000d86992 in Upp::Ctrl::Gclipboard::IsAvailable (this=0x19f7278 <Upp::Ctrl::gclipboard()::c>, fmt=...) at GtkClip.cpp:133
#7  0x0000000000d87b40 in Upp::IsClipboardAvailableText () at GtkClip.cpp:299
#8  0x00000000004b4695 in Ide::EditorMenu (this=0x7ffffffcfca0, bar=...) at Insert.cpp:333
#9  0x000000000061211a in Upp::callback<Ide, Ide, Upp::Bar&>(Ide*, void (Ide::*)(Upp::Bar&))::{lambda(Upp::Bar&)#1}::operator()(Upp::Bar&) const (this=0x7ffff48b59d0, a1=...) at /home/...../git_trunk/uppsrc/Core/CallbackNP.i:38
#10 0x0000000000612051 in Upp::Function<void (Upp::Bar&)>::Wrapper<Upp::callback<Ide, Ide, Upp::Bar&>(Ide*, void (Ide::*)(Upp::Bar&))::{lambda(Upp::Bar&)#1}>::Execute(Upp::Bar&) (this=0x7ffff48b59c0, args=...)
    at /home/...../git_trunk/uppsrc/Core/Function.h:17
#11 0x0000000000813132 in Upp::Function<void (Upp::Bar&)>::operator()(Upp::Bar&) const (this=0x7ffffffceba0, args=...) at /home/...../git_trunk/uppsrc/Core/Function.h:86
#12 0x000000000073897b in Upp::Bar::Scan(Upp::Function<void (Upp::Bar&)>, unsigned int) (proc=..., key=69206102) at Bar.cpp:525
#13 0x0000000000748913 in Upp::LineEdit::Key (this=0x7ffffffd1068, key=69206102, count=1) at LineEdit.cpp:1258
#14 0x0000000000712e32 in Upp::CodeEditor::Key (this=0x7ffffffd1068, code=69206102, count=1) at CodeEditor.cpp:1274
#15 0x000000000048e7ba in AssistEditor::Key (this=0x7ffffffd1068, key=69206102, count=1) at Assist.cpp:1073
#16 0x0000000000d6d282 in Upp::Ctrl::DispatchKey (keycode=69206102, count=1) at CtrlKbd.cpp:101
#17 0x0000000000d84292 in Upp::Ctrl::Proc (this=0x7ffffffcfca0) at GtkEvent.cpp:690
#18 0x0000000000d84bcf in Upp::Ctrl::ProcessEvent0 (quit=0x0, fetch=true) at GtkEvent.cpp:766
#19 0x0000000000d84d15 in Upp::Ctrl::ProcessEvents0 (quit=0x0, fetch=true) at GtkEvent.cpp:793
#20 0x0000000000d5234f in Upp::Ctrl::ProcessEvents (quit=0x0) at GtkEvent.cpp:810
#21 0x0000000000d720d4 in Upp::Ctrl::EventLoop (ctrl=0x7ffffffcfca0) at GtkEvent.cpp:844
#22 0x0000000000d7606c in Upp::TopWindow::Run (this=0x7ffffffcfca0, appmodal=false) at TopWindow.cpp:323
#23 0x00000000004e62c3 in GuiMainFn_ () at main.cpp:436
#24 0x00000000009346ec in Upp::AppExecute__ (app=0x4e4c30 <GuiMainFn_()>) at App.cpp:479
#25 0x00000000004e4b7d in main (argc=1, argv=0x7fffffffdae8, envptr=0x7fffffffdaf8) at main.cpp:177
(gdb) exit
A debugging session is active.


[Updated on: Sat, 14 December 2024 10:28]

Report message to a moderator

Re: TheIDE stuck in infinite loop [message #61234 is a reply to message #61232] Sat, 14 December 2024 14:27 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1094
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Dider,

Thanks for report! Can you provide more information about your setup? I mean OS, U++ version. Desktop Environment, GTK version, Wayland or X11 etc.?

Edit: I found the version number in your message (b99c26b267b2a484ee709024ae0e1e0a1e5e1258). So, this information is no longer needed Smile

Klugier


U++ - one framework to rule them all.

[Updated on: Sat, 14 December 2024 14:33]

Report message to a moderator

Re: TheIDE stuck in infinite loop [message #61242 is a reply to message #61231] Sat, 14 December 2024 18:43 Go to previous messageGo to next message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 226
Registered: June 2011
Experienced Member
Didier,

Yes, I think you found it. That looks like the same backtrace I had in gdb. It's entirely possible I mistakenly thought clearing the clipboard externally fixed it when it was simply the timeout being reached at coincidentally the same time, although IIRC I have triggered it also during a copy+paste operation. When I tried to paste the contents externally to see what was in there the buffer appeared to be empty. Maybe it had something bad in there?

But mainly what I don't understand is why you could be trying to just type things normally, no special characters or commands and it's checking the clipboard. Is TheIDE doing this after every key event? There may be a good reason for this, but I can't think of one.

[Updated on: Sat, 14 December 2024 19:15]

Report message to a moderator

Re: TheIDE stuck in infinite loop [message #61256 is a reply to message #61242] Mon, 16 December 2024 19:25 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 705
Registered: November 2008
Location: France
Contributor
Hello Klugier and Jackson,

I'm under Fedora 38 with KDE (not very recent though, I've been pushing back the upgrade for some time now Smile )
Linux fedora 6.8.9-100.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 18:50:49 UTC 2024 x86_64 GNU/Linux

For the rest, I think you can find everything you wan't here


Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12
Kernel Version: 6.8.9-100.fc38.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 2700 Eight-Core Processor
Memory: 15.6 Gio of RAM
Graphics Processor: AMD Radeon RX 580 Series
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: X570 UD



XDG_CURRENT_DESKTOP=KDE
KONSOLE_DBUS_SERVICE=:1.104
WAYLAND_DISPLAY=wayland-0
KONSOLE_DBUS_SESSION=/Sessions/1
PROFILEHOME=
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
KONSOLE_VERSION=230805
IMSETTINGS_MODULE=none
XKB_DEFAULT_LAYOUT=fr
XDG_ACTIVATION_TOKEN=kwin-2
QT_WAYLAND_DECORATION=adwaita
XDG_SESSION_CLASS=user
TERM=xterm-256color
COLORFGBG=15;0
PLASMA_USE_QT_SCALING=1
KDE_SESSION_VERSION=5
QT_WAYLAND_FORCE_DPI=96
DISPLAY=:1
XDG_VTNR=1
XDG_SESSION_ID=2
XKB_DEFAULT_VARIANT=oss
QT_AUTO_SCREEN_SCALE_FACTOR=0
XCURSOR_THEME=breeze_cursors
KDE_FULL_SESSION=true
KDE_APPLICATIONS_AS_SCOPE=1


[Updated on: Mon, 16 December 2024 19:28]

Report message to a moderator

Re: TheIDE stuck in infinite loop [message #61257 is a reply to message #61242] Mon, 16 December 2024 20:29 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 705
Registered: November 2008
Location: France
Contributor
jjacksonRIAB wrote on Sat, 14 December 2024 18:43
Didier,

Yes, I think you found it. That looks like the same backtrace I had in gdb. It's entirely possible I mistakenly thought clearing the clipboard externally fixed it when it was simply the timeout being reached at coincidentally the same time, although IIRC I have triggered it also during a copy+paste operation. When I tried to paste the contents externally to see what was in there the buffer appeared to be empty. Maybe it had something bad in there?

But mainly what I don't understand is why you could be trying to just type things normally, no special characters or commands and it's checking the clipboard. Is TheIDE doing this after every key event? There may be a good reason for this, but I can't think of one.


I'm gonna lookup the 'key' value : since 'InsertChar(key, count, true)' doesn't react as expected, I suppose it's due to the valey of 'key'.

Context: I was trying to type " virtual void Skin(..."
'v' ==> 0x76
'V' ==> 0x56
'tab' ==> 0x09

The 'key' values cought from the backtrace:
67108873 => 0x0400 0009 looks like 'tab'
69206102 => 0x0420 0056 looks like 'V'

So I guess the problem will comme from the 0x0400 0000
The only thing that I can find that is close to it is:
CtrlCoreFlags::K_KEYUP = 0x4000000


Looking at 'InsertChar(...)' the constants used have the following value on may Linux.
K_CHAR_LIM = 0x0200 000
K_ENTER = 0x0d
K_SHIFT_SPACE = 0x0080 0020

So with the 'key' values from backtrace

                               0xXXX      1       true
bool LineEdit::InsertChar(dword key, int count, bool canow) {
	if(key == K_TAB && !processtab)    **** TEST IS FALSE ****
		return false;
	if(filter && key >= 32 && key < K_CHAR_LIM)   **** TEST IS FALSE ****
		key = (*filter)(key);
	if(!IsReadOnly() && (key >= 32 && key < K_CHAR_LIM || key == '\t' || key == '\n' ||
	   key == K_ENTER && processenter || key == K_SHIFT_SPACE))      **** TEST IS FALSE ****
       {
		if(key >= 128 && key < K_CHAR_LIM && (charset != CHARSET_UTF8 && charset != CHARSET_UTF8_BOM)
		   && FromUnicode((wchar)key, charset) == DEFAULTCHAR)
			return true;
		if(!RemoveSelection() && overwrite && key != '\n' && key != K_ENTER && canow) {
			int64 q = cursor;
			int i = GetLinePos64(q);
			if(q + count - 1 < GetLineLength(i))
				Remove((int)cursor, (int)count);
		}
		WString text(key == K_ENTER ? '\n' : key == K_SHIFT_SPACE ? ' ' : key, count);
		Insert((int)cursor, text, true);
		PlaceCaret(cursor + count);
		Action();
		return true;
	}
	return false;    **** Exit comes from here ****
}


The origin of the problem is definitly the 0x4000000 bit set in the value

Looking at the void Ctrl::Proc() in GtkEvent.cpp ==> CtrlCoreFlags::K_KEYUP is definitly used

I thoink the 0x0400 0000 value comes from the line :
DispatchKey(!pressed * K_KEYUP + kv, CurrentEvent.count);

==> Keyboard is malfunctionning : key returns up before being completly processed ??
Note: I do have a brand new Dell wireless keyboard ==> Is this it : a keyboard problem (or kbd driver problem)????



[Updated on: Mon, 16 December 2024 20:49]

Report message to a moderator

Re: TheIDE stuck in infinite loop [message #61258 is a reply to message #61257] Mon, 16 December 2024 21:31 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1094
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Dider,

It might be a problem with the keyboard, but also it might be a problem with the Wayland. From my experience the KDE Wayland implementation with U++ is usable in 6.2. Previous version are bug and they have terrible bug with X11 apps on Wayland. It causes application freezes on window resizing. What is worst is in such case even app restart doesn't help, so I definitely suggest using 6.2 and above.

Also, Wayland for KDE 5.x is experimental. The true Wayland implementation is targeted for version 6 and above. So for 5.x branch I definitely recommend using X11.

Klugier


U++ - one framework to rule them all.
Re: TheIDE stuck in infinite loop [message #61259 is a reply to message #61258] Mon, 16 December 2024 23:21 Go to previous message
Didier is currently offline  Didier
Messages: 705
Registered: November 2008
Location: France
Contributor
Thank you Klugier,

I guess I now have an obligation to upgrade my linux

Previous Topic: Compilation warnings and random crashes
Next Topic: Help & Topics (in window) dark mode toolbar icon
Goto Forum:
  


Current Time: Mon Jan 13 21:37:43 CET 2025

Total time taken to generate the page: 0.02049 seconds