[sword-devel] BibleTime or Sword crashes on startup on Mac OS X

Joachim Ansorg sword-devel@crosswire.org
Wed, 19 Feb 2003 19:58:17 +0100


--Boundary-00=_JP9U+QXG8mxwOyj
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi!
Strange.

Seems it's nothing related to locale stuff.
I attached new version of the localetest program. Could you please send me the 
new output?

Do you use Sword's CVS? If you don't, could you please get it and compile it? 
This way we have the same source code on disk to talk about and to test with.

Is there somewhere a list on differences between Linux and Mac OS X C++ stuff? 
E.g. list of valid ranges of char, int etc.?

Since I have no idea of endianess and plattform stuff this could get a hard 
job.

I hope we can get Sword and BibleTime running on Mac OS X.

Thanks,
Joachim

> Hi, Joachim
>
> localetest outputs:
>
> Jakobus 1:19 (should be Jakobus 1:19)
> Johannes 1:1 (should be Johannes 1:1)
> Calling setDefaultLocaleName("de") now
> Create key2 now
> Setting en locale now
> Calling ParseVerseList now
> Bus error
>
> On Sunday, February 16, 2003, at 09:19  AM, Joachim Ansorg wrote:
> > Hi!
> > Your output of localetest looked wrong. Could you please copy the
> > attached
> > file to sword-source-dir/tests/ and call make then?
> >
> > Please send me the new output of localetest afetr you called make. I
> > hope this
> > shows me bit more what's wrong.
> >
> > On my side it looks like this:
> > ---
> > Jakobus 1:19 (should be Jakobus 1:19)
> > Johannes 1:1 (should be Johannes 1:1)
> > Calling setDefaultLocaleName("de") now
> > Create key2 now
> > Setting en locale now
> > Calling ParseVerseList now
> > Lukas 3:23
> > Finished.
> > ---
> >
> > Thanks,
> > Joachim
> > --
> > Joachim Ansorg
> > www.bibletime.info
> > joachim.ansorgs.de<localetest.cpp>
>
> _______________________________________________
> sword-devel mailing list
> sword-devel@crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel

-- 
Joachim Ansorg
www.bibletime.info
joachim.ansorgs.de
--Boundary-00=_JP9U+QXG8mxwOyj
Content-Type: text/x-c++src;
  charset="iso-8859-1";
  name="localetest.cpp"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="localetest.cpp"

#include <localemgr.h>
#include <versekey.h>
#include <swkey.h>
#include <swmgr.h>
#include <iostream>
#ifndef NO_SWORD_NAMESPACE
using namespace sword;
#endif
using std::cout;
using std::endl;

int main(int argc, char **argv) {
	SWMgr::debug = true;
	LocaleMgr localeMgr;

	char c;
	cout << "Some misc tests: " << endl;
	c = 1;
	cout << "\t(char)1 is " << c << " with value " << (int)c << " and bool value " << (bool)c<< endl;
	c = 0;
     	cout << "\t(char)1 is " << c << " with value " << (int)c << " and bool value " << (bool)c<< endl;

	VerseKey key1;
	key1 = "James 1:19";

	key1.setLocale("de");
	cout << "VerseKey tests" << endl;
	cout << "\t" << key1 << " (should be Jakobus 1:19)" << endl;
	
	key1 = "Johannes 1:1";
	cout << "\t" << key1 << " (should be Johannes 1:1)" << endl;

	cout << "\tCalling setDefaultLocaleName(\"de\") now" << endl;
	LocaleMgr::systemLocaleMgr.setDefaultLocaleName("de");
	
	cout << "\tCreate key2 now " << endl;
	VerseKey key2;
	
	cout << "\tSetting en locale now" << endl;
	key2.setLocale("en");

	cout << "Testing ListKey functionality" << endl;
	cout << "\tCreating listkey" << endl;
	ListKey lk;
	
	cout << "\tAdding some keys using <<" << endl;
	lk << VerseKey("John 3:16-87");
	lk << SWKey();
	lk << ListKey();
	
	cout << "\tGetting Count" << endl;
	cout << "\t" << lk.Count() << endl;
	
	lk.setPosition( TOP );
	while ( lk.GetElement() ) {
		cout << "\tKey " << lk.Index() << " is " << lk.GetElement() << endl;	
		lk.increment(1);
	};

	cout << "\tCalling ClearList now" << endl;
	lk.ClearList();
	

	cout << "Calling ParseVerseList now " << endl;
	ListKey list = key2.ParseVerseList("Luke 3:23-28; John 3:16; Exodus",key2, true);
	
	cout << "\tParsing finished" << endl;
	cout << "\t" << list.getRangeText() << endl;

	cout << "Finished."<< endl;
}

--Boundary-00=_JP9U+QXG8mxwOyj--