gustavoeb / fabricUtils

A collection os tools for the Fabric Engine plataform
7 stars 2 forks source link

when load bvhReader.canvas, error log message. BVHReader.kl #15

Open HyunmokMoon opened 7 years ago

HyunmokMoon commented 7 years ago

Hello,

When I load canvas bvhReader.canvas, I got this error log messages.

[FABRIC:MT] Error: FileIO/BVHReader.kl:93:6: index (0) out of range (0) [FABRIC:MT] KL stack trace: [FABRIC:MT] [ST] 1 __ThrowOutOfRangeException() [FABRIC:MT] [ST] 2 method.readHierarchy.L.Uo9BVHReader() BVHReader.kl:93 [FABRIC:MT] [ST] 3 method.read.L.Uo9BVHReader() BVHReader.kl:34 [FABRIC:MT] [ST] 4 create.L.OO_BVHReader.R.OO_FilePath() BVHReader.kl:26 [FABRIC:MT] [ST] 5 function.DFG_PULL_EXEC_PORT«LoadBVHCharacter_1·BVHReader_1·result».R.EaDa.R.Da.R.Da.R.Da.R.Bo() DFG:LoadBVHCharacter_1.BVHReader_1:4

...

graph loaded "/usr/local/src/fabricUtils/Samples/bvhReader.canvas"

I opened BVHReader.kl line 91~93 is

function BVHReader.readHierarchy!() { String tok[] = this.getTokens(); if(tok[0] != "HIERARCHY")

Please let me know how to fix this getTokens() error. I think we can't access tok[0] because getTokens() failed.

Thank you. Hyunmok Moon.

gustavoeb commented 7 years ago

Hello Hyunmok, Thanks for taking the time to submit this. I am trying to reproduce this. What get tokens should do is get an array where each element is a word in a line, but it is not prepared to deal with empty lines. Does your file have any empty lines? Maybe an empty line in the beggining of the file, before the keyword "HIERARCHY"? Do you get this with all BVH files? I am attaching a BVH file that works for me, see if it works for you.

Best regards, Gustavo

02_01.zip

HyunmokMoon commented 7 years ago

Hello Gustavo, My colleague, he is OK. His environment is Windows 10 OS. Mine is Ubuntu 14.04. I opened my test bvh file. There is no empty line before HIERARCHY. I tried load bvhReader, file what you uploaded. 02_01.bvh. I have error message. like this.

[FABRIC:MT] Error: Reading BVH expected HIERARCHY node at line 1, but instead got: HIERARCHY

[FABRIC:MT] KL stack trace: [FABRIC:MT] [ST] 1 method.readHierarchy.L.Uo9BVHReader() BVHReader.kl:94 [FABRIC:MT] [ST] 2 method.read.L.Uo9BVHReader() BVHReader.kl:34 [FABRIC:MT] [ST] 3 create.L.OO_BVHReader.R.OO_FilePath() BVHReader.kl:26 [FABRIC:MT] [ST] 4 function.DFG_PULL_EXEC_PORT«LoadBVHCharacter_1·BVHReader_1·result».R.EaDa.R.Da.R.Da.R.Da.R.Bo() DFG:LoadBVHCharacter_1.BVHReader_1:4 [FABRIC:MT] [ST] 5 function.DFG_PULL_EXEC_PORT«GetSkeleton_1·result».R.EaDa.R.Da.R.Da.R.Da.R.Bo() DFG:LoadBVHCharacter_1.Copy_1:3 [FABRIC:MT] [ST] 6 stub() DFG:DrawCharacterBones_1.SetBoneTopo:2 [FABRIC:MT] Error: Reading BVH expected { at line 3, but instead got: { ...

Weird. expected HIERARCHY, got HIERARCHY. I got what I expected. but, error. also "{"

Do you have any idea?

Best regards, Hyunmok Moon.

gustavoeb commented 7 years ago

Thats an weird error, I have no clue. I am also running under Windows 10. I'll try it under Ubuntu, and see if I can debug it. Sorry for not having a quick answer for this.

HyunmokMoon commented 7 years ago

It's OK. No problem. :) If you have any clue from Ubuntu, let me know.

Best, Hyunmok Moon.