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...
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.
Quoting Ralf Stephan <ralf@...>:
> So I'm aware of that, but what can I do if no one gives me a
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...