Opened 6 years ago

Closed 6 years ago

#1078 closed Bug Report (fixed)

lilv doesn't read inline+external blocks correctly

Reported by: falkTX Owned by: David Robillard
Priority: major Component: Ingen
Keywords: Cc:

Description

(Sorry if the title is not correct, not sure how to put the issue...)

Consider the following ttl data:

	ingen:arc [
		ingen:head <Gain2x2/In1> ;
		ingen:tail <audio_port_1_in>
	] , [
		ingen:head <Gain2x2_1/In2> ;
		ingen:tail <Gain2x2/Out2>
	] , [
		ingen:head <Gain2x2/In2> ;
		ingen:tail <audio_port_2_in>
	] , _:b3 ,
	[
		ingen:head <audio_port_2_out> ;
		ingen:tail <Gain2x2_1/Out2>
	] , _:b5 ;

versus this data:

	ingen:arc _:b1 , _:b2 , _:b3 , _:b4 , _:b5 , _:b6 ;

The first case is how ingen is saving graphs right now, the 2nd case was hand-edited. (You can see the full file contents in the attachments)

What happens here is that lilv gets confused in the first case, and when it tries to load that section we get some weird results.

See the attached file for the full test case. On my system running the binary results in these messages:

get_pedalboard_info('./test-bad.pedalboard/') - START
Got connection:
        Source: Gain2x2/Out2
        Target: Gain2x2_1/In2
Got connection:
        Source: Gain2x2/Out1
        Target: Gain2x2_1/In1
Got connection:
        Source: Gain2x2_1/Out2
        Target: audio_port_2_out
Got connection:
        Source: audio_port_1_in
        Target: Gain2x2/In1
Got connection:
        Source: Gain2x2_1/Out1
        Target: Gain2x2/In2
get_pedalboard_info('./test-bad.pedalboard/') - END

get_pedalboard_info('./test-good.pedalboard/') - START
Got connection:
        Source: audio_port_2_in
        Target: Gain2x2/In2
Got connection:
        Source: Gain2x2_1/Out2
        Target: audio_port_2_out
Got connection:
        Source: Gain2x2_1/Out1
        Target: audio_port_1_out
Got connection:
        Source: Gain2x2/Out2
        Target: Gain2x2_1/In2
Got connection:
        Source: Gain2x2/Out1
        Target: Gain2x2_1/In1
Got connection:
        Source: audio_port_1_in
        Target: Gain2x2/In1
get_pedalboard_info('./test-good.pedalboard/') - END

you can clearly see that the output from the "bad" pedalboard is different from the "good" one. some of the connections are wrong in the "bad" one.

The testcase in the attachments has the 2 graphs (bad and good), C code and a simple makefile. extract it, and run:

make
./testcase ./test-bad.pedalboard/ ./test-good.pedalboard/

If I'm doing something wrong please let me know. But because lilv handles the "good" pedalboard properly leads me to believe this is a lilv issue.

Attachments (1)

lilv-bug-testcase.tar.gz (2.7 KB) - added by falkTX 6 years ago.

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by falkTX

Attachment: lilv-bug-testcase.tar.gz added

comment:1 Changed 6 years ago by David Robillard

The problem here is that the blank nodes have been merged, lilv is generating anonymous IDs that clash with the given ones.

Though there's a prefix added so I don't yet see why that's the case. If you print the contents with serd (always a good idea) things are sane, but if you print *all* the tails and heads in this testcase, you can see that one arc has several.

comment:2 Changed 6 years ago by David Robillard

Resolution: fixed
Status: newclosed

Turns out said prefix was actually the problem. The clash resolution (to solve e.g. generated ID _:b3 and an explicit _:b3) didn't work if a blank node prefix was set, which lilv does to prevent clashes between files.

Fixed in r490/serd.

Note: See TracTickets for help on using tickets.