bugGNU Octave - Bugs: bug #44858, octave forge instrument-control...

 
 

bug #44858: octave forge instrument-control install fails under win64

Submitter:  John Donoghue <lostbard>
Submitted:  Thu 16 Apr 2015 06:20:00 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  JohnD Open/Closed:  * Closed
Release:  * dev Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 04 May 2015 02:26:30 PM UTC, comment #14: 

Well, the whole open/close thing is very incomplete. I commited a quick and dirty fix.

Stefan Mahr <dac922>
Mon 04 May 2015 12:02:47 PM UTC, comment #13: 

One thing I have noticed:

on a closed serial port, displaying the variable:


a =

  Serial Port Object
    open:     0
    port:     \\.\COM15
error: serial: Interface must be opened first...
    baudrate: -1
    parity:   None
error: serial: Interface must be opened first...
    bytesize: -1
error: serial: Interface must be opened first...
    stopbits: -1
    timeout:  -1


John Donoghue <lostbard>
Group Member
Mon 04 May 2015 01:05:25 AM UTC, comment #12: 

Looks like is most likely a gcc issue in mxe for win64.

See https://savannah.gnu.org/bugs/?44998

John Donoghue <lostbard>
Group Member
Thu 30 Apr 2015 12:12:07 PM UTC, comment #11: 

Tried in octave-64 under windows and it crashes somewhere.
I need to rebuild with gdb to see what it is doing

John Donoghue <lostbard>
Group Member
Wed 29 Apr 2015 10:56:21 AM UTC, comment #10: 

Merged. Thanks!

Stefan Mahr <dac922>
Wed 29 Apr 2015 02:16:51 AM UTC, comment #9: 

Comment #7 is fixed in mercurial already.

Here is my additions included in your patch which fixed the class methods not being virtual, and prints out the serial class in a nicer format like in comment #8.



(file #33834)

John Donoghue <lostbard>
Group Member
Tue 28 Apr 2015 11:50:24 PM UTC, comment #8: 



a =
  Serial Port Object
    open:     1
    port:     \\.\COM15
    baudrate: 9600
    parity:   none
    bytesize: 8
    stopbits: 1
    timeout:  0


John Donoghue <lostbard>
Group Member
Tue 28 Apr 2015 11:43:16 PM UTC, comment #7: 

Another issue - probally should add as a new bug report:

I just installed instrument-control on my fedora linux box, using instrument-control from octave-forge.

On running a = tcp('127.0.0.1', 10000) I get:

>> a = tcp("127.0.0.1", 10000)

a = error: octave_base_value::print (): wrong type argument 'octave_tcp'

I think I was seeing a similar issue on the windows package, and it ended up being that I needed a print function:
void print (std::ostream& os, bool pr_as_read_syntax = false)

(ie: no const)

John Donoghue <lostbard>
Group Member
Tue 28 Apr 2015 11:30:55 PM UTC, comment #6: 

I haven't used the matlab instrument control before but could format similar to it [1]

Or, something similar to:


a =

    open:     1
    port:     \\.\COM15
    baudrate: 9600
    parity:   none
    bytesize: 8
    stopbits: 1
    timeout:  0


The attributes indented from the variable name, case of names consistant (whether that is all lowercase, camelcase ... )

[1] http://www.mathworks.com/help/instrument/serial-port-object.html

John Donoghue <lostbard>
Group Member
Tue 28 Apr 2015 09:58:52 PM UTC, comment #5: 

I'm at war with user interfaces, so suggestions for pretty print are very welcome :)

Stefan Mahr <dac922>
Tue 28 Apr 2015 07:22:51 PM UTC, comment #4: 

I see it - octave_serial_common: your methods need to be declared virtual.

John Donoghue <lostbard>
Group Member
Tue 28 Apr 2015 07:09:22 PM UTC, comment #3: 

Probally a good idea.
I haven't tested in octave 64 yet, nor looked at the code, but did a quick test for Windows and octave 32 bit.

It would be better I think if the output was formatted rather than all left justified. Currently I get:


>> a = serial("\\\\.\\COM15")
a =

isOpen:   0
Port:     \\.\COM15
Baudrate: 0
Parity:   N/A
Bytesize: 0
stopbits: 0
Timeout:  0


In addition, as above, isOpen and other fields are not correct? above it says it is not open? however should be, and if I attempt to open again it will fail with access denied, which is understandable as the port is open.

If I fclose(a) and redo, it works again, but still shows isOpen: 0.

So it is just not displaying correctly.



John Donoghue <lostbard>
Group Member
Tue 28 Apr 2015 02:42:11 PM UTC, comment #2: 

John, thanks for reporting this bug and adding instrument-control to mxe-octave.

Using the scalar value of file descriptor/handle as output is not very useful, so I modified the print function to return serial properties as text.

What do you think of this approach? Could you check if this works with win32/win64 ?


(file #33824)

Stefan Mahr <dac922>
Thu 16 Apr 2015 06:23:41 PM UTC, comment #1: 

Patch attached

(file #33693)

John Donoghue <lostbard>
Group Member
Thu 16 Apr 2015 06:20:00 PM UTC, original submission:  


Package fails to build serial.oct in win64 with error casting HANDLE to int.

John Donoghue <lostbard>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #33834:  inst-up.patch added by lostbard (24KiB - text/x-patch)
file #33824:  serial_print.diff added by dac922 (23KiB - text/x-patch)
file #33693:  ins-ctrl-fix.patch added by lostbard (769B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by dac922 (Updated the item)
  • -email is unavailable- added by lostbard
  • -email is unavailable- added by lostbard
  • -email is unavailable- added by lostbard (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-03-28 mtmiller StatusNone Fixed
        Open/ClosedOpen Closed
    2015-04-29 lostbard Attached File- Added inst-up.patch, #33834
    2015-04-28 dac922 Attached File- Added serial_print.diff, #33824
    2015-04-16 lostbard Summaryoctave forge instrument-control fails under win64 octave forge instrument-control install fails under win64
    2015-04-16 lostbard Carbon-Copy- Added andy1978
        Carbon-Copy- Added dac922
    2015-04-16 lostbard Attached File- Added ins-ctrl-fix.patch, #33693

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code