Summary: | class method modify bug (crash) | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Dennis Noordsij <dennis.noordsij> |
Component: | kdevelop 2.x (obsolete) | Assignee: | KDevelop-Devel List <kdevelop-devel> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 2.0.1 | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Dennis Noordsij
2001-11-11 01:14:39 UTC
Version: 2.0.1 (using KDE 2.2.1 ) Installed from: Mandrake Linux Vitamin Compiler: gcc version 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk) OS: Linux (i686) release 2.4.8-26mdk OS/Compiler notes: I have a project in which I just created a new class added some include files and started coding the constructor but if I now try to right-click modify the class in the class editor in any way I get a segfault. The difference from bug 34763 is that the .h and .cpp files have consistant definitions. Here is the .h file excluding comments... #ifndef SOCKETCON_H #define SOCKETCON_H #include <socketcon.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> /**This is for talking to the Parallel Port drive. *@author Simon Blandford */ class SocketCon : public SocketCon { public: SocketCon(); ~SocketCon(); }; #endif ...and here is the corresponding .cpp file... #include "socketcon.h" #include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> //int sockfd; //int len; //sockaddr_un address; SocketCon::SocketCon(){ if ((sockfd = socket(AF_UNIX SOCK_STREAM 0)) < 0) { perror("Unable to open socket."); exit(1); } address.sun_family = AF_UNIX; strcpy(address.sun_path "/tmp/par_port"); len = sizeof(address); if ((connect(sockfd (sockaddr*)&address len)) < 0) { perror("Unable to connect to pport driver."); exit(1); } } SocketCon::~SocketCon(){ close(sockfd); } It looks a bit crude because it is under construction and I am quite new to c++ ;-) I have zipped up the whole project (~450Kb) if anyone needs it. (Submitted via bugs.kde.org) (Called from KBugReport dialog) Futher to the bug report I have made a new discovery. If I create a new class and make the Baseclass name the same as the Class name I get a segfault on trying to change it's properties. If I call the Baseclass something different it works OK. Regards Simon B. |