Client logged in once, now can't

Submitted by manithree on 2007-08-28

I just set up a server and client on my machine for testing. The client (Linux, 0.9.1) logged in and I created a new issue type. The next time I tried to log in, the server (Linux Fedora 7, mysql 5.0.37-2, webissues 0.8.3-1) was still in the list, but I get:
Command could not be executed (400 Syntax Error).

I've deleted and recreated the server in the list, and re-started apache. But I can't log in any more.

Any ideas how to debug this? I REALLY need to be able to define my own issue types, so this looks great if I can get it working reliably.

Thanks

Hello,

Try enabling the logs of the WebIssues server, especially the commands log, and see what's printed there.

Regards,
Michał

[2007-08-28 16:10:00, 127.0.0.1]
> HELLO
SERVER 'dalmuti.xactvalue.com' '692a0cca-c844-4ced-a2b7-969375541f55'

[2007-08-28 16:10:00, 127.0.0.1]
> LOGIN 'admin' 'password-removed'
USER 1 2

[2007-08-28 16:10:00, 127.0.0.1]
ERROR 400 'Syntax Error'

Doesn't mean much to me.

Honestly it doesn't tell me much either... It seems that an empty request is sent to the server just after the LOGIN command, but I don't know what may be the reason and it has never occurred before, so it may be difficult to reproduce.

Regards,
Michał

Is there anything further I can do to help track this down? strace the client? Any patches or debug flags I can use on the client?

I found a bug that may be related to your problem. Lines 89-92 in commands\formdatamessage.cpp:

if ( !line.isEmpty() ) {
        const char* data = line.toLatin1();
        m_buffer.write( data, qstrlen( data ) );
    }

This was correct in Qt3. In Qt4 it still compiles fine, however it's wrong because now toLatin1 returns a QByteArray which is implicitly casted to const char* and then destroyed. Obviously the pointer becomes invalid.

Try changing the above code to the following:

if ( !line.isEmpty() )
        m_buffer.write( line.toLatin1() );

Let me know if it helps.

Regards,
Michał

That did it! Thanks!

I'll keep playing with webissues tomorrow. Today's a holiday in the US.

Again, thanks!