Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-09

TTreeview problem

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michal Bukovjan

It seems there is a memory corruption somewhere.

The problem can be reproduced quite easily, just do:

1) Start Lazarus
2) Go to Environment -> CodeTools defines editor
3) Resize the windows slowly - either horizontally or vertically. Watch the treeview in upper part of the form.
4) Once the treeview reaches 0 size in either axis, crash occurs - invalid floating operation.

I tried to trace the problem with gdb, and it says it crashes at gtkcallback.inc, line 1919 (case of vertical scroll) - but that line is relatively inoccent. Looking at variables at that point, the values there are seemingly random, which I tend to believe is corrupted memory.

This appers under Linux and GTK, fpc 1.0.7

Michal

Reply by email

Tony Maro
to Michal Bukovjan

Now if I could refrain from hitting CTRL-whatever it is I hit that sent that message prematurely I would be doing better...

True to my idea of documenting everything I go through with Lazarus from start to finish as a new user, I've just completed my first HOWTO that covers getting a new install up and running.

Sure, these things are covered on the Lazarus site, but I wanted to put it in my own words and keep all of my notes together on my own site.

http://tony.maro.net/mod.php?mod=userpage&page_id=17

If anyone finds anything they think is outright wrong, let me know.

Next I'll cover HOWTO store program settings in an XML file.

Reply by email

Mattias Gaertner
to Michal Bukovjan: It seems there is a memory corruption somewhere. The problem can be reproduced quite…
Show quoted text 15 lines
It seems there is a memory corruption somewhere. The problem can be reproduced quite easily, just do: 1) Start Lazarus 2) Go to Environment -> CodeTools defines editor 3) Resize the windows slowly - either horizontally or vertically. Watch the treeview in upper part of the form. 4) Once the treeview reaches 0 size in either axis, crash occurs - invalid floating operation. I tried to trace the problem with gdb, and it says it crashes at gtkcallback.inc, line 1919 (case of vertical scroll) - but that line is relatively inoccent. Looking at variables at that point, the values there are seemingly random, which I tend to believe is corrupted memory.

- Don't panic. No corrupted memory.
- The round function has problems of converting maximum values.
- The bug was in the TCustomTreeView code, mixing integer and cardinal.
- Fixed.

Mattias

Reply by email