Re: [Inkscape-cvs] SF.net SVN Commit: inkscape: [10939] including typecheck trying to prevent #1432680
http://svn.sourceforge.net/viewcvs.cgi/inkscape/inkscape/trunk/src/ui/dialog...
Hmm, I don't think that typecheck is the best way to address the bug. It's just papering over the real problem...
If the problem is that you're sometimes getting a (non-NULL) garbage pointer in dlgPtr, that has to be fixed upstream. It's probably a source of other bugs too.
Besides, a typecheck here would only catch a garbage pointer most of the time. Occasionally, the arbitrary data being pointed to will have the right bit pattern...
-mental
Hello!
Mental!
<knocking sound />
I wrote "trying to prevent".
So I'm aware of that, but what can I do if no one gives me a backtrace?
May I suggest implementing the creation of core files asap?
I'm fed up with stale and nonsensical bug reports.
ralf
Quoting Ralf Stephan <ralf@...748...>:
So I'm aware of that, but what can I do if no one gives me a backtrace?
Find the various places in the code that can call the affected function and sanity-check them, working upwards in the call tree. rgrep helps here. It's what the rest of us do.
May I suggest implementing the creation of core files asap?
As long as Inkscape calls abort() or the appropriate default handler to exit, a core file will be created if the operating system is appropriately configured (and supports core files).
The problem is that these days it often isn't -- e.g. Windows, and some distros which turn off core files by default using ulimit. There's nothing we can do about that ourselves.
I'm fed up with stale and nonsensical bug reports.
I understand that you're frustrated, but comitting nonsensical changes without thinking isn't the answer.
I just looked at the code more carefully. typeid() doesn't dereference pointers, so the typeid(dlgPtr) and typeid(example) will never have the same type (void * versus Dialog *). This effectively disables hiding and showing dialogs completely.
On the other hand, it's fortunate that typeid(example) doesn't dereference pointers, since example is uninitialized...
-mental
FWIW, I've amended the workaround in SVN, keeping the null pointer check but removing the RTTI stuff. It now uses g_return_if_fail so failure isn't totally silent.
-mental
I apologize for the bad commit and the rudeness. This is indeed a good time for a break.
ralf
On Sat, 2006-02-25 at 15:37 +0100, Ralf Stephan wrote:
I apologize for the bad commit and the rudeness. This is indeed a good time for a break.
Apology accepted. :)
A break wouldn't hurt; I don't want to see you burn out on us.
-mental
participants (3)
-
unknown@example.com
-
MenTaLguY
-
Ralf Stephan