| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Comments:
<0> we're here because we share an interest in c++ <1> who knows <1> lol <0> if some people get helped along the way, that's great <1> anw thank u <2> anw = ? <0> that's moron for and, i think <0> moron, or teenager <0> pretty much synonymous <2> aye <0> the nice thing about not working at ms any more: i can be rude <2> heh <0> at least, i couldn't be when irc'd from work <2> yeah <1> how do i anable my cookies ? <3> Cookies::Enable();
<4> clsk: Anable() actually <1> ? <0> Metallica-> how do i anable my cookies ? <0> hahaha <5> hello i have problem <6> Viagra. <5> i am trying to do memcpy's from one member buffer to another, it crashes the program. the only way to fix is to declare cl*** as static, or declare pointer to cl*** and put into memory manually <5> any way i can fix? <5> maybe from within cl*** constructor? <0> you lost me at hello <5> what don't you understand <5> if i make instance of cl*** from main, is placed on the stack, no? <6> csboy: you're probably calling the method through an instance that's wrong <6> (yes) <0> i ***ume it's crashing with an access violation, you need to ensure a few things: 1) the destination for memcpy is allocated, 2) the destination is large enough to receive the data to be copied, and 3) the source is allocated, and 4) the source is also large enough for the copy <5> i think memcpy where src=stack and dest=stack is bad, because works when is placed into memory via pointer from main <2> csboy why don't you just show us your bad code <6> Using a pointer doesn't "place it into memory" <6> And memcpy from stack to stack is fine <0> stack or heap is irrelevant with respect to memcpy <5> so what is wrong then <0> error: insufficient data <0> rdragon suggested the best approach: perhaps you could cut out the relevant sections of code and put it on the paste site <5> memcpy(&(x.data[i][TS_idx][0]),&(y.data[i][0]),sizeof(float)*SAMPLE_RATE); where x and y are both members <0> usually experienced developers can spot defects pretty easily <0> oh yikes <5> any idea <0> ***uming x, and y are the same type, you appear to be indexing into a three dimensional array on one, and indexing into a two dimensional array on the other, intentional? <5> x and y are not of same type, howver src and dest are <0> that sound is my brain blue screening <7> is there some particular reason you want to use memcpy? <8> Now that's an ugly memcpy, so ugly I got disconnected <7> lol <0> heh <5> no, open to alternatives. we're refactoring <8> Maybe you could use C++ <5> heh <9> bye all <7> so you're copying a slice from one array to another <5> yes <7> are you doing a lot of multi-dimensional array math, etc? <5> none at all <7> but you play w/ a gazillion floats in a 3d array <7> and no math <7> amazing <5> as i say, it is legacy code that we are refactoring <5> i'm still learning it myself.; <5> a man here says that it is because the instance of the cl*** is on the stack, and thus "memcpy" is unable to copy from stack to stack when src and dest are both members. <7> well, if I don't know what it's doing, it's impossible for me to suggest any refactoring <7> "a man" is full of **** <5> haha <7> and "what is because"? <5> ok, as it stands now, end user of cl*** cannot simply instantiate willy nilly, it must be declared static and thus i lose permissions in distributed env., or must use pointer and put into mem. manually <2> have he showed us the code yet? <7> have you personally chased down the bug <7> and what platform are you playing on? <5> the bug is the usage of mem copy between members ... it works when members are made global. <5> win32 <2> that's a horrible bug report <7> csboy I don't believe you (that the problem is the mem ocpy) <7> err, copy
<7> I would beleive that you're copying over the end of the space you have allocated...and it doesn't **** up the stack when you do, so you're not noticing <5> why does it work when members are taken out of cl*** and made global, then? <7> because it doesn't **** up your stack <7> when you **** up by copying too much info <5> so globals are not put on the stack? <2> csboy when are you going to show us some actual goddamn code? <5> rdragon scroll up <7> csboy you catch on quick <5> heh, i'm young <2> I see one line, that doesn't make anything clear as far as what's what <2> why are you employed there? <7> so I suggest as strongly as possible that you get in the ****ing debugger and see where it crashes <5> experienced enough to pound my way through but not a guru by any means <7> you're using VS <7> ?? <5> yes <7> hopefully 8, but at least 7? <2> probably 6 <5> heh ... of course not. company is not concerned with quality of tools ... is 6 <2> you're not throwing us any bones here, csboy <7> they must not be concerned w/ the quality of the product either <5> is prototype, still in r&d <7> why the **** are they refactoring w/ a PoS compiler? <7> there's too much stuff that doesn't work <2> char one[20]; char two[20]; memcpy( two, one, 20 ); //this works just fine <5> why do you question my employment rdragon, company gets what company pays for <7> this is brand new code and you guys are using VC++6.0 ?? <5> no its old **** <7> is prototype, still in r&d <7> or so you said <0> 8 year prototype <2> csboy because it seems you lack simple debugging skills, and are comfortable making obscure claims like 'memcpy doesn't work with stack memory' <7> rdragon to be fair, he's repeating a claim by someone else <5> i have no debugging skill, tell me how <5> :-) <2> but he considered the claim long enough to p*** it to us <7> geezus, it's been 4 years since I was forced to play with vs6.0 <10> given what I understand of the situation I'd run the code through vc8 and watch the compiler go mental <7> I don't remember where the "catch all exceptions" stuff is <2> csboy if you would show us some code that shows the problem in action, we might be able to tell you what you're doing wrong <5> ok, i can't supply full source, let me see if i can reproduce in smaller scale ... <2> thats a step in debugging - in doing that, you may discover the problem <2> (on your own) <7> csboy but simply running a debug version from the IDE and seeing where/why it crashes would be a good thing <5> is displays ***embly though <5> *it <7> it displays source if you have it <2> or if you walk up the callstack <2> (to somewhere that you do have source) <6> It probably displays ***embly of memcpy <6> Note that 30 minutes ago: <6> [20:52.28] <6> csboy: you're probably calling the method through an instance that's wrong <6> Since you've said making it static fixes the issue <0> i honestly believe that web developers who make flash only websites should be shot repeatedly in the head <7> peterhu you're far too kind <7> once, small caliber, in each kidney <0> indeed <7> and then maybe read them some Vogon poetry <0> or lock them in a room with no windows and no ventilation with JBlitzen <7> the U.S. Constitution protects them from that <2> explicitly <0> stupid 59th amendment <0> think i'll grab some soup and sandwich on this windy day, bbl <11> yeah, that is annoying <11> you want to send a link to someone and can't <0> hmm, before i leave, i must utter this ponderance: why, in a listerine commercial, does everyone pour the listerine into a cup of some sort prior to putting it in their mouth? <11> helly hansen did this <11> obnoxious. <11> I do that peterhu <0> it's an *antiseptic*! drink it from the bottle you weirdos <11> I fill up the cap <11> I don't know why <11> to measure it out I guess. <2> looks more elegant for the commercial instead of drinking out of a bottle, i guess
Return to
#c++ or Go to some related
logs:
#linux www.hyperactiv.ro #AllNiteCafe mirc romnesc #teens resize SCSI raid 1 with gparted cool_teenager_21 #AllNiteCafe deschide port route add -host #java
|
|