@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2



Comments:

<0> was shocking indeed
<1> goodnight all (or morning all, wherever you are) I'm off to bed with my book.
<2> umm.. to disable stdio redirecting on cygwin i have been told to compile with --disable-stdio-redirect... i don't know where to put that?
<2> never mind think i got it =)
<3> I am trying to debug a threaded sdl game. I get through the loading screens then gdb halts the program and says "Cannot find user-level thread for LWP 381: no LWP to satisfy query". Any tips on getting gdb to play nice?
<2> how can i stop sdl redirecting stdout to files and have it in my command prompt instead.. on win32
<3> step 1) get win32 to implement POSIX-compliant stdout
<3> when you finish that one get back to us
<2> so there isn't a way? ;)
<0> i pointed you to the faq
<2> i don't know where "the faq" is
<2> oh the one on libsdl.org.. ah
<2> -dNO_STDIO_REDIRECT works but, then it does nothing
<2> how about not deleting stderr/stdout when the app ends is that possible ? for example.. if my program crashes and closes.. i can't see what happened because stdout/err are deleted
<0> dont know
<0> you can ask on the mailinglist



<4> EdgEy, the only time stderr.txt or stdout.txt are deleted when the app closes is if nothing was written to them.
<4> also, you're not too good at figuring this out, apparently. do a ./configure --help | grep stdio on the SDL source.
<4> '--enable-stdio-redirect Redirect STDIO to files on Win32 [default=yes]'
<4> so try compiling with --disable-stdio-redirect
<3> I am trying to debug a threaded sdl game. I get through the loading screens then gdb halts the program and says "Cannot find user-level thread for LWP 381: no LWP to satisfy query". Any tips on getting gdb to play nice?
<4> not sure, that's kind of weird. Try to throw in some printf's in your code to narrow down where it's crashing
<3> i have
<4> no luck?
<3> plenty, just not enough
<3> ive got printf(a);widget->draw();printf(b);
<3> i see a, but not b
<4> are you familiar with threaded programming?
<3> ive gone through widget and every child of widget and put a printf (with stdout flush of course) at the top of the ::draw method... nada
<3> 'a' is still the last thing i see before the game crashes
<3> im familiar with the concept, not the practice.
<4> have you made sure two threads aren't ever accessing the same data at the same time?
<4> I'm just trying to think up common threading pitfalls, btw.
<3> no, i havent
<3> and wouldnt know where to start
<3> why do you ask, does gdb not like that?
<4> two threads can't access the same data at the same time without crashing. This is what mutexes are for.
<3> what kind of crash would that generate?
<4> I'm not entirely sure
<3> im getting sigfpe
<3> most likely division by zero, since i dont have a fpu
<4> don't have an FPU?
<4> how old is the system you're running?
<3> a few months?
<4> every system has an FPU. It's just on the same core as the ALU, etc. :)
<4> it's not a separate chip like on old computers.
<3> err, no
<3> if you want to get really freaky, i dont have integer division either :)
<3> but thats easy enough to solve in software
<4> what kind of CPU are you running? ARM?
<3> yep
<4> ahh, ok, that makes more sense then :P
<3> and gdb refuses to play nice
<3> gdb wont let the program run, and if i run without gdb then try to debug the core dump i get nothing helpful :(
<4> my recommendation is to post on gamedev.net forums and ask.
<4> how large is the program?
<4> wait a sec. how do you divide by zero without any kind of a div instruction? :P
<4> that is freaky
<5> sparr: what sort of machine? Gp2x?
<3> lercOsX: of course
<4> can you compile this code on x86?
<3> yes
<3> runs fine on x86
<4> hmm
<3> im not even sure the game itself is crashing
<3> what little evidence i have so far points to zlib
<4> SDL doesn't depend on zlib, does it? SDL_image does, I believe.
<5> sparr: Gonna have to buy me one of those.
<6> oooh alive people >.>
<6> I have questions!
<6> well...a question!
<0> sparr: you should write to stderr not stdout for debugging or you might lose output!
<0> or add a flush
<3> i always flush :)
<3> mattst88: im using sdl_image
<3> s/im/the game is/
<3> damnit



<3> i cant build gdb
<3> and theres supposedly a patch that might fix the problem im seeing
<3> ****!
<6> sdl is being mean to me on my mac atm >:O
<3> this wouldnt be so annoying if gdb worked :(
<6> since I upgraded to the latest sdl, image, and ttf, fonts stopped rendering to the screen (when they did before I upgraded) >:(
<3> sad story: if i turn off widget rendering, the game doesnt crash
<3> but i cant see any controls
<3> i can HEAR them though
<6> I knew I would scare people away as soon as I mentionthe word "mac"
<3> and interact through trial and error
<3> but where there should be widgets to launch a level... there arent :(
<4> ZenGyro, it has nothing to do with 'mac'. we just don't have any idea
<6> I was joking =p
<6> and, yeah, nobody knows whats wrong :/
<4> that's because your problem is really vague
<6> bascialy I use ttf to draw some text to the screen. Worked just fine and dandy. But I upgraded to the latest sdl, sdl_image, and sdl_ttf frameworks on my mac and now, for some reason, fonts just dont seem to get drawn to the screen
<6> I even tried the basic lazyfoo ttf font tutorial and that doesnt work any more either
<6> it compiles and everything though
<0> does the showfont testprogram that comes with sdl_ttf work ?
<6> never tried that
<6> let me see
<7> is this the place to ask about sdl_net, or is there a separate channel for that?
<3> I am curious if endianness issues could cause problems loading a PNG on a platform other than where it was created?
<5> Not really if you are using libpng.
<5> On the other hand it may require defines to handle only 32 bit aligned memory accesses.
<8> using visual c++ 2k5 with latest libsdl... linking with /MD, getting error about missing entry point, followed directions on website to include SDL_main.h, link against sdlmain.lib, use extern "C" int main(...) etc. still says the same thing, i force it with /ENTRY:main or _main and the app dies at startup with runtime error... any ideas?
<8> tried using both int main() and int __stdcall WinMain() { SDL_SetModuleHandle(hinst); ... }
<3> anyone here play, or more importantly compile, enigma?
<9> I'm sure some people in #gentoo compiled enigma.
<3> heh
<3> good bet
<10> hi
<10> i'm trying to use sdl_ttf, i'm using the lesson7 of the "lazy's foo production" tutorial. but when i'm doing a ttf_rendertext_solid(), i got an error (returns < 0) and ttf_geterror returns nothing
<10> any idea ?
<11> Did you init stuff, and open a font?
<10> yes i've done a ttf_init()
<10> and a ttf_openfont
<10> which both return 0
<10> ah
<10> apparently my text was not good
<10> at least it works on a small simple text
<10> more precisely it doesn't work when there are spaces inside the text, strange no ?
<10> (i'm using sdl-ttf 2.0.8)
<12> which SDL_PixelFormat members are endian dependent?
<4> hmm, that's a really good question.
<12> sadly I don't have a big endian machine to do any tests
<4> I believe, but don't quote me on this, that the *loss, *shift, and *mask members are endian dependent.
<4> possibly colorkey and alpha, too. I can't say for sure.
<12> that would mean the byte order in the pixel data itsself is always the same
<12> alpha can't be endian dependent, it's a 8 bit value :-)
<4> most (all?) big endian archs reverse the *bit* order also, I believe.
<13> the bitorder is reverded if you read a 32bit word, but the byte order should be the same yeh
<4> ahh, yeah. I didn't think that one through all the way :P
<12> according to Wikipedia, endianness only affects byte order
<12> not bit order
<0> what would an easy rule like that be without a couple of exceptions ?
<12> SDL_ConvertSurface takes a SDL_PixelFormat struct, while SDL_CreateRGBSurface takes only some mask parameters
<12> who designed that API?
<12> and how do can I make SDL to calculate the missing values for the SDL_PixelFormat members?
<13> sdl fills out the rest of the pixelformat itself from the masks by bitscanning them
<12> like: "SDL_Surface* s = SDL_CreateRGBSurface(flags, 0, 0, bits, mask_r, ..., mask_a); SDL_ConvertSurface(source, s->format, flags);"
<12> Harekiet: ah good, seems to be not documented
<12> Harekiet: I guess it does it for loss/shift
<13> yeh
<13> could have been nice if they added a sdl_makeFormat call but okay :)
<12> the SDL API seems to be a bit hacky
<13> hehe it seems to work :)
<4> Is there an elegant way to get the mouse coordinates from an SDL function when using the OpenGL coordinate system?
<4> IE: when the mouse is in the top left corner, the function would report X and Y as -1.0 and 1.0 respectively.
<12> yes, take the final OpenGL translation matrix, invert it, and then mulitply the matrix with the mouse coordinates vector
<12> oh, then why not (float)mouse_x / windows_width ?
<4> which way you've suggested would be the most efficient?
<12> the second one... the first one would just be useful to translate screen coordinates to scene coordinates


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #sdl
or
Go to some related logs:

php6 preg_match
#suse
fluxbox and aplets
#suse
use EOT in php
#mysql
ascii2hex javascript
#bash
toshiba m70 109 with ubuntu
#debian



Home  |  disclaimer  |  contact  |  submit quotes