Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
89 user(s) are online (45 user(s) are browsing Forums)

Members: 0
Guests: 89

more...

Headlines

Forum Index


Board index » All Posts (elfpipe)




Re: SpotLess debugger
Just can't stay away
Just can't stay away


@ktadd

Quote:
Error reading prefs file from disk config.prefs. A new file will be created.".


This is a good point. I didn't realize at the time of writing, that this message would be so confusing. I will definetely rethink it for the next release.

Thanks!

Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@kas1e

I only used the version of clib2 that came with the build of adtools, that I am using.

Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@kas1e

By the way : clib2 version of Spotless performs the same as newlib version. At least here on my platform.

Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@kas1e

Quote:
So the problem is in the c++ copy operations mixing vectors and lists ?


It is not due to the mixing. It is due to the sheer size of the stabs section in the Spotless executable. There are literally tens of thousands of stabs, and because I am doing the lazy ass version of the code inside Spotless, then there will be several copy operations on complicated object hierarchies when doing the gui update.

I could go ahead and implement the lazy interpretation, that I mentioned before. But right now I would really like to fix this MUNGE bug.

Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@kas1e

Quote:
PS. Maybe it worth to try to build spotless with latest afxgroup's clib2 ? Just to see, if issues with copy will be there ?


Please go ahead :).

Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@kas1e

Quote:
Hm, i just tried to run db101 alone, without Spotless, and it runs ok, without crashes. But when i run it inside of spotless (with removed pipe) it still crash.


You misunderstand. It is the child, that crashes, and it happens because the child is opening the pipe. When the child is run outside Spotless, there is no crash. I have done a test, replacing the to Open("PIPE:") with Open("dymmy.txt"), and this prevents the crash.

Quote:
I am sure kernel guys will fix it, if we will provide them with minimalistic test case. This one also will help for us to see if issue actually a kernel, on on our side. Because if we will say them "spotless on exit bring issue about Disable!", they will ask for minimal test case, as they will not dig in into spotless to find if it fault of app or of a kernel.


This is difficult, though. I am not sure, I would be able to pinpoint, what stuff needs to be isolated to cause the bug in a minimal setting. I think it is better to use Spotless as the test case and providing debug output from inside a custom kernel.

Quote:
Imho, as in the other case we need to provide a minimalistic test case showing the problem, then it have chances to be fixed. Because if we will say that "CloseElfTags() broken", they will for sure fix nothing :)


Again, it is a complicated case, and maybe the complexity is required for the bug to appear. I think better to use Spotless as a testcase and provide instructions for reproducing the bug.

Quote:
I am thinking firstly about garbled output in variable yes, and then, also non-working stack trace.


The stacktrace works. It has just been disabled in the public version. And there is a crash, yes, but the basic functionality is sound.

Quote:
Are you sure about ? I mean, i didn't see any other amigaos application which when do copy freeze the whole OS and take so much time for copy.


I have browsed the sources again and again, and I see no reason for the stall other than some kind of block on large copy operations from c++ vectors and lists.

Quote:
Sounds bad yeah if we can't put instead of trash something like empty spaces or word "none"..


As I said : This is not possible. The only way to tell, if a variable value is legit is to test, if that memory area is readable. And I am already doing that.

Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@kas1e

1) This is caused by db101 opening the pipe. It is the same issue as in Spotless, only I have not removed the reference to PIPE: inside db101. So it is still that same issue.

2) You are right, this is an issue also. I'm very unsure how to fix this, and I am pretty sure, that someone else would have a better chance of fixing it than me.

3) This is caused be the problem with CloseElfTags().

What other issues are you thinking of? I can only count these three. And then of course the garbled output in the Context pane. But that is for later.

BTW : The "freeze", that you describe in your video is probably due to copying operations inside libstdc++. There is no way, I can fix this.

EDIT : The "garbled output" from Context is actually not so insane. It is merely caused by the fact, that the variables are uninitialized. There is a safety on the memory read operation, so it should not crash. And there is no way to tell, if a variable has been initialized, so the relevant functions will just print whatever values, the particular (uninitialized) variables are pointing to.


Edited by elfpipe on 2022/11/3 15:47:28
Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@kas1e

Quote:
Everything fucked up with strange bugs :) and we don't know what/where/why


You are wrong. I know quite well where to track these problems. One is with elf.library and the other is with the PIPE:. I bet I could solve both of these, if I had code access.

Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@kas1e

Quote:
And to say truth i didn't understand stuff about pipe :) Is it issues inside of spotless, or did you say that if programm with reference to pipe is loaded, then it will not works ? I just didn't understand part about needs to change anything in db101 : db101 works fine as before, and if i remember right i can load db101 inside of db101: it's spotless which bring us such issues for now and which we tried to fix. Or i just dumb enough and not understand all that stuff about pipe ?:)


See this : PIPE: issue on Hyperion Forum

The reference to PIPE: is from within the Pipe class in Spotless. This class is meant to be used to pipe output from the child to the parent. If it worked, then the output of the child would be shown in the Console window inside Spotless. But it doesn't work, due to some issue with buffered io in Newlib.

The reason for the crash : I simply don't know. Only thing I can say is, that if I comment out the line responsible for creating the Pipe class instance, then the problem goes away. And of course : Because this only happens when the application is loaded as a child of another process, then it must be caused by either something with the parent/child relation or by other details in the call to CreateNewProcTags().

By the way : You should revert your elf.library to 53.27. The new one causes total system freeze on all these issues. The only reason, that I can know about the solution (pipe), is because I can see the stacktrace both inside Spotless and inside the GR.


Edited by alfkil on 2022/11/2 18:01:32
Edited by alfkil on 2022/11/2 19:01:03
Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@kas1e

Quote:
Through then big question : why it works for you before when you test the same version as me ? :)


That is a good question! I have to say, that I simply don't know, since I cannot reproduce. Maybe it was just a freak accident or a lucky punch. :)

Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@kas1e

I have done some further testing of the self-loading case.

Spotless inside Spotless : There was an issue with a crash in the Pipe class. If removing reference to Pipe, I can now again load Spotless into Spotless and run it with no problems.

db101 inside Spotless : This seems to also be related to the pipe! I don't have a working repository for the db101 codebase, so I cannot change anything. But I am guessing, that there is some kind of mess with the parent/child relation between the processes, that makes the calls to the queue-handler fail.

So for both : There is a real crash, and they are both related to pipe. If references to pipe is removed, they should both work again.

Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@Hypex

Thanks! I will save this and take a closer look, once I get the more pressing issues out of the way.

Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@kas1e

Damn. It doesn't work now. It worked yesterday, but I must have done some changes that breaks it. Oh well, further investigations!

Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@kas1e

Quote:
Ok, let forget Spotless. Take an db101 from os4depot, it have -gstabs inside. Then load it inside of spotless : the same freeze ! But it just 1megabyte binary ! And you can't the same run it !


See, that's the funny thing : It works completely here!

I think there might be something wrong with some of the beta versions of intuition items (gadget classes etc.). When I do these tests here, they work. And I am not so sure how to fix it, when I cannot reproduce the behavior on my own system.

Maybe you have the option of starting up a system partition with plain Final Edition CD version? It could be nice to see, if we can pinpoint the version of the system, where this problem starts. Remember to update only the kernel on this system, if you have it.

Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@nbache

Thanks, Niels! I knew, I could count on you. :) I have just changed the character to (c) for the time being.

Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@kas1e

Quote:
I made a video to show the problem:

https://youtu.be/iwc5LnNyIBo


I see what you mean. This behavior is caused by the fact, that running through the entire list of source files is a heavy operation. Spotless needs to go into all the subitems of type N_SOL, which is a nested item type, and it needs to check for dublicates all the way though. Otherwise it would be insanely confusing to the user to have the same include files mentioned more than once. So with large binaries, it will take a lot of time and horsepower, and there is no real way around it.

The only thing, I can do, is to implement the "lazy load" functionality, that we actually had in db101. But remember, in db101 you were not able to access include files in the main code browser. This means, that even with "lazy load", there would still be a lot of overhead. And it is a bit more tricky to do with the current implementation, so I am going to save it for a time, where I have lots of time and confidence. For now, please live with the fact, that everything works as it should, even if it seems a bit "tough" with the heavy overload on this operation.

Also, I am not able to do a progress bar on the gui update, since it is a singular memory operation.

Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@kas1e

Quote:
if i start spotless from the shell, load up test binary, hit breakpoint, hit start, hit again start to finish it up, and then close the spotless, i have in the shell:

***Command 'spotless' returned with hanging Disable!


This is a kernel issue. It should be fixed. Are you sure, your kernel is the latest beta?

About issues with loading and running Spotless inside Spotless : There must be some random issue responsible for the working on my side but not on yours. My best guess is - you guessed it - searching for leaks in reads from unknown memory territory. I have asked for help, and also the coming days I will brush over the code. Hope we can solve this. It is pretty cool to have a self-debugging debugger. :)

Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@samo79

Quote:
- Uniconify generate a debug output, maybe need to be removed


Noted.

Quote:
- In about window there is a glitch in the copyright symbol


I *know* about this, and the only solution I have found is to transfer the sourcefile to the Amiga, open it in notepad, delete the stray character and retransfer to the pc. I have done this before, but I always end up having to modify something and reverting the change.

Is there maybe a mistake in the character set on the Amiga side?

Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@kas1e

Quote:
At least will be good to have no garbage in variable, or maybe dunno, somehting like "unimplemented" words ?:) I just fear while there garbage, it mean trashing of memory.


I will take a look at it at some point.

Quote:
First one:

-- run spotless
-- hit rmb, choiise "Swith to public screen".
-- hit iconify gadget. It will iconify to the WB screen
-- swith by any way to workbenh screen (drag the spotless screen down, or hit gadget on spotless screen to back to the wb one)
-- hit on spotless window => crash.

Crash in Widget.cpp:165

I think that crash i have once on exit was related to that public-screen functionality as well. Maybe that just one single issue.


I think, I caught this one. Please test again, when I post the next release.

Quote:
-- when you iconify, the icon on the wb not of spotless, but default one. If i remember right it's about just additional option provide when do iconify.


I am only going to do this, when I have loots of time. I think, we will survive :).

Quote:
-- when we tried to load Spotless binary inside of the Spotless, then progress bar going on fast (but while it happens, mouse is sluggish, 100% cpu loading). Then, everthing just stops/halts, and only after a few seconds (3-4) it refreshes and things show ups in Spotless. Imho if we can't speed things up for now there, will be worth to show progress bar finished only when evertyhing visibly on screen. Or, at least after progress bar finished, shoup a "busy mouse cursor" so we know it not freeze (but at this point, you can't move anything, it just like freeze, strange..).

Then after all loads, i hit the start and spotless didn't starts inside of spotles. Tried few times. When exit from main spotless, intuition seems to be messed up and trashed (so reboot need it).


I can load and run Spotless inside itself just fine. I am not sure, if I changed anything, so if you could retest at the next release?

Quote:
Through i have one suggestion for : rename "configure" item to something like "add additional source directories" or something of that sort, so GUI will be self-explained.


This is a conscious choice. I want to keep the window with that name for enabling more configuration options. I don't want each option in their own window. For now, you can read the caption "Source roots:" in the bevel box title inside the window.

Quote:
Another suggestion for GUI, is to open "memory surfer" a bit bigger. Now it just as small as possible, but imho worth to open it by default so to be as big as it needs to fit whole horizontal information. Or do it like in some of our projects : gadge on bottom right together with iconify, where we can choose snapshot/unspanshot .. But maybe that will for now overcomplicate the things, and maybe just open it a little bit bigger will be fine for now.


This is actually difficult to do. Because I am keeping the ReAction classes as "slim" as possible, there are no real options to save positions and select placement/size. The question is, how much you yearn for this, because it is of course possible, but would add a lot of code with possible clutter and added maintenance.

Quote:
-- when you switch public screen (so to have spotless on it's own screen), and load a some test in it, then it it runs on workbench screen, and not on the Spotless one. I.e. if we have in test case printf("aaaaa\n"); then when we on the spotless screen, this "aaaa" window opens on the workbench screen. While, imho, should be on spotless screen (as this is the default screen now, when we swith to it).


This is also a "minimalist" issue. I simply don't code for anyting, and showing the console window on Workbench is default behavior. In fact I don't know at all how I could possibly move the default console to another public screen! Suggestions??

Go to top


Re: SpotLess debugger
Just can't stay away
Just can't stay away


@kas1e

Quote:
Another issue which i see right now, is that once i set breakpoint, hit start, and switch to variables, then while it works, it give me some garbage of 4 bytes under each entry in myTT: and in dup_prot_seletor doo. I.e. parts with values or addressses (like missing null termination or so).


I really need to tidy up the context writeout. I know about this, but I have been reluctant to take a closer look, because it is really complicated and quite confusing. As long as the application works without crashes, I am tending to think, that it matters less with the variables writeouts. But indeed, I need to take a look on this somewhere along the line.

Quote:
Next issue the same when i hit breakpoint and hit start : swith to stacktrace : none. But this functionality surely works (in the profiler tool author get it correctly for sure).


Forgot to check this. Sorry! It is the first item on my todo list.

In general : I am really happy, that you feel this is the optimal version. I was quite confident, when I uploaded it, and I think sticking to this for a while is definitely the way to go. I want more tests, and I want to confirm, that this version is actually usable. All the previous versions can basically be scrapped, as they all had strange problems and issues. This one should have strong performance and actually have a chance of helping developers.

Go to top



TopTop
« 1 2 3 4 (5) 6 7 8 ... 74 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project