Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Regular Contributor
mohdfarhanakram
Posts: 73
Registered: ‎12-30-2011
My Device: All devices
My Carrier: RIM

error:free malloc object that is not allocated:../../dlist.c:1078

hi every one,

 

when i run my application then i get a message on console

 

free malloc object that is not allocated:../../dlist.c:1078

 


and my application is forced close i dont know what is it please help me.

Thanks

Mohd Farhan
Please use plain text.
Developer
ekke
Posts: 1,503
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: error:free malloc object that is not allocated:../../dlist.c:1078


mohdfarhanakram wrote:

hi every one,

 

when i run my application then i get a message on console

 

free malloc object that is not allocated:../../dlist.c:1078

 


and my application is forced close i dont know what is it please help me.


since today I'm getting

free malloc object that is not allocated:../../dlist.c:1096

 my app is running fine till the end and just before exit() I'm getting this error

have not found out the reason yet

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Developer
simon_hain
Posts: 16,096
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: error:free malloc object that is not allocated:../../dlist.c:1078

we also have the same issue and were unable to resolve it so far.
due to the message i suspect the list implementation to have an issue with cleaning up, maybe the deconstructor is called twice internally.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
ekke
Posts: 1,503
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: error:free malloc object that is not allocated:../../dlist.c:1078


simon_hain wrote:
we also have the same issue and were unable to resolve it so far.
due to the message i suspect the list implementation to have an issue with cleaning up, maybe the deconstructor is called twice internally.

good to hear that I'm not alone

 

in this case it also happens without creating/opening a Page with ListView

it's a NavigationPane

 

perhaps we have to wait for next OS

I have only tried on 10.0.9.xxx SDK from 10.1 Beta IDE

have you tried with Q10 Simulator and 10.10. ?

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Developer
simon_hain
Posts: 16,096
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: error:free malloc object that is not allocated:../../dlist.c:1078

no, i try to avoid simulators wherever i can, guess it must be some history with bb java development :smileyhappy:
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
ekke
Posts: 1,503
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: error:free malloc object that is not allocated:../../dlist.c:1078


simon_hain wrote:
no, i try to avoid simulators wherever i can, guess it must be some history with bb java development :smileyhappy:

same for me ;-)

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Contributor
xtravanta
Posts: 46
Registered: ‎03-25-2011
My Device: Blackberry Z10
My Carrier: KPN

Re: error:free malloc object that is not allocated:../../dlist.c:1078

what i noticed is that when clean my project the message didn't return ( and indeed i think this is a internal error )

Please use plain text.
Developer
ekke
Posts: 1,503
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: error:free malloc object that is not allocated:../../dlist.c:1078


xtravanta wrote:

what i noticed is that when clean my project the message didn't return ( and indeed i think this is a internal error )


already did this

clean project didn't help

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Developer
ekke
Posts: 1,503
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: error:free malloc object that is not allocated:../../dlist.c:1078

just tested with Q10 Simulator running 10.1 OS

 

used same SDK 10.0.9.2372

 

same error happens on 10.1 but exit is fast - no delay noticable

taking a look at the logs:

 

Z10 Device, 10.0.9: .core size 89'812'992

Q10 Simulator, 10.10: .core size only 749'568

 

so I really believe this error is an internal one and I spent my sunday for nothing

aaah no: looking for errors always means learning new things - in this case about the .core files Peter Hansen mentioned in the other thread ;-)

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Developer
Enaud
Posts: 72
Registered: ‎02-08-2013
My Device: z10
My Carrier: rogers

Re: error:free malloc object that is not allocated:../../dlist.c:1078

I just spent the last two hours chasing this error down, here's what the problem was for me:

 

I was using my class definition to allocation my GUI objects, here's a simple example  to illustrate (this probably won't compile):

class app : public QObject
{
   Q_OBJECT
public:
   app();
   ListView list;
   ImageView img;
}

 Then I was adding these objects (list, img) list this:

container->add(&list);
container->add(&img);
class app : public QObject
{
   Q_OBJECT
public:
   app();
   ListView *list;
   ImageView *img;
}
....
list = new ListView();
img = new ImageView();
container->add(list);
container->add(img);

 

 When I'd shutdown the application I'd get the "free malloc object" error message.

 

By switching to definiting object pointers in the class definition and instantiating the objects with the new operator in the code before using the object I managed to avoid the shutdown error messages.

 

I'd love to hear a technical explanation as to why this is happening...

 

I certainly hope this helps avoid some tedius debugging for others.

 

Cheers,

Eric

 

Please use plain text.