Awesome, thanks! 

On Wed, Jan 13, 2021, 4:09 AM Christian Grün <christian.gruen@gmail.com> wrote:
Hi Daniel,

Thanks for writing to the list. Based on your input files, I managed
to reproduce the bug via a BaseX command script. It seems to occur if
ADDCACHE is enabled, and if a document is replaced in an empty
database.

I’ve created a new GitHub issues [1], we’ll fix this soon. Until then,
and if your input files are not huge, you should be safe if you
disable the addcache option.

Cheers,
Christian

[1] https://github.com/BaseXdb/basex/issues/1978



On Wed, Jan 13, 2021 at 12:27 AM Daniel Kaplan
<daniel.z.kaplan@gmail.com> wrote:
>
> Ah, my bad. That's all relevant questions.
>
> I do get an error, an OS "Bad File Descriptor" error. Tracing it up, there's a java "Array out of bounds" error.
> Notably, the same files can be inserted into a clean database using "ADD", but not "REPLACE".
> I didn't check if the files get added to an index.
>
> I don't believe there's an issue with the paths. I'll modified the paths to preserve private data..
> New file provided, and a stack trace file.
>
> I demonstrate code that's effectively identical, but the only difference is "ADD" vs "REPLACE", and cache vs not.
>
> There issue seems to be the files themselves, not adding from the folder vs not, since adding the folder vs the files directly doesn't change anything that I've noticed.
>
> Cheers, Daniel
>
> On Tue, Jan 12, 2021 at 6:14 PM Liam R. E. Quin <liam@fromoldbooks.org> wrote:
>>
>> On Tue, 2021-01-12 at 16:38 -0500, Daniel Kaplan wrote:
>> > Hello,
>> >
>> > I'm experiencing some issue(s) when using BaseX... wanted to report
>> > it
>> > here, but not sure what information you need.
>>
>> Imagine for a moment that it does not happen for anyone else...
>>
>> What exactly goes wrong, in detail? Is there an error message? Are
>> wrong vaues inserted into the database? Do your shoes fall off? Do the
>> files get added into the index? How did you determine that something
>> went wrong?
>>
>> There seems to be a missing double quote in your Python script, could
>> this be your error? And a space in "data/ /BadFileFolder" - try withut
>> having a space in the filename maybe?
>>
>> Liam
>>
>> --
>> Liam Quin, https://www.delightfulcomputing.com/
>> Available for XML/Document/Information Architecture/XSLT/
>> XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
>> Barefoot Web-slave, antique illustrations:  http://www.fromoldbooks.org
>>