By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 1125 - Nightly twin crashes when running Wine 1.5
Summary: Nightly twin crashes when running Wine 1.5
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdebase (show other bugs)
Version: R14.0.0 [Trinity]
Hardware: All Linux
: P5 critical
Assignee: Timothy Pearson
URL:
Depends on:
Blocks:
 
Reported: 2012-07-25 13:00 CDT by Julius Schwartzenberg
Modified: 2012-10-19 15:40 CDT (History)
2 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
Backtrace that's generated when twin crashes (2.89 KB, text/plain)
2012-07-25 13:00 CDT, Julius Schwartzenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julius Schwartzenberg 2012-07-25 13:00:58 CDT
Created attachment 709 [details]
Backtrace that's generated when twin crashes

Nightly twin crashes when running Wine 1.5 on Ubuntu Precise. I have attached a backtrace.
Comment 1 Timothy Pearson 2012-07-25 13:39:21 CDT
This upstream glibc bug may be related:
http://sourceware.org/bugzilla/show_bug.cgi?id=13138


Simply put, there is no reason for an elementary function such as fscanf to fail after fopen succeeds when it has been passed correct arguments!
Comment 2 Julius Schwartzenberg 2012-07-25 13:41:49 CDT
Do you think it would be difficult to create a simple test case? It would help with reporting this as a bug against Ubuntu (if that hasn't been done already).
Comment 3 Timothy Pearson 2012-07-25 13:43:28 CDT
For reference, here is the crashing code:

procfile = fopen("stat", "r");
    <verify that procfile is not NULL, other unrelated code>
long long int procpid;
    <unrelated code>
fscanf(procfile, "%lld ", &procpid);
Comment 4 Timothy Pearson 2012-07-25 13:47:19 CDT
(In reply to comment #2)
> Do you think it would be difficult to create a simple test case? It would help
> with reporting this as a bug against Ubuntu (if that hasn't been done already).

Well, here is an almost direct copy+paste from the twin sources:

int main() {
        long long pid = <insert extant large PID here>;

        FILE *procfile;
        if(chdir(TQString("/proc/%1").arg(pid).ascii()) == 0)
            {
            procfile = fopen("stat", "r");
            }
        if(!procfile)
            {
            return false;
            }
        else
            {
            long long int procpid;
            char tcomm[PATH_MAX];
            char state;
            fscanf(procfile, "%lld ", &procpid);
            fscanf(procfile, "%s ", tcomm);
            fscanf(procfile, "%c ", &state);
            if( state == 'T' )
                {
                fclose(procfile);
                return true;
                }
            else
                {
                fclose(procfile);
                return false;
                }
            }
}

This code could probably be converted to use TQFile, which would avoid the crash.  I'll see what I can do.
Comment 5 Timothy Pearson 2012-07-25 14:53:12 CDT
Converted to TQFile in GIT hash c7ae64e.

If twin still crashes after packages have been rebuilt, please reopen this report with a new backtrace.