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

Offline Bloop

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

When running Code::Blocks from console it starts but I get teh following message in the console window:

** (codeblocks:12654): WARNING **: failed request with status 1280

This repeats every 3-5 seconds.

After some time using Code::Blocks it freezes.
Could this be related to my error message?

I already searched the the forums and googled. No answer to that!

Any suggestions?

Regards Bloop


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Do you happen to run cups with either internet printing protocol (ipp) or over smb?
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Bloop

  • Multiple posting newcomer
  • *
  • Posts: 16
I have it! It came with some editor package. But it's not running!

Code: [Select]
ps -A | grep cups
tells nothing. There is no samba or anything else running. You think it has du do with cups?

Regards Bloop

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Thomas: Do you know anything about it? What does cups have to do with it?

Offline Bloop

  • Multiple posting newcomer
  • *
  • Posts: 16
Well I googled for : "failed request with status .... " and the first thing that came was an unsucessful attempt to install a printer.
I will reinstall cups right now and  check if the problem still exists.

Does codeblocks somehow use cups?

See you

Bloop

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Well, it speaks of "request", which suggests that something tries to talk to some server process or tries to do some networking. On Windows, I would have said "might be the DDE server", but there is no such thing here ;)

So what else could it be... Code::Blocks could fail trying to open a network socket (it does not :) ) or it could access something else that uses network, clearly printing comes to your mind at this point.

To verify this hypothesis, I spent half an hour on the web looking for this error message. And indeed:
Everything which relates to this message or a remotely similar message has to do with cups or gnome-cups, either in combination with ipp or smb.

So the assumption that it has to do with printing (and cups in particular) seems likely.

Now the question is what to do... maybe you should try to actually print something, if it is really related to printing, then you should immediately get an identical error. That does not solve the problem, but it confirms the origin.
Or look what happens if you actually run the cups demon (properly configured). If the problem is just that C::B can't connect to it, then that solves the problem.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Bloop

  • Multiple posting newcomer
  • *
  • Posts: 16
I updated cups to the latest version: cups-1.1.2.3-r4

And as dependencies 

x11-libs/motif-config-0.9
x11-libs/openmotif-2.2.3-r7
media-libs/t1lib-5.0.2

Same error. In fact Codeblocks freezes at the splashscreen und takes ages to load! What is wrong? How can I use codeblocks -d to get debug output.





Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
So updating cups made it worse?

Hmm well, not good for you... but at least that confirms that this is the problem, which is a valuable clue.

Since cups was not running at all before, did you properly configure it? What happens if you take it off completely?
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Mind posting a screenshot?

Offline Bloop

  • Multiple posting newcomer
  • *
  • Posts: 16
Ok here we go! The requested screenshot is available here: http://lukeo.homeip.net/Screen.jpg

This is the state CodeBlocks goes after 2 minutens Splashscreen.

Now, I have removed cups from my system and rebootet the machine. Now check this out:
CodeBlocks starts up fast but Console gives me the following message:

**(codeblocks:6576) WARNING **; Can't g_module_open /usr/lib/libgnomeprint/2.10.3/modules/libgnomeprintcups.so

Unfortunately all other program which use this lib don't work ( e.g. shutterbug).

Could this be it?

Offline Bloop

  • Multiple posting newcomer
  • *
  • Posts: 16
OK! I reinstalled cups and again I have to wait forever for codeblocks to load. Same behavior as displayed on the screenshot.

So I took a deeper look into cups config files but found nothing. Well since I have no printers I had no need to run the cups daemon.

Now I get the message "failed request with status 1030" instead of "failed request with status 1280". Codeblocks lags a lot, but seams to work.

I am confused!


Offline Bloop

  • Multiple posting newcomer
  • *
  • Posts: 16
Oh I'm sorry!

I forgot to say that I started the cups deamon. As a result the failed request changed and codeblocks seemed to work.


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
This lag is probably because Code::Blocks waits for a response from cups. Since fiddling with cups can make it worse or better, that seems proven now.

Rick: Am I right that Code::Blocks
a) probably uses wxPrinter
b) does not do anything with it if nothing is printed?

If that is the case, however, one has to wonder why Bloop is having a problem (started a print job by accident some time earlier?). If, however, Code::Blocks indeed does something with the printing system every time at startup, one should consider moving that.

Bloop: Even if you do not have a printer, why don't you try and run printconf and install a printer on locally connected-->custom device /dev/null? I haven't tried myself, but probably cups will just take /dev/null for valid and will answer "yep, I am ready" right away each time it is asked, so Code::Blocks won't hang or lag any more.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Quote
a) probably uses wxPrinter
b) does not do anything with it if nothing is printed?

Yes, it uses wxPrinter.
BUT only when printing, not on startup (except for a static global variable - maybe that's the cause). If there's a bug, it's wxGTK's. No code to access the printer is called until there's a printing request.

With that said, I 've never seen this in Ubuntu whether I configured a printer or not...
Be patient!
This bug will be fixed soon...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Hmm, a static global will run the constructor, no idea what goes on in the constructor then. Could we do without the global?

With that said, I 've never seen this in Ubuntu whether I configured a printer or not...
Yes, but Bloop reported it actually gets better/worse when playing with cups, that makes printing a likely cause, does it not?

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

wxPrinter::wxPrinter(wxPrintDialogData *data)
{
    m_pimpl = wxPrintFactory::GetFactory()->CreatePrinter( data );
}
...
wxPrinterBase* wxGnomePrintFactory::CreatePrinter( wxPrintDialogData *data )
{
    return new wxGnomePrinter( data );
}
...
wxGnomePrinter::wxGnomePrinter( wxPrintDialogData *data ) :
    wxPrinterBase( data )
{
    m_gpc = NULL;
    m_native_preview = false;
}
...
wxPrinterBase::wxPrinterBase(wxPrintDialogData *data)
{
    m_currentPrintout = (wxPrintout *) NULL;
    sm_abortWindow = (wxWindow *) NULL;
    sm_abortIt = false;
    if (data)
        m_printDialogData = (*data);
    sm_lastError = wxPRINTER_NO_ERROR;
}

« Last Edit: October 27, 2005, 10:20:36 am by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

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."