Large Number Crash

Issue #222 new
Keith O'Hara created an issue

Crashes calico on both mac and Linux

def test(k):
    return 440 * 2^k-49/12

test(10)
Loading Calico version 4.0.0...

(Calico:18311): GLib-GObject-WARNING **: Attempt to add property __gtksharp_3_Mono_TextEditor_TextArea::im-module after class was initialised

Unhandled Exception:
System.ArgumentNullException: Value cannot be null.
Parameter name: method
  at Microsoft.Scripting.Utils.ContractUtils.RequiresNotNull (System.Object value, System.String paramName) <0x41a6ece0 + 0x0003f> in <filename unknown>:0 
  at Microsoft.Scripting.Interpreter.InterpretedFrame.IsInterpretedFrame (System.Reflection.MethodBase method) <0x41e756f0 + 0x0001f> in <filename unknown>:0 
  at Microsoft.Scripting.Interpreter.InterpretedFrame+<GroupStackFrames>c__Iterator4.MoveNext () <0x41e752c0 + 0x00163> in <filename unknown>:0 
  at IronPython.Runtime.Exceptions.PythonExceptions.GetDynamicStackFrames (System.Exception e) <0x41e74780 + 0x004d4> in <filename unknown>:0 
  at IronPython.Runtime.PythonContext.FormatStackTraceNoDetail (System.Exception e, System.Boolean& printedHeader) <0x41e74570 + 0x000c7> in <filename unknown>:0 
  at IronPython.Runtime.PythonContext.FormatStackTraces (System.Exception e, System.Boolean& printedHeader) <0x41e74300 + 0x0022b> in <filename unknown>:0 
  at IronPython.Runtime.PythonContext.FormatStackTraces (System.Exception e) <0x41e742c0 + 0x00027> in <filename unknown>:0 
  at IronPython.Runtime.PythonContext.FormatException (System.Exception exception) <0x41e74150 + 0x0008f> in <filename unknown>:0 
  at Microsoft.Scripting.Hosting.ExceptionOperations.FormatException (System.Exception exception) <0x41e74120 + 0x00024> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) Microsoft.Scripting.Hosting.ExceptionOperations:FormatException (System.Exception)
  at Calico.DLREngine.ExecuteFile (System.String filename) <0x41e72980 + 0x0035b> in <filename unknown>:0 
  at Calico.MainWindow+<ExecuteFileInBackground>c__AnonStorey18.<>m__24 () <0x41e724e0 + 0x002b7> in <filename unknown>:0 
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) <0x7fecc71f03d0 + 0x00099> in <filename unknown>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x7fecc71ee990 + 0x00178> in <filename unknown>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x7fecc71ee960 + 0x00020> in <filename unknown>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) <0x7fecc71ee8b0 + 0x00059> in <filename unknown>:0 
  at System.Threading.ThreadHelper.ThreadStart () <0x7fecc71f0590 + 0x0002e> in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Value cannot be null.
Parameter name: method
  at Microsoft.Scripting.Utils.ContractUtils.RequiresNotNull (System.Object value, System.String paramName) <0x41a6ece0 + 0x0003f> in <filename unknown>:0 
  at Microsoft.Scripting.Interpreter.InterpretedFrame.IsInterpretedFrame (System.Reflection.MethodBase method) <0x41e756f0 + 0x0001f> in <filename unknown>:0 
  at Microsoft.Scripting.Interpreter.InterpretedFrame+<GroupStackFrames>c__Iterator4.MoveNext () <0x41e752c0 + 0x00163> in <filename unknown>:0 
  at IronPython.Runtime.Exceptions.PythonExceptions.GetDynamicStackFrames (System.Exception e) <0x41e74780 + 0x004d4> in <filename unknown>:0 
  at IronPython.Runtime.PythonContext.FormatStackTraceNoDetail (System.Exception e, System.Boolean& printedHeader) <0x41e74570 + 0x000c7> in <filename unknown>:0 
  at IronPython.Runtime.PythonContext.FormatStackTraces (System.Exception e, System.Boolean& printedHeader) <0x41e74300 + 0x0022b> in <filename unknown>:0 
  at IronPython.Runtime.PythonContext.FormatStackTraces (System.Exception e) <0x41e742c0 + 0x00027> in <filename unknown>:0 
  at IronPython.Runtime.PythonContext.FormatException (System.Exception exception) <0x41e74150 + 0x0008f> in <filename unknown>:0 
  at Microsoft.Scripting.Hosting.ExceptionOperations.FormatException (System.Exception exception) <0x41e74120 + 0x00024> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) Microsoft.Scripting.Hosting.ExceptionOperations:FormatException (System.Exception)
  at Calico.DLREngine.ExecuteFile (System.String filename) <0x41e72980 + 0x0035b> in <filename unknown>:0 
  at Calico.MainWindow+<ExecuteFileInBackground>c__AnonStorey18.<>m__24 () <0x41e724e0 + 0x002b7> in <filename unknown>:0 
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) <0x7fecc71f03d0 + 0x00099> in <filename unknown>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x7fecc71ee990 + 0x00178> in <filename unknown>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x7fecc71ee960 + 0x00020> in <filename unknown>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) <0x7fecc71ee8b0 + 0x00059> in <filename unknown>:0 
  at System.Threading.ThreadHelper.ThreadStart () <0x7fecc71f0590 + 0x0002e> in <filename unknown>:0

Comments (11)

  1. Doug Blank

    I get this error when in Python3 mode:

    Traceback (most recent call last):
      File "/home/dblank/calico/Untitled.py", line 4, in <module>
      File "/home/dblank/calico/Untitled.py", line 2, in test
    TypeError: unsupported operand type(s) for ^: 'int' and 'float'
    

    which seems appropriate. And I get the number 886 when in Python2 mode. I'm running Linux (Ubuntu 14.04 64-bit).

  2. Keith O'Hara reporter

    Also running master on ubuntu 14.04 and I only see the bug in python3 mode.

    mono --version
    Mono JIT compiler version 4.4.2 (Stable 4.4.2.11/f72fe45 Fri Jul 29 09:58:49 UTC 2016)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug 
        LLVM:          supported, not enabled.
        GC:            sgen
    
  3. Doug Blank

    Can you try setting menu -> Script -> Script Options -> Python2 mode and see if that makes a difference?

    Oh, I see that you already said that Python2 works. Interesting...

  4. Keith O'Hara reporter

    Still happens with

    mono --version
    Mono JIT compiler version 4.6.0 (Stable 4.6.0.245/746756c Wed Sep 14 09:49:13 UTC 2016)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug 
        LLVM:          supported, not enabled.
        GC:            sgen
    
  5. Doug Blank

    This works:

    $ mono --version
    Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-4ubuntu1.1)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug 
        LLVM:          supported, not enabled.
        GC:            sgen
    
  6. Log in to comment