[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] EXTERNAL: Re: Pbuf Assert

From: Greenwood, Gregory A.
Subject: Re: [lwip-users] EXTERNAL: Re: Pbuf Assert
Date: Thu, 27 Sep 2018 19:21:23 +0000

I have stopped the problem but I am not sure of the root cause.  It does not seem to have anything to do with LWIP itself.  I was using a utility feature supplied by STM that prints debug messages to the LCD screen on the evaluation board.  When I reduced the number of messages and text length, the Assert stopped occurring.


From: Patrick Klos <address@hidden>
Sent: Thursday, September 27, 2018 5:23 AM
To: address@hidden
Cc: Greenwood, Gregory A. [US-US] <address@hidden>
Subject: EXTERNAL: Re: [lwip-users] Pbuf Assert


On 9/26/2018 9:53 PM, Greenwood, Gregory A. wrote:

I cannot figure out why I am getting an Assert in pbuf.c at line 747:

    LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0);

I know the obvious answer, in the p->ref cannot be 0.

The problem is that I cannot tell what would cause p->ref to be 0.

And this is occurring in a while loop that depends on p != NULL.

I am using the LWIP that comes from CubeMX for STM32H7.

LWIP version 2.0.3.

Until someone with better information responds, let me venture a guess for you:

I think that ASSERT implies the pbuf has been dereferenced (freed) more than it has been referenced.  Check that you're not freeing the pbuf more than once.

Patrick Klos
Klos Technologies, Inc.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]