aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: wxAssertFailure  (Read 3619 times)

isulzer

  • Jr. Member
  • **
  • Karma: 2
  • Offline Offline
  • Posts: 62
wxAssertFailure
« on: March 21, 2008, 08:20:16 AM »

In attachment
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: wxAssertFailure
« Reply #1 on: March 21, 2008, 04:29:27 PM »

Hi isulzer,

What you have got is an assertion. An assertion means that some strange condition has happened. Assertions only happen in debug builds. You should have been presented a screen where you should be able to choose to continue processing.

In your case, here is what happened:
Code: [Select]
case sizeof(uint16):
// We must not allow too long strings to be written,
// as this would allow for a buggy clients to "poison"
// us, by sending ISO8859-1 strings that expand to a
// greater than 16b length when converted as UTF-8.
if (real_length > 0xFFFF) {
wxFAIL_MSG(wxT("String is too long to be saved"));

real_length = std::min<uint32>(real_length, 0xFFFF);
if (eEncode == utf8strOptBOM) {
sLength = real_length - 3;
} else {
sLength = real_length;
}
}

WriteUInt16(real_length);
break;
As you can see, it is no big deal, the string will be truncated and saved and the program can continue.

Assertions are something you have to live with if you compile your program for debug. On release builds, assertions are totally ignored.

Cheers!
Logged

isulzer

  • Jr. Member
  • **
  • Karma: 2
  • Offline Offline
  • Posts: 62
Re: wxAssertFailure
« Reply #2 on: March 25, 2008, 06:38:14 AM »

I did get the screen.
Can you give us a compile flag so that said assertions are automaticaly ignored? Or it doesnt run the wxFAIL_MSG?  Downloads seem to freeze till i hit ok or cancel. If not, I guess ill just not use it with debug.
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: wxAssertFailure
« Reply #3 on: March 25, 2008, 11:29:28 AM »

isulzer: You have to
1) Compile wxWidgets with --disable-debug, or, if you have a precompiled wxWidgets without debug, skip this step.
2) Compile aMule with --without-wxdebug (or by other means selecting the wxWidgets version without debug)
Logged
concordia cum veritate

isulzer

  • Jr. Member
  • **
  • Karma: 2
  • Offline Offline
  • Posts: 62
Re: wxAssertFailure
« Reply #4 on: March 25, 2008, 06:53:42 PM »

Oh. that makes sense actually, now that I think about it. Theres no need to debug wxWidgets... if I want to run aMule in gdb... heh.
Logged