Advertisement
tatung

GDB original mail

Aug 2nd, 2011
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.77 KB | None | 0 0
  1. Hi,
  2. I've tried to add a radio button into print dialog for Writer.
  3. In /sw/source/core/view/printdata.cxx, I have this piece of code (around line 310)
  4. http://pastebin.com/gMu70wYm
  5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  6. aChoices[3] = aLocalizedStrings.GetString( 30 );
  7. aChoicesDisabled[3] = sal_False;
  8. aHelpIds[3] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:3" ) );
  9. m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(),
  10. aHelpIds,
  11. aPrintRangeName,
  12. aChoices,
  13. 0 /* always default to 'All pages' */,
  14. rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Radio" ) ),
  15. aChoicesDisabled
  16. );
  17. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18.  
  19. After that I add an item to PRINTOPTUI in /sw/source/ui/config/optdlg.src --> the "Current Page"
  20. http://pastebin.com/nrNBz7A6
  21. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  22. StringArray STR_PRINTOPTUI
  23. {
  24. ItemList [en-US] =
  25. {
  26. ......
  27. < "~All pages"; >;
  28. < "Pa~ges"; >;
  29. < "~Selection"; >;
  30. < "Cu~rrent page"; >;
  31. };
  32. };
  33. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  34.  
  35. When I try to run it, the radio button does appear but when I click on that radio button (Current page), Writer just stop and dismiss.
  36.  
  37. I've tried to debug it by gdb and this is the message.
  38. http://pastebin.com/i4QpmjDS
  39. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  40. Program received signal SIGSEGV, Segmentation fault.
  41. 0x0013391a in rtl_uString_acquire ()
  42. from /home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/ure-link/lib/libuno_sal.so.3
  43. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  44.  
  45. I put breakpoint in SwXTextDocument::getRendererCount() (#5 in gdb log from pastebin link above). The program does stop at that breakpoint, but when I want to step in, it just pass through it Like this:
  46. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  47. Breakpoint 1, 0x04384774 in SwXTextDocument::getRendererCount(com::sun::star::uno::Any const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ()
  48. from /home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/program/libswlo.so
  49. (gdb) step
  50. Single stepping until exit from function _ZN15SwXTextDocument16getRendererCountERKN3com3sun4star3uno3AnyERKNS3_8SequenceINS2_5beans13PropertyValueEEE,
  51. which has no line number information.
  52. In unotxdoc.cxx/getRendererCount, after check IsValid()
  53. In unotxdoc.cxx/getRendererCount 1
  54. [New Thread 0xb1620b70 (LWP 14464)]
  55. [Thread 0xb1620b70 (LWP 14464) exited]
  56. [New Thread 0xb223fb70 (LWP 14465)]
  57. In unotxdoc.cxx/getRendererCount 2
  58. In unotxdoc.cxx/getRendererCount 3
  59. In unotxdoc.cxx/getRendererCount 4
  60. In unotxdoc.cxx/getRendererCount/check pSwView 1
  61. [New Thread 0xb1620b70 (LWP 14466)]
  62. [Thread 0xb223fb70 (LWP 14465) exited]
  63. In unotxdoc.cxx/getRendererCount/check pSwView 2
  64. In unotxdoc.cxx/getRendererCount/check pSwView 3
  65.  
  66. Program received signal SIGSEGV, Segmentation fault.
  67. 0x0013391a in rtl_uString_acquire ()
  68. from /home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/ure-link/lib/libuno_sal.so.3
  69. (gdb)
  70. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  71.  
  72. Did I miss any thing? Please help
  73.  
  74. Thanks for your help!
  75. Ta Tung
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement