Segmentation fault when loading a mesh

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
axtyax
Posts: 17
Joined: Sun Mar 31, 2013 3:16 pm

Re: Segmentation fault when loading a mesh

Post by axtyax »

ill try changing the path for sydney.md2 but shldnt it work 'cus sydney.md2 is it the same folder as the source.
axtyax
Posts: 17
Joined: Sun Mar 31, 2013 3:16 pm

Re: Segmentation fault when loading a mesh

Post by axtyax »

mybe the executable is not in the same folder?
axtyax
Posts: 17
Joined: Sun Mar 31, 2013 3:16 pm

Re: Segmentation fault when loading a mesh

Post by axtyax »

it wld help if u tell me the command for building with the console!
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Segmentation fault when loading a mesh

Post by Mel »

The path is relative to the executable, hence, if you don't provide a path, the first place to look for is where the executable is located.

And the console build command is normally make, but you have to create a makefile first for your programs
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
axtyax
Posts: 17
Joined: Sun Mar 31, 2013 3:16 pm

Re: Segmentation fault when loading a mesh

Post by axtyax »

well it wld really help if u told me how to find out where the executable is located when u build with code::blocks
axtyax
Posts: 17
Joined: Sun Mar 31, 2013 3:16 pm

Re: Segmentation fault when loading a mesh

Post by axtyax »

well, it returned -1, so what does that mean?
axtyax
Posts: 17
Joined: Sun Mar 31, 2013 3:16 pm

Re: Segmentation fault when loading a mesh

Post by axtyax »

so i moved the image to where the executable is but it still wont load.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Segmentation fault when loading a mesh

Post by Mel »

What returned -1?

You have to move the mesh file, not just the image. (so you found where your executable is)

And please, keep all your questions in single posts.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
axtyax
Posts: 17
Joined: Sun Mar 31, 2013 3:16 pm

Re: Segmentation fault when loading a mesh

Post by axtyax »

the program returned -1 when i ran it.
what do u mean by the mesh file?
it is only a .md2 program and a texture for it.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Segmentation fault when loading a mesh

Post by Mel »

Aren't you loading a mesh? that is your mesh, if the program exited with -1 it means something went wrong, though i can't tell what. Check the IDE documentation to know more in depth.

And read and study more about C, C++ and computers in general. If you have such errors, you sure are very, very, green in this to handle something like Irrlicht, or any programming library in general.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Segmentation fault when loading a mesh

Post by hybrid »

The main program will return whatever you tell it to return. So check the code where it says 'return -1' to see where it exits
axtyax
Posts: 17
Joined: Sun Mar 31, 2013 3:16 pm

Re: Segmentation fault when loading a mesh

Post by axtyax »

it does not say to return -1 in the code at all.
code::blocks is returning -1
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Segmentation fault when loading a mesh

Post by hybrid »

Most IDEs return the value the app returned.
Post Reply