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
New Developer
pleasereset
Posts: 8
Registered: ‎07-23-2013
My Carrier: Sosh (FR)
Accepted Solution

Adding an ArrayDataModel to a class causes SIGABRT

Hello,

 

I am currently stuck trying to use an ArrayDataModel in my project, declaring one in my project cause SIGABRT to be triggered when app starts :

 

lass MainPageContext : public QObject {
	Q_OBJECT
	Q_PROPERTY(bool isLoading READ isLoading NOTIFY isLoadingChanged)

public:
	MainPageContext();
	virtual ~MainPageContext();

	// Accessors
	bool isLoading() const { return m_IsLoading; }

	Q_INVOKABLE void initialize();

signals:
	void isLoadingChanged(bool);

private:
	bool m_IsLoading;

	// List data adapters
	bb::cascades::ArrayDataModel m_EpgNow;

	void setIsLoading(bool value);

private slots:
    void onDataManagerInitialized();
    void onProgramNowDownloaded(ServerResponse<ProgramGuideResult&> response);
};

#endif /* MAINPAGECONTEXT_H_ */

 

If I remove the statement :

bb::cascades::ArrayDataModel m_EpgNow;

the app will run fine.

 

When crashing the stacktrace is : 

  • SignalKill() at 0x1602314
  • raise() at 0x15F2808
  • _malloc_panic_str() at 0x15ED358
  • _band_get_aligned() at 0x15EB92C
  • 0x15F01D0

 

Please use plain text.
Developer
Zmey
Posts: 1,494
Registered: ‎12-18-2012

Re: Adding an ArrayDataModel to a class causes SIGABRT

Hi,
Try creating the model dynamically (using operator new).

Andrey Fidrya, @zmeyc on twitter
Please use plain text.
New Developer
pleasereset
Posts: 8
Registered: ‎07-23-2013
My Carrier: Sosh (FR)

Re: Adding an ArrayDataModel to a class causes SIGABRT

It works, but shouldn't I be able to create one instance statically as well ?

Please use plain text.