Author Topic: Codeblocks reports: ** (codeblocks:12654): WARNING **: failed request with statu  (Read 7712 times)

Offline Bloop

  • Multiple posting newcomer
  • *
  • Posts: 16
Good Morning Guys

I did as I was told and made CodeBlocks think I have a printer on /dev/null. Now it loads without problems with or without running the cups deamon.
But I still get this strange warning in Console:

Code: [Select]

** (codeblocks:18317): WARNING **: failed request with status 1030

** (codeblocks:18317): WARNING **: failed request with status 1030

** (codeblocks:18319): WARNING **: failed request with status 1030

** (codeblocks:18319): WARNING **: failed request with status 1030

** (codeblocks:18320): WARNING **: failed request with status 1030

** (codeblocks:18320): WARNING **: failed request with status 1030

I stumbled over the cups access_log. A shame I didn't thought of this yesterday.

Code: [Select]
localhost - - [26/Oct/2005:23:29:12 +0000] "POST / HTTP/1.1" 200 72
localhost - - [26/Oct/2005:23:29:12 +0000] "POST / HTTP/1.1" 200 72
localhost - - [26/Oct/2005:23:29:17 +0000] "POST / HTTP/1.1" 200 72
localhost - - [26/Oct/2005:23:29:17 +0000] "POST / HTTP/1.1" 200 72
localhost - - [26/Oct/2005:23:29:22 +0000] "POST / HTTP/1.1" 200 72
localhost - - [26/Oct/2005:23:29:22 +0000] "POST / HTTP/1.1" 200 72
localhost - - [26/Oct/2005:23:29:27 +0000] "POST / HTTP/1.1" 200 72
localhost - - [26/Oct/2005:23:29:27 +0000] "POST / HTTP/1.1" 200 72
localhost - - [26/Oct/2005:23:29:32 +0000] "POST / HTTP/1.1" 200 72
localhost - - [26/Oct/2005:23:29:32 +0000] "POST / HTTP/1.1" 200 72
localhost - - [26/Oct/2005:23:29:37 +0000] "POST / HTTP/1.1" 200 72
localhost - - [26/Oct/2005:23:29:37 +0000] "POST / HTTP/1.1" 200 72
localhost - - [26/Oct/2005:23:29:42 +0000] "POST / HTTP/1.1" 200 72
localhost - - [26/Oct/2005:23:29:42 +0000] "POST / HTTP/1.1" 200 72
localhost - - [26/Oct/2005:23:29:47 +0000] "POST / HTTP/1.1" 200 72

The intervals match! CodeBlocks is definetly trying to access a printer.

Thomas: You told CodeBlocks is uising wxPrinter from the wxGTK package. I will try to swapto a newer or older version and report my progress.


Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Quote
Yes, but Bloop reported it actually gets better/worse when playing with cups, that makes printing a likely cause, does it not?

Sure, I 'm not questioning Bloop's findings...
I just said it's strange I haven't seen/heard it before. I think cups is widely used...

Quote
Downloaded wxGTK and looked. There's not much that happens really:

Well, when I said global, I didn't mean a wxPrinter. That would be silly. Here's what's global (in sdk/printing_types.cpp):

Code: [Select]
wxPrintData* g_printData = 0;
wxPageSetupData* g_pageSetupData = 0;

But the root of the problem probably lies in the same file, specifically in InitPrinting() where the above vars are initialised. This is called on program startup. We could always postpone initialization for later, e.g. when a printing request arrives. That should solve it, would it not?
Be patient!
This bug will be fixed soon...

Offline Bloop

  • Multiple posting newcomer
  • *
  • Posts: 16
Hey there!

I have installed wxGTK 2.6.2 and recompiled CodeBlocks from CVS. It hangs on startup, but instantly comes to live when cups is started! The only workaround I know is to go to "print setup" and set the "generic postscript" to "Custom" on "/dev/null". This is changed back to "lpr" when restarting CodeBlocks but the "hang at startup" issue is gone where ever cups is running or not.

Same thing with wxGTK 2.6.1. If no one else hat a problem like that before it must be my system! I will install CodeBlocks on another Gentoo machine at the weekend and crosslink my findings.

Regards Bloop


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
But the root of the problem probably lies in the same file, specifically in InitPrinting()

Yes, you're probably right, that seems to be it:

void InitPrinting()
{
    if (!g_printData)
        g_printData = new wxPrintData;
    if (!g_pageSetupData)
        g_pageSetupData = new wxPageSetupDialogData;
}

wxPrintData::wxPrintData()
{
...
    m_nativeData = wxPrintFactory::GetFactory()->CreatePrintNativeData();
}
...
wxPrintNativeDataBase *wxGnomePrintFactory::CreatePrintNativeData()
{
    return new wxGnomePrintNativeData;
}
...
wxGnomePrintNativeData::wxGnomePrintNativeData()
{
    m_config = gs_lgp->gnome_print_config_default();
    m_job = gs_lgp->gnome_print_job_new( m_config );
}


These last two lines look like they might hang if cups doesn't reply.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."