Memory Error?

2008-12-06
2013-04-22
  • Aaron Reilly
    Aaron Reilly
    2008-12-06

    I import the flame, and set my options.
    Then I go and click on the "render!" button.
    Here is what I get:

    Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
       at cuRender(Flame* , Void* )
       at Render(Flame* flame)
       at Flam4_CUDA.FWM.timer1_Tick(Object sender, EventArgs e)
       at System.Windows.Forms.Timer.OnTick(EventArgs e)
       at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    Flam4CUDA
        Assembly Version: 0.0.0.0
        Win32 Version:
        CodeBase: file:///C:/Users/Aaron%20Reilly/Desktop/Electric%20Sheep/Flam4/Version_0_23/Flam4CUDA.exe
    ----------------------------------------
    msvcm80
        Assembly Version: 8.0.50727.1434
        Win32 Version: 8.00.50727.1434
        CodeBase: file:///C:/Windows/WinSxS/x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.1434_none_d08b6002442c891f/msvcm80.dll
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled

    System Specs:

    32bit-Vista Ultimate
    2.6Ghz Intel Core2Duo processor
    4GB Ram
    nVidia 8600M GT with ForceWare 178.08 installed

    Any help would be appreciated.

     
    • Darrell Enns
      Darrell Enns
      2009-02-03

      I get the same thing on a Dell m1330 (nVidia 8400M GS) with Vista Ultimate.

       
      • Aaron Reilly
        Aaron Reilly
        2009-02-03

        Whats interesting is there hasn't been any developement help, or at least an admin to post to acknowledge the issue.

         
        • Paul Vincent
          Paul Vincent
          2009-02-16

          The author regularly posts to the Apophysis newsgroup and I have seen him discuss various bugs there.  If this is a pressing issue for you, then I would suggest trying there.

           
    • Keldor
      Keldor
      2009-02-17

      To tell the truth, I had given up on checking the forum after months of complete silence.  Now that people are actually posting, I'll be sure to check now and then;-)

      Anyhow, looks like your drivers are out of date - Flam4 requires 180.x at least.

      dack42, I think you have the same problem - see my post on your bug tracker.

       
    • Aaron Reilly
      Aaron Reilly
      2009-02-21

      180.x? Thats a bummer, that means no laptop user can use Flam4 until nVidia releases CUDA 2.1 (180.x) to mobile GPU's.
      Currently, they dont support the mobile GPU's, so this program is completly desktop oriented.
      I am not a CUDA developer, so explain something to me. Why 180.x? Can it be ported to CUDA 2.0? Or would that require too much of a rewrite.
      Thanks for your response.

       
      • Keldor
        Keldor
        2009-02-22

        Basically, CUDA 2.1 includes one new feature that I consider important to the future of flam4 - the ability to dynamically compile GPU code at runtime.  This opens up all sorts of possibilities for both optimization (right now it has to go down the list of 50 odd variations every iteration and test if they're active - it would be much better to defer that to a load-time test, and assemble code using just the variations that are actually in use), as well as future features (custom variations...).

        Another thing is that you can't have two different versions of the CUDA SDK installed at the same time, which makes it rather involved (to say the least!) to try to compile both code paths.

        Actually, the release notes for the latest mobile drivers (179.49 I think) say that CUDA support was added in the 179 series of drivers, so it's worth a shot installing those and trying it again I think, since your drivers were 178.x.

         
    • Joe
      Joe
      2009-03-14

      Hey guys, thought I might share some insight to this problem.

      I am running Vista x64 with a 9800M GS (I have a notebook). I had the same error as the OP, and I figured it was something related to CUDA.

      I went through so many things I'm so confused as to how I got it working, but basically the first step is to go here:

      http://www.nvidia.com/object/cuda_get.html

      There is a beta 181.22 notebook driver there, which I downloaded and used. I'm not sure if I have the x64 or x86 version of the driver installed, but since I have a 64-bit OS, I will assume that I installed my respective 64-bit driver.

      Next, I read somewhere in the version information here on SourceForge that 64-bit CUDA might have problems. After a bunch of trial and error, I totally verified this.
      On the same CUDA download page as above, make sure you select the "Vista 32-bit" option and then download the 2.1 Toolkit and SDK. I'm not sure if both are necessary (probably not), but it's what I did and hey, you get some pretty cool particle apps out of it.

      I've been stalking this forum for about two months now and finally gave up on hoping for answers and just went nuts last night trying to figure it out. I have to say it was worth it-- the GPU is extremely fast! For example, a 400-quality render would take about 55 seconds on my dual core CPU, while it takes less than 7 seconds per frame using flam4. I'm happy.

      Hope this helps!!
      --Joe

      TL;DR:
      -Download the 181.22 beta notebook driver.
      -Download the 32-bit CUDA Toolkit + SDK.
      -Fire up Flam4 and pray to your deity of choice.

       
    • Aaron Reilly
      Aaron Reilly
      2009-03-14

      This is a new section of the page posted by nVidia. A week ago this wasn't there. Then agian, I've been so busy that I really havn't had time to check. This is an excellent developement and next time I get 10-15 minutes I am definetly going to be trying this out. Thanks for letting me know.