[Therion] Weird Error

2005-12-21 Thread Stacho Mudrak
> Hello
> 
> I have two scraps that are in the same th2 file and in the map editor the
> walls end at the same point, however one of the walls is -subtype invisible.
> Using the join command it seems to ignore the invisible wall and join to the
> next closest visible wall. This is very annoying. Is it deliberate?

Invisible walls are usually used to define outline of the scrap 
correctly. If you join two scraps, invisible walls are ignored. You 
should join at the level of line points.

But if two scraps have common end wall points in one .th2 file, they 
should be joined automatically correctly. Did you tried to comment out 
this join command? It should help, if I understand your situation correctly.

If removing this join does not help, are you able to isolate this error 
and send the source, that we can try? Or a simple image could help too.

Thanks, S.




[Therion] Weird Error

2005-12-20 Thread Andrew Atkinson


Hello

I have two scraps that are in the same th2 file and in the map editor the
walls end at the same point, however one of the walls is -subtype invisible.
Using the join command it seems to ignore the invisible wall and join to the
next closest visible wall. This is very annoying. Is it deliberate?

Andrew

> -Original Message-
> From: therion-bounces at speleo.cz [mailto:therion-bounces at speleo.cz] On
> Behalf Of Olly Betts
> Sent: 20 December 2005 19:13
> To: therion at speleo.sk; Stacho Mudrak
> Subject: Re: [Therion] Weird Error
> 
> On Tue, Dec 20, 2005 at 05:28:01PM +, Wookey wrote:
> > I've just uploaded a new version to debian with this patch included,
> which
> > should help Debian users on 64-bit arches (although maybe we don't
> > actually have any apart from Olly as no-one has complained about this
> yet)
> 
> I'm actually running Ubuntu on the 64-bit box, but that's mostly Debian
> underneath of course.
> 
> I just tried hacking all the "-extend" stuff out of the example I found
> before and with the patch I can produce a pdf file.  So that's a good
> start, though there must be code paths I didn't exercise so it's
> possible there are other 64 bit issues.
> 
> Cheers,
> Olly
> ___
> Therion mailing list
> Therion at speleo.cz
> http://www.speleo.cz/mailman/listinfo/therion
> 
> 
> 
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.371 / Virus Database: 267.14.1/207 - Release Date: 19/12/2005
> 
> 
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.371 / Virus Database: 267.14.1/207 - Release Date: 19/12/2005
> 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.1/207 - Release Date: 19/12/2005





[Therion] Weird Error

2005-12-20 Thread Olly Betts
On Tue, Dec 20, 2005 at 05:28:01PM +, Wookey wrote:
> I've just uploaded a new version to debian with this patch included, which
> should help Debian users on 64-bit arches (although maybe we don't
> actually have any apart from Olly as no-one has complained about this yet)

I'm actually running Ubuntu on the 64-bit box, but that's mostly Debian
underneath of course.

I just tried hacking all the "-extend" stuff out of the example I found
before and with the patch I can produce a pdf file.  So that's a good
start, though there must be code paths I didn't exercise so it's
possible there are other 64 bit issues.

Cheers,
Olly



[Therion] Weird Error

2005-12-20 Thread Wookey
+++ Olly Betts [05-12-14 09:08 +]:
> Really, the underlying bug (presumably an assumption that sizeof(long)
> == 4 or sizeof(void*) == sizeof(int) or similar) needs fixing.
> 
> Here's a patch which at least gets us some way along that road.  It may
> even be a complete fix - the therion project I had to hand goes from
> dying with the error Philip reported to complaining that it doesn't know
> about "left" which could just be because it's too old.  I don't really
> have time to dig deeper right now.

I've just uploaded a new version to debian with this patch included, which
should help Debian users on 64-bit arches (although maybe we don't
actually have any apart from Olly as no-one has complained about this yet)

It will filter through to the testing distribution in about 2 weeks time.

Wookey
-- 
Aleph One Ltd, Bottisham, CAMBRIDGE, CB5 9BA, UK  Tel +44 (0) 1223 811679
work: http://www.aleph1.co.uk/ play: http://www.chaos.org.uk/~wookey/



[Therion] Weird Error

2005-12-14 Thread Stacho Mudrak
Quoting Olly Betts :
> A couple of hours ago I sent a patch which improves matters, and may
> even fix them.  But the list seems to have eaten it.

I received all the mails now - even the first one with attachement. Thanks. I
will aply it and we will see, whether it helps.

> If that doesn't fully fix it, I have an x86_64 linux machine, so can
> dig further when I have a spare moment.

Thanks again, S.



[Therion] Weird Error

2005-12-14 Thread Olly Betts
On Wed, Dec 14, 2005 at 10:10:58AM +, Wookey wrote:
> +++ Philip Balister [05-12-13 16:53 -0500]:
> > You should spend some time and figure out why it doesn't work for 64 
> > bits. 
> 
> Seconded. What we have so far is a workaround, not a fix. Few of us
> currently have access to 64bit machines, but they are rapidly becoming more
> common. Finding out what problem therion has is well worth spending
> some time on.

A couple of hours ago I sent a patch which improves matters, and may
even fix them.  But the list seems to have eaten it.  Perhaps it's
set to reject attachements, or a spam filter doesn't like them or
something.

Anyway, it's here:

http://www.survex.com/~olly/therion-0.3.9-64bit.patch

If that doesn't fully fix it, I have an x86_64 linux machine, so can
dig further when I have a spare moment.

Cheers,
Olly



[Therion] Weird Error

2005-12-14 Thread Wookey
+++ Philip Balister [05-12-13 16:53 -0500]:
> You should spend some time and figure out why it doesn't work for 64 
> bits. 

Seconded. What we have so far is a workaround, not a fix. Few of us
currently have access to 64bit machines, but they are rapidly becoming more
common. Finding out what problem therion has is well worth spending
some time on.

There are 64bit binaries built for debian, and developer accessible
machines, so I could help with debugging there if necessary (but I am really
overloaded with things to do already so I will struggle to allocate much
time to this, but the facility is there, and I do want to know if the 64 bit
debian Therion [packages are actually broken).

Can you (philip S) post the offending dataset, (or will any dataset do?)

Wookey
-- 
Aleph One Ltd, Bottisham, CAMBRIDGE, CB5 9BA, UK  Tel +44 (0) 1223 811679
work: http://www.aleph1.co.uk/ play: http://www.chaos.org.uk/~wookey/



[Therion] Weird Error

2005-12-14 Thread Olly Betts
On Wed, Dec 14, 2005 at 07:47:42AM +0100, Stacho Mudrak wrote:
> Quoting Philip Schuchardt :
> > Just add -m32 option to the compiler and linker flags.
> 
> Great, thanks a lot. We will add it soon.

This is really a workaround rather than a fix - it assumes you've got a
multilibbed compiler and all the required libraries compiled as 32 bit.
So it won't even work for all x86_64 Linux users, let alone other 64
bit platforms which don't have a 32 bit mode.

Really, the underlying bug (presumably an assumption that sizeof(long)
== 4 or sizeof(void*) == sizeof(int) or similar) needs fixing.

Here's a patch which at least gets us some way along that road.  It may
even be a complete fix - the therion project I had to hand goes from
dying with the error Philip reported to complaining that it doesn't know
about "left" which could just be because it's too old.  I don't really
have time to dig deeper right now.

Cheers,
Olly
-- next part --
diff -ru therion-0.3.9-orig/thexpmodel.cxx therion-0.3.9/thexpmodel.cxx
--- therion-0.3.9-orig/thexpmodel.cxx   2005-05-12 21:03:46.0 +0100
+++ therion-0.3.9/thexpmodel.cxx2005-12-14 08:48:58.800754176 +
@@ -1362,7 +1362,7 @@
   sptr = (thsurvey*)(*obi);
   if (sptr->num1 > 0) {
 sptr->num1 = survnum++;
-fprintf(pltf,"S %d %d %s\n", sptr->num1, (sptr->fsptr != NULL) ? 
sptr->fsptr->num1 : -1, sptr->name);
+fprintf(pltf,"S %ld %ld %s\n", sptr->num1, (sptr->fsptr != NULL) ? 
sptr->fsptr->num1 : -1, sptr->name);
 if (strlen(sptr->title)) {
   fprintf(pltf,"C %s\n", sptr->title);
 }
@@ -1379,7 +1379,7 @@
 if (stnum[i] > 0) {
   stnum[i] = survnum;
   pst = &(dbp->db1d.station_vec[i]);
-  fprintf(pltf,"T %d %d %s %.3f %.3f %.3f G%s%s%s\n", survnum, 
pst->survey->num1, pst->name, pst->x, pst->y, pst->z, (pst->flags & 
TT_STATIONFLAG_ENTRANCE) != 0 ? "E" : "", (pst->flags & TT_STATIONFLAG_FIXED) 
!= 0 ? "F" : "", (pst->flags & TT_STATIONFLAG_CONT) != 0 ? "C" : "");
+  fprintf(pltf,"T %ld %ld %s %.3f %.3f %.3f G%s%s%s\n", survnum, 
pst->survey->num1, pst->name, pst->x, pst->y, pst->z, (pst->flags & 
TT_STATIONFLAG_ENTRANCE) != 0 ? "E" : "", (pst->flags & TT_STATIONFLAG_FIXED) 
!= 0 ? "F" : "", (pst->flags & TT_STATIONFLAG_CONT) != 0 ? "C" : "");
   if (pst->comment != NULL) {
 fprintf(pltf,"C %s\n", pst->comment);
   }
@@ -1392,7 +1392,7 @@
   tlegs = dbp->db1d.get_tree_legs();
   for(i = 0; i < nlegs; i++, tlegs++) {
 if ((*tlegs)->survey->is_selected()) {
-  fprintf(pltf,"H %d %d %d G%s%s\n", 
+  fprintf(pltf,"H %ld %ld %ld G%s%s\n", 
   stnum[(*tlegs)->leg->from.id - 1],
   stnum[(*tlegs)->leg->to.id - 1],
   (*tlegs)->survey->num1,
@@ -1416,7 +1416,7 @@
 case TT_SURFACE_CMD:
   tmp3d = ((thsurface*)(*obi))->get_3d();
   if ((tmp3d != NULL) && (tmp3d->nfaces > 0)) {
-fprintf(pltf,"X 1 %d\n", ((thsurface*)(*obi))->fsptr->num1);
+fprintf(pltf,"X 1 %ld\n", ((thsurface*)(*obi))->fsptr->num1);
 tmp3d->exp_shift_x = 0.0;
 tmp3d->exp_shift_y = 0.0;
 tmp3d->exp_shift_z = 0.0;
@@ -1447,7 +1447,7 @@
 d3d->exp_shift_x = 0.0;
 d3d->exp_shift_y = 0.0;
 d3d->exp_shift_z = 0.0;
-fprintf(pltf,"X 0 %d\n", cs->fsptr->num1);
+fprintf(pltf,"X 0 %ld\n", cs->fsptr->num1);
 d3d->export_tlx(pltf);
   }
 }
diff -ru therion-0.3.9-orig/thtexfonts.cxx therion-0.3.9/thtexfonts.cxx
--- therion-0.3.9-orig/thtexfonts.cxx   2005-05-05 12:20:53.0 +0100
+++ therion-0.3.9/thtexfonts.cxx2005-12-14 08:49:29.025159368 +
@@ -147,7 +147,7 @@
 }

 string replace_all(string s, string f, string r) {
-  unsigned int found = s.find(f);
+  size_t found = s.find(f);
   while(found != string::npos) {
 s.replace(found, f.length(), r);
 found = s.find(f);


[Therion] Weird Error

2005-12-14 Thread Stacho Mudrak
Quoting Philip Schuchardt :

> Just add -m32 option to the compiler and linker flags.

Great, thanks a lot. We will add it soon.

S.



[Therion] Weird Error

2005-12-14 Thread Stacho Mudrak
Quoting Philip Schuchardt :
> Does anyone know how get therion to work with a debugger?  Currently, I have
> tried changing the Makefile to:

Just type:

make config-debug

and it should work. I replied you yesterday, no idea why the message did not
arrieved :(

S.



[Therion] Weird Error

2005-12-13 Thread Philip Schuchardt
On Tuesday 13 December 2005 5:17 pm, you wrote:
> On Monday 12 December 2005 9:18 pm, you wrote:
> > Maps compile fine on my 600 mhz P3 and my x86 notebook. They fail to
> > compile on my AMD64 box.
> >
> > therion 0.3.9
> > configuration file: thconfig
> > reading ... done
> > reading source files ... done
> > preprocessing database ... done
> > scanning centreline tree ... done
> > searching for centerline loops ... done
> > calculating station coordinates ... done
> > calculating basic statistics ... done
> > processing extended elevation ... done
> > processing references ... done
> > selecting export objects ... done
> > processing projection plan ... done
> > average distortion: 2.14%
> > writing walters_fold_cave_plan.pdf ...
> > therion: error -- unknown exception
> >
> > Using:
> > xtherion 0.3.9
> > Linux adrastea 2.6.13-gentoo-r3 #1 SMP Tue Nov 15 11:15:32 EST 2005
> > x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ AuthenticAMD
> > GNU/Linux
> >
> > Any ideas?
> >
> > Philip Schuchardt
>
> Does anyone know how get therion to work with a debugger?  Currently, I
> have tried changing the Makefile to:
>
> CXXPFLAGS = -O0 -g
> CCPFLAGS = -O0 -g
>
> And recompiling it. ddd(GUI gdb) still complains about (no debugging
> symbols found) and I can't look at the source or step through it.  Any
> ideas about getting a debugger to work with the source?
>
> Philip Schuchardt

Sweet! I fixed it. And it is fairly simple. This fix should fix the  therion: 
error -- unknown exception, which I was reporting earlier.

In the Makefile:
Just add -m32 option to the compiler and linker flags.  This will force gcc 
and g++ to compile the under 32 bit.  In my case it was compiling 64bit code 
due to my 64bit linux installation.  I guess therion doesn't run under 64bit 
at the moment. This fix shouldn't effect x86 users (I haven't test it 
though).  The fix works with 0.3.10 and it will probably work with 0.3.9 (I 
havent tested it).   Hopefully, this fix will be in the next version of 
therion. ;)

My modified makefile(Part):
# PLATFORM LINUX
CXX = g++
CC = gcc
POBJECTS =
#-DTHLINUX
CXXPFLAGS = -m32 #Change this line
CCPFLAGS = -m32 #Change this line
LDPFLAGS = -s -m32  #Change this line
THPLATFORM = LINUX
THXTHMKCMD = ./therion

Happy mapping!
Philip Schuchardt



[Therion] Weird Error

2005-12-13 Thread Philip Schuchardt
On Monday 12 December 2005 9:18 pm, you wrote:
> Maps compile fine on my 600 mhz P3 and my x86 notebook. They fail to
> compile on my AMD64 box.
>
> therion 0.3.9
> configuration file: thconfig
> reading ... done
> reading source files ... done
> preprocessing database ... done
> scanning centreline tree ... done
> searching for centerline loops ... done
> calculating station coordinates ... done
> calculating basic statistics ... done
> processing extended elevation ... done
> processing references ... done
> selecting export objects ... done
> processing projection plan ... done
> average distortion: 2.14%
> writing walters_fold_cave_plan.pdf ...
> therion: error -- unknown exception
>
> Using:
> xtherion 0.3.9
> Linux adrastea 2.6.13-gentoo-r3 #1 SMP Tue Nov 15 11:15:32 EST 2005 x86_64
> AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ AuthenticAMD GNU/Linux
>
> Any ideas?
>
> Philip Schuchardt

Does anyone know how get therion to work with a debugger?  Currently, I have
tried changing the Makefile to:

CXXPFLAGS = -O0 -g
CCPFLAGS = -O0 -g

And recompiling it. ddd(GUI gdb) still complains about (no debugging symbols
found) and I can't look at the source or step through it.  Any ideas about
getting a debugger to work with the source?

Philip Schuchardt



[Therion] Weird Error

2005-12-13 Thread Philip Balister
You should spend some time and figure out why it doesn't work for 64 
bits. At least until you can go caving again :)

Philip

Philip Schuchardt wrote:
> On Tuesday 13 December 2005 5:17 pm, you wrote:
> 
>>On Monday 12 December 2005 9:18 pm, you wrote:
>>
>>>Maps compile fine on my 600 mhz P3 and my x86 notebook. They fail to
>>>compile on my AMD64 box.
>>>
>>>therion 0.3.9
>>>configuration file: thconfig
>>>reading ... done
>>>reading source files ... done
>>>preprocessing database ... done
>>>scanning centreline tree ... done
>>>searching for centerline loops ... done
>>>calculating station coordinates ... done
>>>calculating basic statistics ... done
>>>processing extended elevation ... done
>>>processing references ... done
>>>selecting export objects ... done
>>>processing projection plan ... done
>>>average distortion: 2.14%
>>>writing walters_fold_cave_plan.pdf ...
>>>therion: error -- unknown exception
>>>
>>>Using:
>>>xtherion 0.3.9
>>>Linux adrastea 2.6.13-gentoo-r3 #1 SMP Tue Nov 15 11:15:32 EST 2005
>>>x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ AuthenticAMD
>>>GNU/Linux
>>>
>>>Any ideas?
>>>
>>>Philip Schuchardt
>>
>>Does anyone know how get therion to work with a debugger?  Currently, I
>>have tried changing the Makefile to:
>>
>>CXXPFLAGS = -O0 -g
>>CCPFLAGS = -O0 -g
>>
>>And recompiling it. ddd(GUI gdb) still complains about (no debugging
>>symbols found) and I can't look at the source or step through it.  Any
>>ideas about getting a debugger to work with the source?
>>
>>Philip Schuchardt
> 
> 
> Sweet! I fixed it. And it is fairly simple. This fix should fix the  therion: 
> error -- unknown exception, which I was reporting earlier.
> 
> In the Makefile:
> Just add -m32 option to the compiler and linker flags.  This will force gcc 
> and g++ to compile the under 32 bit.  In my case it was compiling 64bit code 
> due to my 64bit linux installation.  I guess therion doesn't run under 64bit 
> at the moment. This fix shouldn't effect x86 users (I haven't test it 
> though).  The fix works with 0.3.10 and it will probably work with 0.3.9 (I 
> havent tested it).   Hopefully, this fix will be in the next version of 
> therion. ;)
> 
> My modified makefile(Part):
> # PLATFORM LINUX
> CXX = g++
> CC = gcc
> POBJECTS =
> #-DTHLINUX
> CXXPFLAGS = -m32 #Change this line
> CCPFLAGS = -m32 #Change this line
> LDPFLAGS = -s -m32  #Change this line
> THPLATFORM = LINUX
> THXTHMKCMD = ./therion
> 
> Happy mapping!
> Philip Schuchardt
> ___
> Therion mailing list
> Therion at speleo.cz
> http://www.speleo.cz/mailman/listinfo/therion
-- next part --
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3178 bytes
Desc: S/MIME Cryptographic Signature
URL: 



[Therion] Weird Error

2005-12-12 Thread Philip Schuchardt
Maps compile fine on my 600 mhz P3 and my x86 notebook. They fail to compile 
on my AMD64 box. 

therion 0.3.9
configuration file: thconfig
reading ... done
reading source files ... done
preprocessing database ... done
scanning centreline tree ... done
searching for centerline loops ... done
calculating station coordinates ... done
calculating basic statistics ... done
processing extended elevation ... done
processing references ... done
selecting export objects ... done
processing projection plan ... done
average distortion: 2.14%
writing walters_fold_cave_plan.pdf ...
therion: error -- unknown exception

Using:
xtherion 0.3.9
Linux adrastea 2.6.13-gentoo-r3 #1 SMP Tue Nov 15 11:15:32 EST 2005 x86_64 AMD 
Athlon(tm) 64 X2 Dual Core Processor 4400+ AuthenticAMD GNU/Linux

Any ideas?

Philip Schuchardt