To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=45439
Issue #:|45439
Summary:|speculative bug ...
Component:|gsl
Version:|680m79
Platform:|Other
URL:|
OS/Version:|All
Status:|NEW
Status whiteboard:|
Keywords:|
Resolution:|
Issue type:|PATCH
Priority:|P4
Subcomponent:|code
Assigned to:|pl
Reported by:|mmeeks
------- Additional comments from [EMAIL PROTECTED] Fri Mar 18 09:44:38 -0800
2005 -------
So - this is not a 'real' bug in the sense of it biting & sucking blood (yet)
However - while trying to chase down the previous bug. Anyhow:
I added:
Index: source/helper/ppdparser.cxx
===================================================================
RCS file: /cvs/gsl/psprint/source/helper/ppdparser.cxx,v
retrieving revision 1.17
diff -u -r1.17 ppdparser.cxx
--- source/helper/ppdparser.cxx 8 Sep 2004 14:08:39 -0000 1.17
+++ source/helper/ppdparser.cxx 18 Mar 2005 17:31:44 -0000
@@ -261,9 +261,15 @@
static ::osl::Mutex aMutex;
::osl::Guard< ::osl::Mutex > aGuard( aMutex );
String aFile = rFile;
+
+ if( rFile.CompareToAscii( "SGENPRT" ) != COMPARE_EQUAL ) {
+ fprintf( stderr, "Bombing out\n" );
+ return NULL;
+ }
+
if( rFile.CompareToAscii( "CUPS:", 5 ) != COMPARE_EQUAL )
aFile = getPPDFile( rFile );
if( ! aFile.Len() )
{
#if OSL_DEBUG_LEVEL > 1
Which [ AFIACS ] synthesises the effect of not being able to parse any PPD files
that CUPS gives us (correct me if I'm wrong).
Anyhow with that patch; if you do:
File->Print, <escape>, File->Printer Settings
you get a nice segv:
(gdb) bt
#0 0x424832f3 in _STL::vector<void*, _STL::allocator<void*> >::size (this=0x4)
at _vector.h:179
#1 0x42483d15 in _M_find<rtl::OUString> (this=0x0, [EMAIL PROTECTED]) at
_hashtable.h:471
#2 0x4248145e in find<rtl::OUString> (this=0x0, [EMAIL PROTECTED]) at
_hashtable.h:498
#3 0x4247d1c0 in _STL::hash_map<rtl::OUString, psp::PPDKey*, rtl::OUStringHash,
_STL::equal_to<rtl::OUString>, _STL::allocator<_STL::pair<rtl::OUString const,
psp::PPDKey*> > >::find (this=0x0, [EMAIL PROTECTED]) at _hash_map.h:182
#4 0x424777d8 in psp::PPDParser::getKey (this=0x0, [EMAIL PROTECTED]) at
/opt/OpenOffice/src680-m79/psprint/source/helper/ppdparser.cxx:513
#5 0x423d0536 in copyJobDataToJobSetup (pJobSetup=0x8c8e7b8, [EMAIL PROTECTED])
at /opt/OpenOffice/src680-m79/vcl/unx/source/gdi/salprnpsp.cxx:287
#6 0x423d1147 in X11SalInstance::CreateInfoPrinter (this=0x80d4a48,
pQueueInfo=0x8c8bf48, pJobSetup=0x8c8e7b8)
at /opt/OpenOffice/src680-m79/vcl/unx/source/gdi/salprnpsp.cxx:494
#7 0x4022aa9e in Printer::ImplInit () from ./libvcl680li.so
#8 0x4022b248 in Printer::Printer () from ./libvcl680li.so
#9 0x40858cbe in ImplPrnDlgUpdatePrinter () from ./libsvt680li.so
#10 0x4085fc6e in PrintDialog::DataChanged () from ./libsvt680li.so
#11 0x403353ac in Window::NotifyAllChilds () from ./libvcl680li.so
#12 0x4016e7a9 in Application::NotifyAllWindows () from ./libvcl680li.so
#13 0x40347219 in ImplHandleSalSettings () from ./libvcl680li.so
#14 0x40347905 in ImplWindowFrameProc () from ./libvcl680li.so
#15 0x423e316b in SalDisplay::DispatchInternalEvent () from
./libvclplug_gen680li.so
#16 0x41e868a2 in GtkXLib::userEventFn () from ./libvclplug_gtk680li.so
#17 0x42310221 in g_idle_dispatch () from /opt/gnome/lib/libglib-2.0.so.0
#18 0x42311e87 in g_main_context_dispatch () from
/opt/gnome/lib/libglib-2.0.so.0
#19 0x423145c7 in g_main_context_iterate () from /opt/gnome/lib/libglib-2.0.so.0
#20 0x423146c3 in g_main_context_iteration () from
/opt/gnome/lib/libglib-2.0.so.0
#21 0x41e86a32 in GtkXLib::Yield () from ./libvclplug_gtk680li.so
#22 0x423e766f in X11SalInstance::Yield () from ./libvclplug_gen680li.so
#23 0x4016df72 in Application::Yield () from ./libvcl680li.so
#24 0x402d30d0 in Dialog::Execute () from ./libvcl680li.so
#25 0x4085fd7e in PrintDialog::Execute () from ./libsvt680li.so
#26 0x44031b77 in SfxViewShell::ExecPrint_Impl (this=0x8888478, [EMAIL
PROTECTED])
at /opt/OpenOffice/src680-m79/sfx2/source/view/viewprn.cxx:485
#27 0x4401bca4 in SfxStubSfxViewShellExecPrint_Impl () from ./libsfx680li.so
#28 0x4406ed9c in SfxShell::ExecuteSlot () from ./libsfx680li.so
#29 0x46c358ea in SwView::ExecutePrint () from ./libsw680li.so
#30 0x46c09570 in SfxStubSwViewExecutePrint () from ./libsw680li.so
Which is a simple NULL pointer dereference of
(gdb) down
#5 0x423d0536 in copyJobDataToJobSetup (pJobSetup=0x8c8e7b8, [EMAIL PROTECTED])
at /opt/OpenOffice/src680-m79/vcl/unx/source/gdi/salprnpsp.cxx:287
287 pKey =
rData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) );
(gdb) p rData.m_pParser
$5 = (const psp::PPDParser *) 0x0
After an extended debugging love-in, I discovered that:
Index: source/printer/jobdata.cxx
===================================================================
RCS file: /cvs/gsl/psprint/source/printer/jobdata.cxx,v
retrieving revision 1.5
diff -u -r1.5 jobdata.cxx
--- source/printer/jobdata.cxx 17 Mar 2004 10:51:16 -0000 1.5
+++ source/printer/jobdata.cxx 18 Mar 2005 17:31:46 -0000
@@ -88,8 +88,11 @@
m_nPSLevel = rRight.m_nPSLevel;
m_nColorDevice = rRight.m_nColorDevice;
- if( ! m_pParser && m_aPrinterName.getLength() )
+ fprintf( stderr, "JobData:: = (%p) '%d'\n", m_pParser,
+ m_aPrinterName.getLength() );
+ if( ! m_pParser )
{
+ fprintf( stderr, " JobData:: setup context data\n" );
PrinterInfoManager& rMgr = PrinterInfoManager::get();
rMgr.setupJobContextData( *this );
}
Index: source/printer/printerinfomanager.cxx
===================================================================
RCS file: /cvs/gsl/psprint/source/printer/printerinfomanager.cxx,v
retrieving revision 1.27
diff -u -r1.27 printerinfomanager.cxx
--- source/printer/printerinfomanager.cxx 9 Nov 2004 16:38:07 -0000
1.27
+++ source/printer/printerinfomanager.cxx 18 Mar 2005 17:31:48 -0000
@@ -1246,6 +1158,9 @@
void PrinterInfoManager::setupJobContextData( JobData& rData )
{
+ fprintf( stderr, "setupJobContextData on printer '%s'\n",
+ OUStringToOString( rData.m_aPrinterName,
RTL_TEXTENCODING_UTF8 ).getStr() );
+
std::hash_map< OUString, Printer, OUStringHash >::iterator it =
m_aPrinters.find( rData.m_aPrinterName );
if( it != m_aPrinters.end() )
@@ -1253,6 +1168,11 @@
rData.m_pParser = it->second.m_aInfo.m_pParser;
rData.m_aContext = it->second.m_aInfo.m_aContext;
}
+ if (!rData.m_pParser) {
+ fprintf( stderr, "Avoid NULL m_pParser !\n" );
+ rData.m_pParser = m_aGlobalDefaults.m_pParser;
+ rData.m_aContext = m_aGlobalDefaults.m_aContext;
+ }
}
void PrinterInfoManager::setDefaultPaper( PrinterInfo& rInfo ) const
was part of the way to a fix. Somehow empty m_aPrinterNames are straying into
the picture (from somewhere).
Anyhow ... HTH.
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]