473,749 Members | 2,402 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

this pointer getting screwed

hi,

I've got a pthreaded app, which seg faults. Taking a look at the
stack in gdb
I notice the "this" pointer gets nulled in the stackframe where the
seg fault occurs. Say its in an object, this really messes up things,
since trying to
access member variables will cause some big problems.

What could cause the this pointer to get screwed up like that?

TIA
Jul 19 '05 #1
1 1419
"Steven Wong" <gn*******@yaho o.com> wrote in message
news:a7******** *************** ***@posting.goo gle.com...
hi,

I've got a pthreaded app, which seg faults. Taking a look at the
stack in gdb
I notice the "this" pointer gets nulled in the stackframe where the
seg fault occurs. Say its in an object, this really messes up things,
since trying to
access member variables will cause some big problems.

What could cause the this pointer to get screwed up like that?

You probably invoked a member function using a null-pointer. Check the
code that calls your function.

hth
--
jb

(replace y with x if you want to reply by e-mail)
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
3464
by: Benjamin Niemann | last post by:
Hello, I've been just investigating IE conditional comments - hiding things from non-IE/Win browsers is easy, but I wanted to know, if it's possible to hide code from IE/Win browsers. I found <!> in the original MSDN documentation, but this is (although it is working) unfortunately non-validating gibberish. So I fooled around trying to find a way to make it valid. And voila: <!--><!><!-->
10
2291
by: quantdev2004 | last post by:
Hi all, I have been deling with this kind of code: class Foo { public: void NonConstMethod() {} };
96
5698
by: Karen Hill | last post by:
SELECT surgeries.*, animals.* FROM surgeries INNER JOIN animals ON .=. AND WHERE ((.=Date()) Or .=Date()); I'm trying to write a query that joins two table together, animals and surgeries where surgeries.id = animals.id and only where the surgery date was date_a or date_b. I'm doing this in Microsoft Access 2000 and am tearing out my hair
90
5174
by: Bret Pehrson | last post by:
This message isn't spam or an advertisement or trolling. I'm considering farming some of my application development to offshore shops (I'm in the US). I have absolutely *no* experience w/ this, and therefore I'm looking for comments, suggestions, etc. on how to go about this w/o getting screwed. My current application development is primarily database-driven apps in C++/C#, so I'm looking for programmers w/ up-to-date skills.
6
3022
by: KWienhold | last post by:
I'm currently working on a project in C# (VS 2003 SP1, .Net 1.1) that utilizes IStream/IStorage COM-Elements. Up to now I have gotten everything to work to my satisfaction, but now I have come across a problem I can't really explain: When deleting an object from an IStorage, the space it used up will not be freed, but rather marked as unused and overwritten the next time you add an object to the storage. This is obviously working as...
3
2966
by: john | last post by:
Hey, I know we use the pointer this to obtain a class object or class member data. I don't follow the reason for example this code. I'am quite confused assingment operator const B &operator=(const B& x){ if (&x != this)
4
1360
by: Equus | last post by:
Hi - sorry! My previous message got screwed up, evidently :-$ I have a weird case of a pointer, passed as an argument to a method, not being assigned to the value it should. My method is like this: bool myClass::myMethod(param a, toBeUpdated* b) {
46
2142
by: Kenny O'Clock | last post by:
This came up in a job interview, what is the output of the program below? I tried to compile and run it myself, but my compiler (lcc-win32) aborts with this errors.... Warning test2.c: 3 old-style function definition for 'main' Warning test2.c: 3 missing prototype for 'main' Warning test2.c: 3 ' Error test2.c: 3 compiler error in d:\lcc\mc71\types.c--assertion failure at line 868 Error c:\test\test2.c 3 Compiler error (trap)....
7
3951
by: * Tong * | last post by:
Hi, I couldn't figure out how to properly type cast in this case: $ cat -n type_cast.c 1 #include <stdio.h> 2 3 typedef unsigned char Byte; 4 typedef signed char Small_Int; 5
0
9389
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9256
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8257
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6801
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6079
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3320
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2794
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2218
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.