Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Access Violation from ilSetInteger

2008-04-16
2013-05-02
  • Hi,

    I get an access violation when calling ilSaveImage from a D program. I am using DevIL 1.6.8-RC2 with derelict and DMD 1.28. Here's the stack trace, as reported by WinDbg. Any help is appreciated.

    0012fc2c 00fdc684 00d0c0e0 01076a04 01076a00 0x0
    0012fc40 00fc8ac4 00d0c0e0 0000005a 00d0c0fa devil!ilSetInteger+0x102d
    0012fc54 00477055 00d0c0e0 0012fd38 0012fd44 devil!ilSaveImage+0x266
    0012fcec 00476c80 00000005 004d5d68 0000000a image00400000!D8Renderer14OpenGlRenderer18OpenGlTextRenderer9buildFontMFPS8derelict8freetype7fttypes10FT_FaceRecS8Renderer14OpenGlRenderer8FontInfoZv+0x36d [src\Renderer\OpenGlRenderer.d @ 360]
    0012fd84 004769cd 0000000a 00000005 004d5d68 image00400000!D8Renderer14OpenGlRenderer18OpenGlTextRenderer8loadFontMFAaiZv+0x1b8 [src\Renderer\OpenGlRenderer.d @ 271]
    0012fd9c 00476453 004d5f00 00cf2e40 00cf2e00 image00400000!D8Renderer14OpenGlRenderer18OpenGlTextRenderer5_ctorMFZC8Renderer14OpenGlRenderer18OpenGlTextRenderer+0x2d [src\Renderer\OpenGlRenderer.d @ 210]
    0012fdb0 00402194 004d5c80 0012ff80 0012ff80 image00400000!D8Renderer14OpenGlRenderer14OpenGlRenderer5_ctorMFZC8Renderer14OpenGlRenderer14OpenGlRenderer+0x43 [src\Renderer\OpenGlRenderer.d @ 28]
    0012fdf8 00402049 0012ff80 0012ff80 004bf0e0 image00400000!D4main11Application10initializeMFZv+0x80 [src\main.d @ 72]
    0012fe34 00402413 004bf0e0 00000024 0012ff80 image00400000!D4main11Application3runMFZi+0x21 [src\main.d @ 28]
    0012fe6c 004ac700 00000001 0012ff28 0012ff80 image00400000!_Dmain+0x43 [src\main.d @ 151]
    0012febc 004ac737 0012ff80 004ac6f4 0012ff80 image00400000!D6dmain24mainUiPPaZi7runMainMFZv+0xc
    0012ff0c 004ac478 0012ff80 004ac70c 00caf6f2 image00400000!D6dmain24mainUiPPaZi6runAllMFZv+0x2b
    0012ff80 004b33a9 00000001 00cc03c4 00cc0400 image00400000!main+0x138
    0012ffc0 7c816d4f 00caf6f2 00caf756 7ffde000 image00400000!mainCRTStartup+0xa9
    0012fff0 00000000 004b3300 00000000 78746341 kernel32!BaseProcessStart+0x23

    devil!ilSetInteger+102d
    00fdc684 8945f8          mov     dword ptr [ebp-8],eax

    My assembly knowledge isn't that good. Hopefully this makes sense to someone. Thanks again,

    Aleko

     
    • Does this happen for any file format you're trying to save in? Which formats did you try?

       
    • Never mind, I'm an idiot. :) I didn't call ilInit, thinking DerelictIL.load() does that for you. Interestingly I was able to generate an image, bind, and even set pixels, without any errors (I called ilGetError after each one).

      RTFM, I guess...

      Thanks,

      Aleko