Page 1 of 1

mesher.exe problems

Posted: Sat Feb 27, 2010 8:41 pm
by w03
When I use the command obc on mesher, it gives me an error message that says: The NTVDM CPU has encountered an illegal instruction. CS:11f3 IP:0221 OP:63 74 73 0d 0a Choose 'Close' to terminate the application.

What is going on?

By the way, I'm running it on Windows Vista with blender created obj + mtl files.

Re: mesher.exe problems

Posted: Sat Feb 27, 2010 10:24 pm
by pheonixstorm
can you zip the file you have the error on and point me to the mesher download so I can try and debug it?

Re: mesher.exe problems

Posted: Wed Mar 03, 2010 4:33 pm
by chuck_starchaser
I noticed a bug with mesher when working in Ubuntu, whereby it sometimes adds an empty

Code: Select all

       ="" 
along with the list of textures and all that, as it appears after converting to xmesh.
If you miss it and it stays there, when you try to convert back to obj it segfaults. You have
to remove the ="" manually from the xmesh file before doing anything else.

Re: mesher.exe problems

Posted: Wed Mar 03, 2010 4:59 pm
by klauss
Please, make a ticket.

Although I won't be able to look into any ticket this weekend, so if you want to inspect it yourself, you'll find the code that generates the xml around here.

Re: mesher.exe problems

Posted: Thu Mar 04, 2010 12:00 am
by charlieg
I always thought mesher.exe was a candidate for a rewrite in Python...

I actually had a hunt for the cpp source the other day. It's hard to find. (Any hints?)

Re: mesher.exe problems

Posted: Thu Mar 04, 2010 12:10 am
by chuck_starchaser
Ticket filed. #16
Don't understand much in that code, but this stood out in my eyes,

Code: Select all

  250                 if (texindex)
  251                     if (isxmesh)
  252                         fprintf( Outputfile, "%d", texindex );
  253                 if (isxmesh)
  254                     fprintf( Outputfile, "=\"%s\" ", texname.c_str() );
If textname was empty, it would print ="" it seems to me. I see not test for texname, but maybe I missed it.
As for there being nothing before the equal, that could happen if isxmesh is true, but texindex is null.
So, maybe the intent was that this should go like,

Code: Select all

if( texindex && isxmesh && !texname.is_empty() )
    fprintf( Outputfile, "%d=\"%s\" ", texindex, texname.c_str() );
Ehm... %d, that's a number... Never mind; I've no idea.

Re: mesher.exe problems

Posted: Thu Mar 04, 2010 2:47 am
by klauss
I think you're close.

Take a look at line 235, the switch(textype). If textype doesn't match anything (ie: it's the technique :shock: ), then it won't output the name of the attribute that will be written at line 252.

I believe there should be a default: that bails out with an error. And the TECHNIQUE kind added to the switch, of course.

Sorry I don't have time to do it (and test it) myself. I'm preparing for a trip and I thought I'd check the forum first.

Re: mesher.exe problems

Posted: Thu Mar 04, 2010 3:13 am
by chuck_starchaser
No problem; I'll try and see if I can fix it. Either way, have a good trip! :D

Re: mesher.exe problems

Posted: Thu Mar 04, 2010 4:11 am
by chuck_starchaser
Alright, w03, if you're still around, try svn up and make again; see if it works now.

Ooops! You're on Windows... Pheonix, can you build mesher?

Re: mesher.exe problems

Posted: Fri Mar 05, 2010 1:19 am
by w03
Finally back on again! Anyway, I found a temporary solution to the problem, as when I run obj + mtl files, mesher automatically converts them to bfxm and saves it as output.bfxm in generatedbsp. I'll try methods suggested here to get a more convenient solution, however. Thanks!

Re: mesher.exe problems

Posted: Sun Apr 04, 2010 3:15 am
by chuck_starchaser
There's a mesher binary for windows, now, that shenle compiled; it's in /trunk/win32/.
But if you svn co /win32 it will try to pull all of data on you; so I'd advice that you
check-out /trunk/win32/mesher.exe explicitly.
There's also a new vegastrike.exe there; I'd imagine you're using that one, already?
Well, perhaps not; you'd need to check out svn data head to work with that.