Miranda IM

Results 1 to 4 of 4

Thread: calling mir_alloc cause a crash

  1. #1
    Join Date
    December 2011

    calling mir_alloc cause a crash

    Hello ee
    This is maybe stupid newby question but when i try to use mir_alloc in my module it brings me crash
    memory could not be read.
    Do i missed to include something ?

    Thank you in advance

  2. #2
    Join Date
    March 2005
    Most likely cause: You did not initialize the interface.

    struct MM_INTERFACE mmi;     // (this must be a global)
    And then somewhere very early in your plugin initialization (typically in your Load() function)

    mir_getMMI(&mmi);          // (this populates mmi with the function pointers so you can use the memory allocation api.
    mir_alloc() is just a macro that calls mmi.mmi_malloc() and if mmi is not initialized, you get a crash of course.
    • TabSRMM Wiki - documentation for TabSRMM
    • Blog
    • contact (GMail / GTalk): silvercircle(at)gmail(dot)com

  3. #3
    Join Date
    August 2005
    Russia, Saint-Peterburg
    in latest compilation i got NIL as result of mir_alloc very often. long time ago it was fine. code didn't changed. So, i needed to return to compiler memory manager, not miranda.

    PS. i filled intrface structure and repeat - some time ago all worked fine
    PPS. of course, maybe it my fault finally...

  4. #4
    Join Date
    December 2011
    Thank you Nightwish !
    Its work my problem were that i didnt include this:


Similar Threads

  1. Status notify cause crash?
    By Sharpless in forum Technical Support
    Replies: 6
    Last Post: 13 Jul 2006, 3:42 PM
  2. Replies: 8
    Last Post: 26 May 2006, 9:49 PM
  3. MSN Delivery Timeout - Possible Cause
    By SZGY in forum Protocols
    Replies: 2
    Last Post: 12 Jan 2006, 5:57 PM
  4. Going online cause Miranda crash
    By tweety in forum Technical Support
    Replies: 21
    Last Post: 21 Apr 2005, 1:53 AM
  5. Annoying little bug IEView seems to cause
    By fmxer in forum Plugins
    Replies: 2
    Last Post: 12 Mar 2005, 12:36 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts