aMule Forum

English => en_Bugs => Topic started by: Antonello on September 21, 2010, 09:18:33 PM

Title: instance of 'std::bad_alloc
Post by: Antonello on September 21, 2010, 09:18:33 PM
Hi
i have this annoying problem. The aMule session lasts about 5-10 minutes then ends
This is the output message that i receive:

Checking if there is an instance already running...
No other instances are running.
ListenSocket: Ok.
HTTP download thread started
Loading temp files from /home/antonello/.aMule/Temp.
Loading PartFile 12 of 12
All PartFiles Loaded.
Adding file /home/antonello/.aMule/Temp/001.part.met to shares
Adding file /home/antonello/.aMule/Temp/002.part.met to shares
Adding file /home/antonello/.aMule/Temp/004.part.met to shares
Adding file /home/antonello/.aMule/Temp/006.part.met to shares
Adding file /home/antonello/.aMule/Temp/009.part.met to shares
Adding file /home/antonello/.aMule/Temp/011.part.met to shares
Adding file /home/antonello/.aMule/Temp/012.part.met to shares
Adding file /home/antonello/.aMule/Temp/015.part.met to shares
Adding file /home/antonello/.aMule/Temp/018.part.met to shares
Adding file /home/antonello/.aMule/Temp/021.part.met to shares
Adding file /home/antonello/.aMule/Temp/023.part.met to shares
Host: amule.sourceforge.net:80
URL: http://amule.sourceforge.net/lastversion
Response: 200 (Error: 0)
Download size: 6
HTTP download thread ended
WARNING! Client UDP-Socket discarded packet due to errors (2) while sending.
WARNING! Client UDP-Socket discarded packet due to errors (2) while sending.
WARNING! Client UDP-Socket discarded packet due to errors (2) while sending.
WARNING! Client UDP-Socket discarded packet due to errors (2) while sending.
WARNING! Client UDP-Socket discarded packet due to errors (2) while sending.
WARNING! Client UDP-Socket discarded packet due to errors (2) while sending.

Terminated after throwing an instance of 'std::bad_alloc'
   what(): std::bad_alloc
* Could not get symbol names for backtrace
   backtrace:

/tmp/tmpvYO9C3: riga 1:  3454 Aborted                 amule
Press ENTER to continue and close this window.

Thanks to all.
Title: Re: instance of 'std::bad_alloc
Post by: Antonello on September 21, 2010, 09:23:01 PM
i use Ubuntu 10.04
kernel 2.6.32-24
Title: Re: instance of 'std::bad_alloc
Post by: Stu Redman on September 21, 2010, 10:42:42 PM
You are running out of memory. How much do you have? Please check if it's aMule or something else that is eating all of it.
Title: Re: instance of 'std::bad_alloc
Post by: Antonello on September 21, 2010, 11:47:58 PM
thanks
i have 2 GB Intel Core 2 Quad CPU Q8400
i always use Boinc client too.
Next time i'll try to use only amule
Title: Re: instance of 'std::bad_alloc
Post by: lfroen on September 22, 2010, 08:04:35 AM
You are running out of memory. How much do you have? Please check if it's aMule or something else that is eating all of it.
On regular PC with paging file the only reason for bad_alloc() is enormously large malloc() request, which hitting 2GB limit of process.
Title: Re: instance of 'std::bad_alloc
Post by: ^marcell^ on September 22, 2010, 12:58:52 PM
Could also be fauilty RAM unit.
Title: Re: instance of 'std::bad_alloc
Post by: lfroen on September 22, 2010, 08:43:47 PM
Could also be fauilty RAM unit.
Uh - probably no. Usually faulty RAM can be reason of random crashes, not "no memory" errors.
Title: Re: instance of 'std::bad_alloc
Post by: Kry on September 23, 2010, 05:21:20 AM
Could either be out of memory or a big, invalid value in something like std::vector. If the kernel didn't complain about OOM, then most probably a call to new, possibly inside a STL container, and it could come from a bug in aMule. We won't know without a backtrace.

Now lfroen, why would you ever think that malloc() throws std::bad_alloc ? That's just silly, unless someone is overloading malloc() on a c++ runtime, which would be a tad insane on their part. Also, the 2gb process limit only applies to 32bits binaries.

Antonello, I see you're italian. You don't happen to be using aMule Adunanza, right?

Title: Re: instance of 'std::bad_alloc
Post by: lfroen on September 23, 2010, 06:18:17 AM
Now lfroen, why would you ever think that malloc() throws std::bad_alloc ?
That was form of speech, not technically accurate assertion.

Also, the 2gb process limit only applies to 32bits binaries.
Correct, which stress my point even more. Technically what happens is that garbage value passed as count to new[].
Title: Re: instance of 'std::bad_alloc
Post by: Antonello on September 23, 2010, 05:18:33 PM
hi
@Kry:: No I use aMule 2.2.6 and Gnome 2.30.2