You Are Here:

Community: Developer Discussion Boards

#1 Old Extension module with OpenC++ crashes shell on import - 2009-04-29, 17:51

Join Date: Dec 2008
Posts: 3
pseegers
Offline
Registered User
I'm trying to create a Python extension module to wrap some standard (non-Symbian) C++ classes that I have. Working from the Noddy example in the documentation I was able to create a module (called generic) with a Python type (called Project) that has a couple of members on it and run it on my E71. From there I added a simple C++ class to the extension module build but did not use the class at all within the extension code. The class looks like:

Code:
#ifndef PROJECT_H_
#define PROJECT_H_

#include <string>

namespace Generic
{
namespace Domain
{

class Project
{
public:
	Project( std::string projectName, std::string projectDescription );
	virtual ~Project();
	
	std::string getProjectName(); // { return projectName; }
	std::string getProjectDescription(); // { return projectDescription; }
	
private:
	std::string projectName;
	std::string projectDescription;
};

}
}
#endif /* PROJECT_H_ */
After this change, when I import the module the Python shell simply disappears (crash with no messages) as soon as I hit return on the import statement in the shell.

If I remove the virtual destructor (in the project class above) and rebuild I am again able to load the module on my E71. It turns out that if I add any virtual function (it isn't particular to the destructor) to the C++ Project class the module will crash the Python shell on import on the device.

Does anyone have any idea what's causing this? I've been unable to find any clues either on this forum or Googling.

I'm using PyS60 1.9.4 with Carbide C++ 2.0 and have a complete example Carbide project available for anyone who is interested in trying this ... I wasn't sure where to post the code. I got the same behavior from PyS60 1.9.2 as well.

Thanks for your help.

Pete
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
No Class Def Found Error itg2 Mobile Java General 6 2009-07-13 19:57
Can't read RFID Tag with NFC Shell begermic Mobile Java Tools & SDKs 5 2007-02-01 00:02
DemoDMServer SMS problem kudelasz OMA DM/DS/CP 17 2006-05-22 10:16
SocketConnection Work on 6600&Emulators BUT NOT IN 6680 eerant Mobile Java Networking & Messaging & Security 4 2006-03-11 01:35
ihooks causes Python to crash? terosaarni Python 0 2005-05-01 12:35

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia