#17 Crashes after adding large number of objects

closed-wont-fix
Robert May
None
1
2006-10-15
2004-01-28
Anonymous
No

While creating a dynamic gui (using hide and show) I
found that the error message "memory could not be
written" is display causing the program to crash. This
was found just after adding a button. Many other
buttons were added successful, but adding and removing
1 more button caused this crash. After testing it was
found that adding any new control would cause this, but
if I replaced a control (i.e. a button for a label) the
program was fine.

Discussion

  • Logged In: NO

    Is this because resources are not given back to windows
    when win32::gui 'destroys' windows/controls? Basically,
    win32::gui does not support dynamic environments....

     
  • Steve Pick
    Steve Pick
    2004-02-16

    • assigned_to: nobody --> theweevil
    • priority: 5 --> 7
     
  • Steve Pick
    Steve Pick
    2004-02-16

    Logged In: YES
    user_id=690817

    I have yet to see this problem. I've created windows with
    over a thousand widgets (yes, with a loop...), I've created
    over 1000 windows on my desktop and cannot re-create this
    problem.

    How much memory are you using, and what operating system?

    I can test Win98 and Win2k/XP so if you let me know and give
    me some example code (attach it here) i'll look into it.

    Steve

     
  • Logged In: NO

    Ok....I may have been pre-mature in posting. The syptoms
    that I describe did infact happen (OS = win2k), and it did lead
    me to believe that it was do to the number of widgets, BUT I
    have more info after further testing that now makes it appear
    as a different problem. What I have found since is that the
    location of the code seems to also matter. Let me explain:

    I was creating a treeview, and I was creating each new
    element and the logic behind it together so that I could easily
    see the corresponding code for that element in the treeview.
    This was fine up until I reached a certain point, then I
    received the "memory could not be written" error. It
    happened if I added any more widgets... well I decided to go
    back and re-organize my code (note: I did NOT change the
    code, just moved it around changing what the interpreter
    read first)...that did the trick, it shouldn't have, but it did.

    Now when ever I get that error, I just move the code arround
    until the error goes away. I know that this is the wrong way
    to go about this, I am treating the sympton and not the
    illness, but I do not understand what the illness is.

    Even more confusing is that I can add a new control, get the
    error, run the program 20 times and the error happens each
    time in the same place, this makes me believe that it is an
    issue and not just some spurious system
    error/incompatibilty....now the part that makes NO
    sense....sometimes if I move the code up a line or two (all I
    am doing here is removing some blank lines in the code), the
    error goes away, and I can run it 20+ times error free???

    More diagnostic info, I am using OS->Win2k, Processor->P4
    2.0GHz, MEM->256MB, Perl->5.8.2, Win32::GUI->0.670

    Thanks for looking into this...If there is anyother info that you
    need let me know.

    Cameron

     
  • Robert May
    Robert May
    2005-07-28

    • assigned_to: theweevil --> nobody
     
  • Logged In: NO

    This issue *might* be resolved with 1.03 and later. Under
    5.8.x and certain versions of windows, buffer overruns in
    the Listbox and Combobox caused all kinds of crashes such
    as "memory could not be written". The buffer overrun would
    always occur, but different versions of perl/windows would
    be more/less sensitive to this error.

     
  • Robert May
    Robert May
    2005-11-30

    • priority: 7 --> 1
    • assigned_to: nobody --> robertemay
    • status: open --> open-wont-fix
     
  • Robert May
    Robert May
    2005-11-30

    Logged In: YES
    user_id=674651

    Given that I can't reproduce this, and I'm not seeing other
    reports of this issue I propose to close this tracker when
    the 1.04 release happens (hopefully early 2006). Please add
    a comment if you don't think this is appropriate or can
    provide further insight.

    Regards,
    Rob.

     
  • Robert May
    Robert May
    2006-10-15

    • status: open-wont-fix --> closed-wont-fix