app crash if library is not dynamically allocated

Bug #1400276 reported by Roberto Mier Escandon
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Telegram app
Fix Released
High
Roberto Mier Escandon

Bug Description

crash on Api::helpGetConfig() if not using dynamic memory allocation for library object. This has been found when launching console telegram. If in main.cpp a Telegram object is created the library crashes when called helpGetConfig(). This doesn't happens if Telegram is created as a pointer

Revision history for this message
Giulio Collura (gcollura) wrote :

This crash occurs only on the desktop.

Revision history for this message
Giulio Collura (gcollura) wrote :

Resetting .config/com.ubuntu.telegram make the crash occur when requesting an auth, see http://paste.ubuntu.com/9425871/
Thanks,
Giulio

Changed in libqtelegram:
status: New → Confirmed
Revision history for this message
Roberto Mier Escandon (rmescandon) wrote :

Problem is related with OutboundPkt. Looks like if library is created dynamically, not needed to create dynamically the OutboundPkt objects, but both them cannot be statically created. At least one must be dynamic.
As we don't know how the library is going to be used we can do one of these:
- Force to create library dynamically (explained so in lib documentation)
- Refactor all OuboundPkt static allocated memory objects to be created dynamically using a QSharedPointer (this last could be good to avoid memory leaks)

Michał Karnicki (karni)
Changed in libqtelegram:
status: Confirmed → Fix Committed
milestone: none → m15
assignee: nobody → Roberto Mier Escandón  (rmescandon)
importance: Undecided → High
Michał Karnicki (karni)
Changed in libqtelegram:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.