Group Admins

  • Profile picture of Karim
  • Profile picture of Jean


Public Group active 10 minutes ago

User group for OpenMusic and computer-aided composition. Visit the Forum for discussions.

6.6 to 6.10 arithmetic error

Author 3 Subscribed Users |
Profile photo of perti

hello om-ers,

i have a patch working in 6.6 which gives an error in 6.10 (windows7).
any hint in the right direction to fix it? i know it may be difficult to know with no further info. please ask me if needed.
i understand the type of error. i do not understand why it’s working in 6.6 and not in 6.10. the patch is fairly complex and i can’t trace where the error is fired.
thanks in advance,
the listener is giving the following:
OM > Loading workspace: “OM2″ …
OM > Workspace “OM2″ loaded.
OM > Loading patch: C:\USERS\PERTI\DROPBOX\OM\OM2\elements\current.compo\patch 8.omp
OM > ompatch “patch 8″ was upgraded to OM 6.10
OM > ERROR: In < of (nil 7100) arguments should be of type real.

Call to om-lisp::om-error-handler
Call to invoke-debugger
Call to error
Call to (method draw-object (grap-chord t t t t t t t t t t t t t t))
Call to (method draw-object (grap-chord-seq t t t t t t t t t t t t t t))
Call to (method draw-object (grap-multiseq t t t t t t t t t t t t t t))
Call to (method draw-mini-obj (simple-container t t t))
Call to (method score-draw-mini-view (t t))
Call to (method om-draw-contents (miniview))
Call to om-api::draw-po
Call to capi:execute-with-interface
Call to capi:apply-in-pane-process
Call to clos::templated-method-combination
Call to (method capi:draw-pinboard-layout-objects (t t t t t t))
Call to (method capi-internals:output-pane-display (capi:output-pane t t t t))
Call to capi::draw-output-pane-to-pixmap
Call to capi::output-pane-display-with-pixmap
Call to capi:execute-with-interface
Call to (subfunction 1 (win32:define-type-message-function capi-win32-lib:r-output-pane win32:wm_paint))
Call to win32::wnd-proc
Call to (subfunction win32::|%FOREIGN-CALLABLE/wnd_proc_callback| (fli:define-foreign-callable “wnd_proc_callback”))
Call to fli::foreign-callable-entry-do-call
Call to win32:is-dialog-message
Call to win32::process-messages
Call to mp::win32-process-wait-for-event
Call to mp:process-read-event
Call to capi-internals:loop-process-events
Call to capi::interface-event-loop
Call to capi::initialize-and-process-events
Call to mp::process-sg-function

March 13, 2017 at 20:59 #21782
Profile photo of Karim

Hi Perti,

If you send the patch maybe we can do something about it.

March 13, 2017 at 21:31 #21783
Profile photo of perti

thanks karim, i’ve got something. i opened the patch in a mac and got also the same error, but i managed to scroll down and delete an omXmulti instance. this fixed the frozen screen and the arithmetic error didn’t come out and works as expected. i exported the patch to windows7 but the arithmetic error still comes out (but get a better screen)
the file is attached. i don’t get why the arithmetic error has gone in the mac version.
thanks again,

March 13, 2017 at 22:04 #21789
Profile photo of Karim

Dear Perti

The error is coming from chord-seq having nil pitch such as :

(nil (7400) (8202 8700) (9500 9886 10904) nil (8586 8902 9786 9786) nil (10002 10268 11052) nil (7500) (7702 8200) (9000 9386 10404))

ldurs :
(nil (1250) (4500 4500) (1500 1500 1500) nil (250 250 250 250) nil (938 938 938) nil (1000) (2500 2500) (750 750 750))

(from the chord-seq output from 2nd output of your red path “Hyper Talea”)

You should remove these nils using “remove”


March 13, 2017 at 22:36 #21795
Profile photo of perti

thanks karim for the fast reply. i opened the patch in 6.6, then deleted those chord-seq instances, then exported to 6.10 but i get the same error. why is it that in 6.6 (win) and 6.10 (mac) is working ok? i can live with this problem, but shouldn’t it behave consistently across platforms?
attaching it again with those chord-seqs removed.
thanks again karim,

March 13, 2017 at 23:21 #21797
Profile photo of Karim

Dear Perti,

I believe it is due to some OM code changes that allows nil pitch in chord-seq and it shouldn’t.
So this is a BUG to be fixed. It is not platform related (win/mac). I tested by the way your patch on Linux (OM 6.9.1) and had the same problem while opening the chord-seq.
I will notify our developers about that. Thanx again for reporting it.


March 13, 2017 at 23:29 #21800
Profile photo of perti

ok, but perhaps it can be seen as a feature. when this bug is fixed it will break my code. :-(
best regards,

March 13, 2017 at 23:41 #21801
Profile photo of Jean

Hello Perti,

fyi : as your error backtrace shows, the problem you experience comes from the display of the score boxes miniview :
Call to (method om-draw-contents (miniview) => score-draw-mini-view => draw-mini-obj => draw-object (grap-multisq ) etc. etc.

and as Karim noticed, it is due to some NIL values in the pitch list (the error pops because of a new test on the pitch in order to decide whether the stem should be up or down… : “ERROR: In < of (nil 7100) arguments should be of type real" is testing if the pitch “NIL” is > or < than 7100 => not good.

Anyway :
1) you can “hide” this error by hiding the miniview (use the MAJ+M shortcut to hide all miniviews of your window)
2) I will publish a Windows update soon where this problem will not exist anymore.


March 14, 2017 at 11:16 #21819
Profile photo of perti

ok, thank you jean for looking at this, and for the tip on mini-views.
so i see the problem it is with those lists which include nil. this problem affects those chord-seq and the like, i mean those related with some kind of score display. all other mini-views are not affected. good to know, as the interesting part of the patch is a the list of sound events and it is safe for now.
i thought that filtering out the nils would brake the program, but that would happen only in the display of results. what is not clear to me yet is if the inclusion of nils in those lists is a something i should avoid ever, or is a specific windows platform problem (as this works ok in the macosx version).
thanks again karim and jean,

March 14, 2017 at 15:04 #21833
Profile photo of Jean

I think this would break also on OM 6.10 on MacOSX. Not on 6.11.
There’s no 6.11 for Windows unfortyunately, but 6.12 is coming.

March 15, 2017 at 08:04 #21843
Profile photo of perti

oh! the patch is working in 6.12 (win). some minor issues with the screen redrawing but no more arithmetic error. also working perfectly in mac 6.12
thanks so much for taking care!!
best regards,

March 15, 2017 at 23:15 #21855

You must be logged in to reply to this topic.

Log in now