<div dir="ltr">To check it, you can test lastVerseIDs.Count() > 0<br>Also, I prefer using an explicit GetElement as is currently used, rather than c++ operator overloading magic - especially in assignment. <br><br clear="all">
God Bless,<br>Ben<br>-------------------------------------------------------------------------------------------<br>The Lord is not slow to fulfill his promise as some count slowness,<br>but is patient toward you, not wishing that any should perish,<br>
but that all should reach repentance.<br>2 Peter 3:9 (ESV)<br>
<br><br><div class="gmail_quote">On Thu, Sep 4, 2008 at 11:59 AM, DM Smith <span dir="ltr"><<a href="mailto:dmsmith555@yahoo.com">dmsmith555@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="">osis2mod does not validate that the document is valid OSIS. Rome is not a valid osisID.<div><br></div><div>On another note. I am fixing bugs in osis2mod right now and if you can explain how to ensure the validity of the verse list, I'd appreciate that.</div>
<div><br></div><div>The code below didn't work anyway.</div><div><br></div><div>I'm changing that code to something like:</div><div>lastVerseIDs = TOP;</div><div>*currentVerse = lastVerseIDs;</div><div><br></div><div>
In Him,</div><div><span style="white-space: pre;">        </span>DM</div><div><div></div><div class="Wj3C7c"><div><br><div><div>On Sep 3, 2008, at 7:30 PM, Ben Morgan wrote:</div><br><blockquote type="cite"><div dir="ltr"><div>Change Rome throughout the document to Rom and it will work. <br>
<br>osis2mod doesn't seem to ensure the validity of verselists it gets, and so crashes on the last line below (where it tries to get the first element of an empty list key):<br> </div><span style="font-family: courier new,monospace;"> lastVerseIDs = currentVerse->ParseVerseList(keyVal, *currentVerse, true);</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"> <span style="font-family: courier new,monospace;"> // set currentVerse to the first value in the keyVal</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> VerseKey *element = SWDYNAMIC_CAST(VerseKey, lastVerseIDs.GetElement(0));</span><br> <br><br clear="all">God Bless,<br>Ben<br>-------------------------------------------------------------------------------------------<br>
The Lord is not slow to fulfill his promise as some count slowness,<br>but is patient toward you, not wishing that any should perish,<br> but that all should reach repentance.<br>2 Peter 3:9 (ESV)<br> <br><br><div class="gmail_quote">
On Thu, Sep 4, 2008 at 2:09 AM, Sebastien Koechlin <span dir="ltr"><<a href="mailto:seb.sword@koocotte.org" target="_blank">seb.sword@koocotte.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi<br> <br> On Sat, Aug 02, 2008 at 04:33:41PM -0700, Mico Siahaan wrote: I am new in<br> <div>> making SWORD modules. I tried to use osis2mod to convert a OSISBible<br> > format text to SWORD modules, but I got error message: osis2mod.exe has<br>
> encountered a problem and needs to close. We are sorry for the<br> > inconvenience.<br> <br> </div>I do not have any problem with your file, using sword 1.5.9 and sword 1.5.10<br> on Linux, and your file looks well-formed and valid XML.<br>
<br> BUT, with sword 1.5.11, I also have a segfault on your file.<br> <br> Starting program: /usr/local/bin/osis2mod1511 /tmp/ indTB.xml -z<br> warning: Lowest section in /usr/lib/libicudata.so.36 is .hash at 000000b4<br>
[Thread debugging using libthread_db enabled]<br> [New Thread 16384 (LWP 22144)]<br> You are running osis2mod: $Rev: 2169 $<br> <br> Program received signal SIGSEGV, Segmentation fault.<br> [Switching to Thread 16384 (LWP 22144)]<br>
0x0804e5e6 in handleToken ()<br> (gdb) bt<br> #0 0x0804e5e6 in handleToken ()<br> #1 0x0804f747 in main ()<br> (gdb)<br> <br> I do not have any segfault with other OSIS files.<br> <font color="#888888"><br>
--<br> Sébastien Koechlin<br> <br> _______________________________________________<br> sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a><br> <a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page<br> </font></blockquote></div><br></div> _______________________________________________<br>sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>Instructions to unsubscribe/change your settings at above page</blockquote></div>
<br></div></div></div></div><br>_______________________________________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page<br></blockquote></div><br></div>