aMule Forum
English => en_Bugs => Topic started by: codewarrior2 on July 14, 2004, 08:56:29 PM
-
Okly Dokly, first the backtrace:
--== BACKTRACE FOLLOWS: ==--
- ./amule(_ZN9CamuleApp16OnFatalExceptionEv+0x42) [0x825c942]
[1] /usr/lib/libwx_gtk-2.4.so(wxFatalSignalHandler+0x2d)
[0x403ac1ad]
[2] /lib/libpthread.so.0 [0x41263d5d]
[3] [0xffffe420]
[4] ./amule(_ZN16completingThread5EntryEv+0xd2) [0x81ea7a2]
[5]/usr/lib/libwx_gtk-2.4.so(_ZN16wxThreadInternal12PthreadStartEP8wxThread+0x176) [0x403a7c36]
[6] /usr/lib/libwx_gtk-2.4.so(wxPthreadStart+0x1f) [0x403a7aaf]
[7] /lib/libpthread.so.0 [0x4125edfb]
[8] /lib/libc.so.6(__clone+0x5a) [0x410c401a]
Killed
I would like to get a more detailed backtrace but its being killed by something so I cannot. Anyways, this backtrace seems to indicate an error in the general area of the CompletingThread() threads in PartFile.cpp.
1. Firstly, I think there should be a destructor possibly, although this is the issue that I am least certain about. Reason for my logic behind this is that libc is complaining about a __clone thread, and the reason might possibly be that it is expecting the thread to take care of itself and when it doesn't it calls it a clone and kills it.
2. Secondly, I think that there is some inconsitency between the fact that the Entry() completing thread returning the wxThread::ExitCode, I think that that would much more effectively in the OnExit() function instead, seems to be more logically placed there based on its name, however again, I don't know enough to say anything about this one way or the other.
3. Thirdly, the calls to wxASSERT IMO are just asking for trouble. From the research I've done, calling wxASSERT things from a thread context is just a bad idea, as sometimes it will try to open a dialog and such and yadda yadda, just bad I think. Seems to be non-essential, again I don't have the experience with this code to know but if its non-essential I think it should be gone, if for nothing else, simplicity's sake, and in-turn speed. For a reference as to the wxASSERT and a small explaination as to why it might be a problem in the threading context, check out http://lists.wxwidgets.org/archive/wx-users/msg34711.html
4. Fourthly, I can't seem to make head-or-tails of where the chain of control is going in the CompletingThread() area, which seems to be a bad indication to me. Granted, making a single-thread multi-thread by default will add additional complexity, but it seems to be a bit over the top here as I can't seem to figure out where its going with the threads, and what happens when it gets there. If a dev could explain this to me, it would be very very very appreciated.
5. Fifthly, Congratulations for making it through this essay. I have presented a few of my opinions on how to better amule here, take them as you will, and I'd like to hear feedback, explanations as to why something is right or wrong, all of it. Flaming is ok too(As long as im not breaking some forum rules that is :) ), and as long as it has some mild relation to the topic as opposed to "You suck you are n00b I be l337" things.
Well, had some fun checking this stuff out, and most of all, I'd like to learn what you think. If you are/are not a dev, doesn't matter, I'd still like to hear it, It'll help me understand the project a bit better and its goals/accomplishments.
--Codewarrior--
-
We came to the conclusion on IRC that the CXXFLAGS used by codewarrior2 were a likely culprit. Hopefully more information will be posted once the codewarrior2 has gotten around to recompiling his system with some reasonable CXXFLAGS.
-
Bug has been found.
If you load aMule and then remove the all tab, and then try to download a file, it WILL crash, giving you a backtrace somewhat like what I posted.
If you download one file succesfully, and THEN remove the all tab, the next file you try to download will hang at 0 sources. If you leave the all tab however, you shouldn't get this bug, but I'm looking into it a bit more, and Kry has been told of the bug as well and I think has a fix ready.
-
Bah, you and your explanations ... I still blame your CXXFLAGS :P
-
it's fixed on CVS.