aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: instance of 'std::bad_alloc  (Read 5227 times)

Antonello

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
instance of 'std::bad_alloc
« 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.
Logged

Antonello

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Re: instance of 'std::bad_alloc
« Reply #1 on: September 21, 2010, 09:23:01 PM »

i use Ubuntu 10.04
kernel 2.6.32-24
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: instance of 'std::bad_alloc
« Reply #2 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.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

Antonello

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Re: instance of 'std::bad_alloc
« Reply #3 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
Logged

lfroen

  • Guest
Re: instance of 'std::bad_alloc
« Reply #4 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.
Logged

^marcell^

  • Developer
  • Hero Member
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 524
Re: instance of 'std::bad_alloc
« Reply #5 on: September 22, 2010, 12:58:52 PM »

Could also be fauilty RAM unit.
Logged

lfroen

  • Guest
Re: instance of 'std::bad_alloc
« Reply #6 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.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: instance of 'std::bad_alloc
« Reply #7 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?

Logged

lfroen

  • Guest
Re: instance of 'std::bad_alloc
« Reply #8 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[].
Logged

Antonello

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Re: instance of 'std::bad_alloc
« Reply #9 on: September 23, 2010, 05:18:33 PM »

hi
@Kry:: No I use aMule 2.2.6 and Gnome 2.30.2
Logged