Shop OBEX P1 Docs P2 Docs Learn Events
ViewPort Bugs? — Parallax Forums

ViewPort Bugs?

KbrewmanKbrewman Posts: 4
edited 2014-09-10 16:01 in Propeller 1
Hi All,
First post so forgive me if I'm in the wrong spot, or commit so other faux-pa. I have been using / playing with the Propeller and ViewPort with general Success. But I keep running into strange bus with ViewPort. Here are two:
1) Sometimes when stepping though spin code it jumps down several lines of code with one "step into" press, not always in the same place and it doesn't happen every time
2) I have had instances when I run some code, it won't work properly with viewport, but when I compile/run the exact same code with the propeller tool it works. For example a command to turn on a LED via a port.

I am only use the vp : "Conduit" declaration, if I also use the Vp.share(@XXX,@YYY) the variable names don't show up, when I leave it out the names automatically appear...

I am using Version 4.8.4

many thanks

KB

Comments

  • ratronicratronic Posts: 1,451
    edited 2014-09-04 15:24
    KB can you run any of the sample programs ViewPort comes with?
  • KbrewmanKbrewman Posts: 4
    edited 2014-09-04 16:27
    Hi Dave, Yes I can and they seem to work and I have been able to use viewport for stepping through my code and debugging it, just every once and a while these strange things pop up, I was hoping some one else has seen this....
  • ratronicratronic Posts: 1,451
    edited 2014-09-04 16:44
    KB I was checking that at least it is working for you. I have never used ViewPort to step through code so I can't commit on #1. But #2 can you post your code?

    Edit: When I had problems like you describe in #2 they were usually caused by me trying to use the Propeller's serial port in my program.
  • PublisonPublison Posts: 12,366
    edited 2014-09-04 17:01
    KB,

    Welcome to the forums!

    If you could post your code as a SPIN archive, that would help. I am also running Ver 4.8.4.

    Also, If the Hanno, the author does not pick up on it here, he has a forum on his website.:

    http://onerobot.org/forums/forum/viewport/
  • KbrewmanKbrewman Posts: 4
    edited 2014-09-09 16:27
    Hi and sorry for the delay, busy last few days... So this isn't the best example, but when I am stepping through this fragment is jumps lines of code.
    I'd set a break point at line 110, step into that section and it jumps from 189 to 199. I typically keep hitting "step into " when going through the code.
    I have had this in other spin files too - it kinda shake my confidence in the debugger. I will see if I can recreate the other issue where the code runs differently when loaded from Viewport or the Propeller tool...

    For some context I am still learning the Propeller and this code is for reading in data from some I2C sensors and storing them to an array for later usage.

    thanks for the help

    KB


    Controller.spin
  • ratronicratronic Posts: 1,451
    edited 2014-09-09 16:40
    Kb I took a quick look at your code and at least the Spin file you posted I see no evidence of trying to use the serial port. I have never used V.P. to step through code.
  • KbrewmanKbrewman Posts: 4
    edited 2014-09-10 15:13
    Sorry Dave you lost me on the serial port, I didn't mention using a serial port? What do you use for debugging?

    regards,

    KB
  • PublisonPublison Posts: 12,366
    edited 2014-09-10 15:40
    KB,

    For anyone to try your code out, it has to contain all the spin files. you need to archive the whole project using File>Archive with the top object in current view.

    There may be problems with the other objects. The SPIN file that you posted can not be run correctly, because it relies on other objects.

    BTW, did you try to get Hanno on his forums?
  • ratronicratronic Posts: 1,451
    edited 2014-09-10 15:47
    I have used an l.e.d. before for debugging but as far as ViewPort I have used it to monitor variables and even change P.I.D. variables live. But I have not used it for stepping through a program kind of debugging.

    I mentioned the Propellers serial port because it is used exclusively by ViewPort and I have at times didn't remember using the serial terminal to debug with the regular Propeller tool. If you don't disable the

    Parallax Serial Terminal when you are using ViewPort it will cause problems where the program works with the Prop tool but not with ViewPort which I don't think is your problem. The only other thing I can think

    of is ViewPort requires a quality USB cable. Some of the retractable cables and other cheap cables can cause problems. You can ask on the OneRobot forums as Publison mentioned above.
  • PublisonPublison Posts: 12,366
    edited 2014-09-10 15:51
    ratronic wrote: »
    I have used an l.e.d. before for debugging

    You meant IDE, right? :)

    And IED is rather harsh on delicate electronic equipment. :)
  • ratronicratronic Posts: 1,451
    edited 2014-09-10 15:55
    No IDE. I use the kind that lights up!
  • PublisonPublison Posts: 12,366
    edited 2014-09-10 16:01
    OK, LED. That's sounds better. :)
Sign In or Register to comment.