
In the emf print virtual methods the current transform is pulled out with:
Geom::Affine tf = m_tr_stack.top();
Is the stack supposed to hold the final transform, or just the stack of partial transforms?
For instance, for this bug:
https://bugs.launchpad.net/inkscape/+bug/965594
the text SVG has a set of nested transforms, and the top only returns the inner one. The problem can be worked around by ungrouping everything, which seems to replace the serial transformations with a single one for each object. Otherwise it seems the proper action is to multiply down the transform stack to find the final complete transform operation.
It looks like the stack is "fed" by the ::bind method, but that just moves the question out a bit, as that method has a call argument which is itself a transform. (Unfortunately "bind" is a common string in this code, so grep was not very helpful in locating whatever it is that calls the [virtual] ::bind method.)
Thank you,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech

The debugging tips for windows here:
http://wiki.inkscape.org/wiki/index.php/Debugging_Inkscape#Debugging_Tips_fo...
gives this example (extraneous text removed, program output in []):
gdb file inkscape.exe inkscape.dbg run Tekening.svg [ Program received signal SIGSEGV, Segmentation fault. 0x005c94ec in Inkscape::UI::Widget::Scalar::setValue () ] bt [ #0 0x005c94ec in Inkscape::UI::Widget::Scalar::setValue () #1 0x0044fc11 in Inkscape::CanvasXYGrid::readRepr () #2 0x0044de22 in Inkscape::CanvasXYGrid::onReprAttrChanged () ]
except that is NOT what I see on bt. What I see is always something like this:
(gdb) bt #0 0x7c912669 in stricmp () from C:\WINDOWS\system32\ntdll.dll #1 0x7c911649 in ntdll!RtlInitializeHandleTable () from C:\WINDOWS\system32\ntdll.dll #2 0x7c91911f in ntdll!RtlRealPredecessor () from C:\WINDOWS\system32\ntdll.dll #3 0x044bc000 in ?? () #4 0x00016000 in ?? () #5 0x000000f7 in ?? () #6 0x7c912482 in stricmp () from C:\WINDOWS\system32\ntdll.dll #7 0x77c2c3c9 in msvcrt!free () from C:\WINDOWS\system32\msvcrt.dll #8 0x003f0000 in ?? () #9 0x00000000 in ?? () (gdb)
Which is pretty useless. The Tips says that compiling with -g is not required. Is there some magic gdb incantation that must be applied to enable bt to show something useful, specifically, the names of the methods?
Thank you,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech

On 25-4-2012 20:34, mathog wrote:
The debugging tips for windows here:
http://wiki.inkscape.org/wiki/index.php/Debugging_Inkscape#Debugging_Tips_fo...
gives this example (extraneous text removed, program output in []):
gdb file inkscape.exe inkscape.dbg run Tekening.svg [ Program received signal SIGSEGV, Segmentation fault. 0x005c94ec in Inkscape::UI::Widget::Scalar::setValue () ] bt [ #0 0x005c94ec in Inkscape::UI::Widget::Scalar::setValue () #1 0x0044fc11 in Inkscape::CanvasXYGrid::readRepr () #2 0x0044de22 in Inkscape::CanvasXYGrid::onReprAttrChanged () ]
except that is NOT what I see on bt. What I see is always something like this:
(gdb) bt #0 0x7c912669 in stricmp () from C:\WINDOWS\system32\ntdll.dll #1 0x7c911649 in ntdll!RtlInitializeHandleTable () from C:\WINDOWS\system32\ntdll.dll #2 0x7c91911f in ntdll!RtlRealPredecessor () from C:\WINDOWS\system32\ntdll.dll #3 0x044bc000 in ?? () #4 0x00016000 in ?? () #5 0x000000f7 in ?? () #6 0x7c912482 in stricmp () from C:\WINDOWS\system32\ntdll.dll #7 0x77c2c3c9 in msvcrt!free () from C:\WINDOWS\system32\msvcrt.dll #8 0x003f0000 in ?? () #9 0x00000000 in ?? () (gdb)
Which is pretty useless. The Tips says that compiling with -g is not required. Is there some magic gdb incantation that must be applied to enable bt to show something useful, specifically, the names of the methods?
I think your gdb already shows the names of the methods :-) You are seeing the effects of a nasty crash, perhaps in a library somewhere. Perhaps you can 'simulate' a crash e.g. by intentionally dereferencing a NULL pointer, and then look at gdb's backtrace.
I wrote that -g is not required most of the time, although for some things it is still useful to have the extra detail (note that it increases build time a lot!). In any case, it is (in my experience) not needed for function names to show up in gdb. In your case, I think -g will not help.
Ciao, Johan

On 25-Apr-2012 12:01, Johan Engelen wrote:
On 25-4-2012 20:34, mathog wrote:
except that is NOT what I see on bt. What I see is always something like this:
(gdb) bt #0 0x7c912669 in stricmp () from C:\WINDOWS\system32\ntdll.dll #1 0x7c911649 in ntdll!RtlInitializeHandleTable () from C:\WINDOWS\system32\ntdll.dll #2 0x7c91911f in ntdll!RtlRealPredecessor () from C:\WINDOWS\system32\ntdll.dll #3 0x044bc000 in ?? () #4 0x00016000 in ?? () #5 0x000000f7 in ?? () #6 0x7c912482 in stricmp () from C:\WINDOWS\system32\ntdll.dll #7 0x77c2c3c9 in msvcrt!free () from C:\WINDOWS\system32\msvcrt.dll #8 0x003f0000 in ?? () #9 0x00000000 in ?? () (gdb)
I think your gdb already shows the names of the methods :-) You are seeing the effects of a nasty crash, perhaps in a library somewhere.
I rarely see crashes that are not in libraries - they get passed invalid arguments and blow up later. That would be fine if it was at least possible to trace back to whatever handed them the bogus values. In the worst possible case, shouldn't it at least have _one_ inkscape method or function listed in the backtrace, for instance "main" in the lowest position?
Thanks,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech

On 25-4-2012 21:14, mathog wrote:
On 25-Apr-2012 12:01, Johan Engelen wrote:
On 25-4-2012 20:34, mathog wrote:
except that is NOT what I see on bt. What I see is always something like this:
(gdb) bt #0 0x7c912669 in stricmp () from C:\WINDOWS\system32\ntdll.dll #1 0x7c911649 in ntdll!RtlInitializeHandleTable () from C:\WINDOWS\system32\ntdll.dll #2 0x7c91911f in ntdll!RtlRealPredecessor () from C:\WINDOWS\system32\ntdll.dll #3 0x044bc000 in ?? () #4 0x00016000 in ?? () #5 0x000000f7 in ?? () #6 0x7c912482 in stricmp () from C:\WINDOWS\system32\ntdll.dll #7 0x77c2c3c9 in msvcrt!free () from C:\WINDOWS\system32\msvcrt.dll #8 0x003f0000 in ?? () #9 0x00000000 in ?? () (gdb)
I think your gdb already shows the names of the methods :-) You are seeing the effects of a nasty crash, perhaps in a library somewhere.
I rarely see crashes that are not in libraries - they get passed invalid arguments and blow up later. That would be fine if it was at least possible to trace back to whatever handed them the bogus values. In the worst possible case, shouldn't it at least have _one_ inkscape method or function listed in the backtrace, for instance "main" in the lowest position?
If the stack gets corrupted, alas... :(
What may help you in this case is putting "g_message" lines in the code, to see how far execution progresses and where it stops.
-Johan

On 25-Apr-2012 12:14, mathog wrote:
I looked more carefully at the ::bind section and found that it was doing the right thing - multiplying the transforms as they were stacked. The bug was located elsewhere in the code in emf-win32-print.cpp:
https://bugs.launchpad.net/inkscape/+bug/965594
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech

On 25-04-12 20:34, mathog wrote:
The debugging tips for windows here:
http://wiki.inkscape.org/wiki/index.php/Debugging_Inkscape#Debugging_Tips_fo...
gives this example (extraneous text removed, program output in []):
gdb file inkscape.exe inkscape.dbg ... Is there some magic gdb incantation that must be applied to enable bt to show something useful, specifically, the names of the methods?
Johan could very well be right, but do make sure that you do not forget to load "inkscape.dbg", as is done in the example.

Hi,
As said by JazzyNico in the following bug reports, unfortunately gdb is currently broken with the trunk version... https://bugs.launchpad.net/inkscape/+bug/965322
2012/4/25 mathog <mathog@...1176...>
The debugging tips for windows here:
http://wiki.inkscape.org/wiki/index.php/Debugging_Inkscape#Debugging_Tips_fo...
gives this example (extraneous text removed, program output in []):
gdb file inkscape.exe inkscape.dbg run Tekening.svg [ Program received signal SIGSEGV, Segmentation fault. 0x005c94ec in Inkscape::UI::Widget::Scalar::setValue () ] bt [ #0 0x005c94ec in Inkscape::UI::Widget::Scalar::setValue () #1 0x0044fc11 in Inkscape::CanvasXYGrid::readRepr () #2 0x0044de22 in Inkscape::CanvasXYGrid::onReprAttrChanged () ]
except that is NOT what I see on bt. What I see is always something like this:
(gdb) bt #0 0x7c912669 in stricmp () from C:\WINDOWS\system32\ntdll.dll #1 0x7c911649 in ntdll!RtlInitializeHandleTable () from C:\WINDOWS\system32\ntdll.dll #2 0x7c91911f in ntdll!RtlRealPredecessor () from C:\WINDOWS\system32\ntdll.dll #3 0x044bc000 in ?? () #4 0x00016000 in ?? () #5 0x000000f7 in ?? () #6 0x7c912482 in stricmp () from C:\WINDOWS\system32\ntdll.dll #7 0x77c2c3c9 in msvcrt!free () from C:\WINDOWS\system32\msvcrt.dll #8 0x003f0000 in ?? () #9 0x00000000 in ?? () (gdb)
Which is pretty useless. The Tips says that compiling with -g is not required. Is there some magic gdb incantation that must be applied to enable bt to show something useful, specifically, the names of the methods?
Thank you,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech
Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel

I think the problem referred to by JazzyNico is the following bug:
https://bugs.launchpad.net/inkscape/+bug/956225 It may be related related to loading the Fill and Stroke dialog. Veronika From: Yann Papouin Sent: Wednesday, May 02, 2012 1:46 PM To: mathog Cc: inkscape-devel@lists.sourceforge.net Subject: Re: [Inkscape-devel] Windows debugging,gdb instructions - no symbols
Hi,
As said by JazzyNico in the following bug reports, unfortunately gdb is currently broken with the trunk version... https://bugs.launchpad.net/inkscape/+bug/965322
2012/4/25 mathog <mathog@...1176...>
The debugging tips for windows here:
http://wiki.inkscape.org/wiki/index.php/Debugging_Inkscape#Debugging_Tips_fo...
gives this example (extraneous text removed, program output in []):
gdb file inkscape.exe inkscape.dbg run Tekening.svg [ Program received signal SIGSEGV, Segmentation fault. 0x005c94ec in Inkscape::UI::Widget::Scalar::setValue () ] bt [ #0 0x005c94ec in Inkscape::UI::Widget::Scalar::setValue () #1 0x0044fc11 in Inkscape::CanvasXYGrid::readRepr () #2 0x0044de22 in Inkscape::CanvasXYGrid::onReprAttrChanged () ]
except that is NOT what I see on bt. What I see is always something like this:
(gdb) bt #0 0x7c912669 in stricmp () from C:\WINDOWS\system32\ntdll.dll #1 0x7c911649 in ntdll!RtlInitializeHandleTable () from C:\WINDOWS\system32\ntdll.dll #2 0x7c91911f in ntdll!RtlRealPredecessor () from C:\WINDOWS\system32\ntdll.dll #3 0x044bc000 in ?? () #4 0x00016000 in ?? () #5 0x000000f7 in ?? () #6 0x7c912482 in stricmp () from C:\WINDOWS\system32\ntdll.dll #7 0x77c2c3c9 in msvcrt!free () from C:\WINDOWS\system32\msvcrt.dll #8 0x003f0000 in ?? () #9 0x00000000 in ?? () (gdb)
Which is pretty useless. The Tips says that compiling with -g is not required. Is there some magic gdb incantation that must be applied to enable bt to show something useful, specifically, the names of the methods?
Thank you,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
-------------------------------------------------------------------------------- ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
-------------------------------------------------------------------------------- _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
participants (5)
-
Jasper van de Gronde
-
Johan Engelen
-
mathog
-
Veronika
-
Yann Papouin