#27 MUIA_NList_CopyColumnToClipHook crashes on multicolumns

NList.mcc
open
nobody
Performance (2)
7
2012-09-17
2007-07-18
jahc00
No

When I try to access a particular string using my clipboard hook, it will die if I select the contents of two columns at the same time. The first column gives a valid string fine, but the second column wants to die when I try to access it. Checking for NULL doesnt seem to help. If I just select one column at a time, it works fine. Well, sortof. The copying part by me hasnt been perfected yet because I've been hindered by the crashes.

I've created a test program which compiles for OS4, and hopefully MOS AROS and OS3 too. I've included an OS4 crashlog, and there is detailed information about this potential bug, and also on how to reproduce the bug in a document in the same archive. Source code is included of course.

P.S. The test program isnt perfect, it doesnt clean up properly on exit..

Discussion

  • jahc00
    jahc00
    2007-07-19

    Logged In: YES
    user_id=1847591
    Originator: YES

    This bug is not important to me anymore, because I am now using MUIA_NList_CopyEntryToClipHook instead, which seems to function perfect.

    Sorry to be a bother. Thanks for your work on this project guys!

     
  • Logged In: YES
    user_id=762308
    Originator: NO

    I just took a look at the NList source and must say that the multi column handling is completely broken by design. The user supplied hook is required to modify data (set [0] and [1] for string and length) which is used as normal column data in the next loop. Hence the string length of the first column is later used as a string pointer, which MUST crash as soon as it is treated and accessed as such. Unfortunately NList.mcc is not written in a very "bug fix friendly" way, which means that it may be very hard to fix this bug.

    Perhaps you can try MUIA_NList_CopyColumnToClipHook2 which uses a structure instead of the old-style parameters. Maybe this works.

     
  • jahc00
    jahc00
    2007-07-26

    Logged In: YES
    user_id=1847591
    Originator: YES

    No problem guys, I found an alternative a week ago! Thanks for continuing to work on this class, its essential for email and IRC. :)

     


Anonymous


Cancel   Add attachments