|
On wpc_hlines module, the problem of an arguments reported by dialyzer.
|
|
04-08-2016, 02:26 PM
Post: #1
|
|||
|
|||
|
On wpc_hlines module, the problem of an arguments reported by dialyzer.
Hi!dgud,Cause was found.
(The past few week I was talking with him about the problem of wpc_hlines module on github.) It was due to that contained complex anonymous function within the tuple on function binding( Line: around 486). I can't understanded how an error occurs in what mechanism. The sequence of events: I also decided to examine the problem by using a dialyzer too. And,Dialyzer has outputted to the same error message. Quote: Checking whether the PLT /Users/*****/.dialyzer_plt is up-to-date... yes So, I have read carefully the source. Note: It is might be a misguided reasoning, because I'm not a programming expert. Look at a Line around 486 from wpc_hlines.erl Code: {Proj, Front_face, Side_face, Wvp, Hvp} =Note:The binded variable Proj( = defined by fun() an anonymous function in the tuple ) is replaced as follows proj({X, Y, Z}) -> %some process% end; proj({{X1, Y1, Z1}, {X2, Y2, Z2}}) -> %some process% end. The error massage of an argument type "LVCt::{{float(),float()} | {_,_,_},{float(),float()} | {_,_,_}})" In fact,LVCt took the two tuples or three tuples. *LVCt* = {{0.7256575605567986,-0.6635543866848802,-13.425001504083214}, {1.3669827324774597,-0.014517512922733067,-15.204735518018442}} Probably this means that the argument must be pass into Proj() originally. But Dialyzer suggests the possibility of it pass into persp_sf/1 (with incorrect argument type) I thought that If any exception occurred on the fun(), then data passed to function persp_sf/1. Then,I've isolated the Proj(fun()) from the tuple. It has changed in this way. Code: Proj =and using dialyzer once again. Quote:$ dialyzer /Applications/Wings3D\ 2.0.2.app/Contents/Resources/lib/wings-2.0.2/plugins/import_export/wpc_hlines.beam The error message has been eliminated. How about that? -------- tkbd |
|||
|
05-30-2016, 10:25 AM
Post: #2
|
|||
|
|||
|
RE: On wpc_hlines module, the problem of an arguments reported by dialyzer.
Thanks for the analyse, sorry for the late answer, I read it before but never answered, I have forward the bug to the person who knows dialyzer better.
|
|||
|
06-02-2016, 10:03 AM
Post: #3
|
|||
|
|||
|
RE: On wpc_hlines module, the problem of an arguments reported by dialyzer.
I don't mind the delay so much.
![]() And, I hope that you get a good clue about this bug. Good Lucks! |
|||
|
06-02-2016, 11:23 AM
(This post was last modified: 06-02-2016 11:23 AM by dgud.)
Post: #4
|
|||
|
|||
|
RE: On wpc_hlines module, the problem of an arguments reported by dialyzer.
I changed the code as your suggestion and let the guys who know dialyzer fix their bugs :-)
|
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)




