nanogui: Problem: Drawing Images


Previous by date: 17 Jan 2002 03:28:15 -0000 Re: Long time operation and events, Jordan Crouse
Next by date: 17 Jan 2002 03:28:15 -0000 Re: Problem: Drawing Images, Greg Haerr
Previous in thread: 17 Jan 2002 03:28:15 -0000 Re: Problem: Drawing Images, Greg Haerr
Next in thread: 17 Jan 2002 03:28:15 -0000 Re: Problem: Drawing Images, Greg Haerr

Subject: Re: [nanogui] Problem: Drawing Images
From: "Brian" ####@####.####
Date: 17 Jan 2002 03:28:15 -0000
Message-Id: <005201c19f07$49a19c00$5301a8c0@mltc.com.tw>

Hello Greg,

Thanks for the message. : )

> : I don't understand
> : why setting MAXREQUESTSZ to a larger value makes such a
> : difference.
>
> There might be a bug in the stack overflow or read
> routine that occurs when the image data is larger
> than MAXREQUESTSZ.  Look at nanox/srvnet.c::GsHandleClient().

For GrDrawImageFromFile() and GrDrawImageToFit(), the request
is so small that it should not cause the stack overflow and besides,
you
have a sanity check on the request size.  It remains a mystery to
me...

> Try turning on or off the ARM structure packing,
> using -mstructure-size-boundary=8 or 1.  The GIF
> routines are in engine/devimage.c.  If the GIF
> code reads in integers or values greater than one
> byte, then the code may not run properly.  If you
> can fix the problem, let me know, I'll update the source
> tree.
I tried both -mstructure-size-boundary=8
and -mstructure-size-boundary=32 flags,
but the problem persists.
I then tried again setting LINK_APP_INTO_SERVER to 'Y' and GIFs
load fine!!!  (I only tried BMP files when I previously set
LINK_APP_INTO_SERVER to 'Y'...)
Does it eliminate the structure packing problem?  It appears to be
more
like a client/server problem.

I'm now scratching my head and wondering why the same code works on
a PC but not on my platform.  I'll try look deeper even though it
seems to
be a daunting task...

Any pointers will be great.

Thanks. : )


Brian

----- Original Message -----
From: "Greg Haerr" ####@####.####
To: "Brian" ####@####.####
Sent: Thursday, January 17, 2002 1:20 AM
Subject: Re: [nanogui] Problem: Drawing Images


> : I don't understand
> : why setting MAXREQUESTSZ to a larger value makes such a
> : difference.
>
> There might be a bug in the stack overflow or read
> routine that occurs when the image data is larger
> than MAXREQUESTSZ.  Look at nanox/srvnet.c::GsHandleClient().
>
>
>
> : However, the programs work for BMPs but not for GIFs.  When
loading
> : a GIF file, the program will not return properly from
LWZReadByte()
> : called from ReadImage() called from LoadGIF().  Does it look
related
> : to the
> : alignment problems you mentioned?  How do I make sure it is the
> : alignment problem and if it is, how do I solve it?  Could you
explain
> : more
> : about the alignment problem?  Structure packing?
>
> Try turning on or off the ARM structure packing,
> using -mstructure-size-boundary=8 or 1.  The GIF
> routines are in engine/devimage.c.  If the GIF
> code reads in integers or values greater than one
> byte, then the code may not run properly.  If you
> can fix the problem, let me know, I'll update the source
> tree.
>
> Regards,
>
> Greg
>
>
>
>
>
> :
> : Thanks again for your help. : )
> :
> :
> : Brian
> :
> : ----- Original Message -----
> : From: "Greg Haerr" ####@####.####
> : To: "Brian" ####@####.#### ####@####.####
> : Sent: Wednesday, January 16, 2002 2:40 PM
> : Subject: Re: [nanogui] Problem: Drawing Images
> :
> :
> : : I am having trouble drawing images, using GrDrawImageBits(),
> : : GrDrawImageFromFile() and GrDrawImageToFit().
> : : I just followed the examples in 'install.txt'.  The examples run
> : fine
> : : on
> : : my x86 PC; however, they only run 'partially' on our ARM
platform.
> : : The underlying operating system is uClinux for ARM.
> :
> : A couple of ideas: make sure that the MAXREQUESTSZ
> : macro in nanox/nxproto.h is larger than the image
> : size you're using.  Also, you might try using
> : the LINK_APP_INTO_SERVER=Y config option so that
> : you eliminate any client/server issues.  Finally,
> : there may be some alignment problems in the
> : image conversion routines - try a few different
> : types of image files.
> :
> : Regards,
> :
> : Greg
> :
> :
> :
> : :
> : : For GrDrawImageBits(), it causes the error:
> : :     # nano-X: GsError (GrDrawImageBits) Bad graphics context:
1000
> : :
> : : For both GrDrawImageFromFile() and GrDrawImageToFit(), it
endlessly
> : : prints out:
> : :     # nano-X: Error accept failed (88)
> : : where errno of 88 corresponds to:
> : :     #define ENOTSOCK 88 /* Socket operation on non-socket */
> : : It actually finishes drawing the image and then prints out the
error
> : : message...
> : : Adding some debug printf's would not reproduce the problem but
> : causes
> : : nano-X
> : : server to stop responding even though the other parts of the
system
> : : remain alive.
> : :
> : : I tried both 0.89pre8 and 0.89pre7 and the results were similar.
> : :
> : : The 'landmine' game and a simple 'hello world' program run fine
on
> : our
> : : system;
> : : therefore, I think the nano-X server is ok.
> : :
> : : Has anyone experienced the same problems?
> : : Our system is very slow.  Does clock speed have anything to do
with
> : : it?  (I personally
> : : do not think so...)
> : :
> : : I have trouble sorting out the source of the problems.  Could
anyone
> : : give me a hint here?
> : :
> : : Thanks. : )
> : :
> : :
> : : Brian
> : :
> : :
> : :
> : :
> :
: --------------------------------------------------------------------
> : -
> : : To unsubscribe, e-mail: ####@####.####
> : : For additional commands, e-mail: ####@####.####
> : :
> :
> :
>
: --------------------------------------------------------------------
-
> : To unsubscribe, e-mail: ####@####.####
> : For additional commands, e-mail: ####@####.####
> :


Previous by date: 17 Jan 2002 03:28:15 -0000 Re: Long time operation and events, Jordan Crouse
Next by date: 17 Jan 2002 03:28:15 -0000 Re: Problem: Drawing Images, Greg Haerr
Previous in thread: 17 Jan 2002 03:28:15 -0000 Re: Problem: Drawing Images, Greg Haerr
Next in thread: 17 Jan 2002 03:28:15 -0000 Re: Problem: Drawing Images, Greg Haerr


Powered by ezmlm-browse 0.20.