Standalone debugger crash? X window error 5.23lts 5.31

Post bugs related to the IDE here
User avatar
Zebuddi123
Enthusiast
Enthusiast
Posts: 796
Joined: Wed Feb 01, 2012 3:30 pm
Location: Nottinghamshire UK
Contact:

Standalone debugger crash? X window error 5.23lts 5.31

Post by Zebuddi123 »

Update: Tried the same code with variable viewer switch off and the code runs fine and no lag on the for loop at all. So the problem is with the variable viewer updating the variable content display with code >=96k string size (crashes) and <96k lag on the for loop.

To Fred and Team. affecting 5.23lts & 5.31

Having done some testing with strace also testing with 5.23lts which gives the same exit_group(1) debugger exit & failure problem, the failure always occurs when stepping past the peeks() and the variable window is trying to display the contents of the variable (s$). As the strace is pointing to an Xwindow manager fault, this is the output i`m getting from strace "BadAlloc (insufficient resources for operation)". Could the " size " of the string trying to be displayed in the variable textgadget be the problem ?.

More tests seems to show that if the string is => 96k then the debugger crashes, below it works but then there is a terrible lag when stepping through the for loop of about 1 second on each step.

Hope this helps.

Update
write(2, "The program 'pbdebugger' received an X Window System error.\nThis probably reflects a bug in the program.\nThe error was 'BadAlloc (insufficient resources for operation)'.\n

(Details: serial 111932 error_code 11 request_code 130 minor_code 5)\n (Note to programmers: normally, X errors are reported asynchronously;\n
that is, you will receive the error a while after causing it.\n To debug your program, run it with the --sync command line\n
option to change this behavior. You can then get a meaningful\n backtrace from your debugger if you break on the gdk_x_error() function.)\n", 582) = 582
exit_group(1) = ?
+++ exited with 1 +++
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
44.63 1.333141 8 175279 117780 recvmsg
29.16 0.871002 7 120427 poll
21.83 0.651946 11 57208 writev
2.57 0.076696 18 4156 nanosleep
1.73 0.051695 12 4158 kill
0.04 0.001146 12 92 write
0.03 0.000924 11 82 stat
0.01 0.000227 12 19 9 read
0.00 0.000021 21 1 restart_syscall
0.00 0.000017 0 39 brk
0.00 0.000000 0 1 open
0.00 0.000000 0 1 close
0.00 0.000000 0 1 fstat
0.00 0.000000 0 1 mmap
0.00 0.000000 0 1 munmap
0.00 0.000000 0 2 1 shmget
0.00 0.000000 0 1 shmat
0.00 0.000000 0 1 shmctl
0.00 0.000000 0 1 shmdt
------ ----------- ----------- --------- --------- ----------------
100.00 2.986815 361471 117790 total
Hi to All just playing with regex and getting standalone debugger crash can anyone please confirm ? PB 5.31 full x64 mint 17 kde x64

when stepping through below code, having filled the s$ with GoScintilla.pbi (as in this example) dragging the slider down in the variable viewer or stepping through the code to line 10 "If nbr" the debugger windows disappear (killed) and purebasic_compilation0.out is left running.

Randomly crashing with different files sometimes scrolling in the variable viewer or stepping fast past line 10, the debugger stutters and lags after line 10 before quietly quitting.

Works fine if run button used.

Zebuddi. :o

Code: Select all

CallDebugger
regex_get_procs.i = CreateRegularExpression(#PB_Any, "(?<=^Procedure).+\)", #PB_RegularExpression_MultiLine)
regex_get_type.i = CreateRegularExpression(#PB_Any, "", #PB_RegularExpression_MultiLine)
Dim t$(0)
If ReadFile(0, "/home/teto/Documents/PBSourceCode/GoScintilla.pbi") ; example large file lots of procs
	*mem=AllocateMemory(Lof(0))
	ReadData(0,*mem,Lof(0))
	s$=PeekS(*mem)
	nbr=ExtractRegularExpression(regex_get_procs, s$, t$())
	If nbr
		For   i=0 To nbr-1
			Debug  Str(i+1)+". "+t$(i)
		Next
	EndIf	
	CloseFile(0)
	FreeMemory(*mem)
	FreeRegularExpression(regex_get_procs)
	FreeRegularExpression(regex_get_type)
EndIf
malleo, caput, bang. Ego, comprehendunt in tempore
Fred
Administrator
Administrator
Posts: 18349
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Standalone debugger crash? X window error 5.23lts 5.31

Post by Fred »

Seems to work here, can anybody else confirm ?
Post Reply