this is so f*****g annoying!!!!

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
Guest

this is so f*****g annoying!!!!

Post by Guest »

hi!

i was just doing some coding and i have a very serious problem. my app crashes randomly. i even found the problem, but i dont know the hell why?!

i created a class called vector2d because i dont want to create 2 floats all the time (its not an irrlicht app, sdl+opengl). now when i pass it to functions like this for example: "doSomething(vector2d(0.0, 0.0));" the app crashes with a segmentation fault. when i do a "doSometing(new vector2d(0.0, 0.0));" and use vector2d as a pointer it does not crash. but thats a real ugly solution!!

now comes the best part:

when i use solution1 the app does not crash all the time. from 10 times i start it the app works (!!!) 1 time, so i dont know whats causing this.


the best thing is that i have another visual c++ project with the same classes and nearly the same code but it does not crash (i have another problem there lol, from 10 times i start the app i have 8 times no lighting, thats strange))


does someone of you can give me a hint what could cause the problem? or how such an error is caused, because i cant even search for solutions when i dont know what the hell is going on :/

ps: this is driving me crazy lol
Guest

Post by Guest »

found the problem.

it was more luck than knowledge, but after i kicked my own eventreceiver out suddenly ALL worked, no single error anymore. so my eventcode is _seriously_ wrong lol

see you!
Guest

Post by Guest »

wrong o.O""" i just pasted the event code back in and it still works, lol? how is that possible? its the exact same code but it works? i dont get it



edit: could a damaged system memory cause that? i had that *strange* problems a while ago with another code too and when i exchanged the names "armor" with "armor2" it worked o.O
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

maybe all you needed was a rebuild? removing the file then adding it back maybe somehow forced that?
Image
Guest

Post by Guest »

no i deleted all files (Debug and Release folders) before so that is not possible.

now, i tried for a few hours to "break" it again (yes, i actually tried to do that :D ) but its not possible. seems that it works now.

but for no reason. imagine this:

int add(int num1, int num2)
{
num1+num2;
return num1;
}

when i would do "add(1,2);" it would crash. now i just copy&paste that code to another location/rename the variables, and it works. (this was just an example) - very weird. i really think that this is a problem with my computer because otherwise i can not explain why it happens.

but it works now so i dont care anymore :) back to coding!


ps: i think i love opengl, its so much fun to learn things about it hehe
Maize
Posts: 163
Joined: Sat Oct 29, 2005 12:12 am
Location: In a cave...
Contact:

Post by Maize »

GFXstyLER wrote:ps: i think i love opengl, its so much fun to learn things about it hehe
Yeah I can seriously see what you are talking about. Anyway, this has to be the wierdest thread Ive ever seen. Keep making these, and I will keep laughing.
Guest

Post by Guest »

If you are using VS2003, then you need to do a periodic
"Clean" from the menu and rebuild. VS2003 is bad about
corrupting code as well. Don't just delete the debug or release
files, choose clean from the dropdown menu. And always make a
back-up copy of the project when using VS2003.
Guest

Post by Guest »

Anonymous wrote:If you are using VS2003, then you need to do a periodic
"Clean" from the menu and rebuild. VS2003 is bad about
corrupting code as well. Don't just delete the debug or release
files, choose clean from the dropdown menu. And always make a
back-up copy of the project when using VS2003.
thanks man! that could be really possible, since these problems only happen when i use visualc++ , i never had such problems with codeblocks or devc++ :)
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

I've never had that problem with Visual Studio. One time, we thought VIsual Studio was screwed up, because it would skip files we just checked out. But it turns out, our source control was putting timestamps on the files from the time they were modified before they were checked in, so when you check a file out at say 2PM, but it was checked in with a modification time stamp of 8AM, it got an 8AM time stamp on checkout, not 2PM. Anyways, the only weirdness I ever see in VS.NET 2003 is internal compiler errors, and if you just build again, everything is ok( and this only happens to me on our projects at work, which have over 2 million lines of code )
Image
FlyHigh
Posts: 111
Joined: Wed Mar 23, 2005 12:05 am

Post by FlyHigh »

GFXstyLER wrote: Imagine this:
int add(int num1, int num2)
{
num1+num2;
return num1;
}
When I imagine this my brain replies : "Term does not evaluate to a function" :wink:
Post Reply