Jump to content


Photo

DBGrid, stack overflow when scrolling.


  • Please log in to reply
18 replies to this topic

#1 FourWhey

FourWhey
  • Members
  • 156 posts

Posted 20 October 2016 - 04:27 PM

Edit: This seems to be specific to memo fields.  If I change the field to varchar(2000) and the column to dbtext it doesn't happen.

 

It jumps to Variants(710), procedure VarClearDeep(var V: TVarData);

This is all that's shown in the call stack.

VarClearDeep(???)

Other than the above, the call stack is empty.  I'm not doing anything with the grid other than populating it, then scrolling left/right. It let's me scroll only so far to the right, then throws the error when a memo column would come into view.

 

When stepping after the error, this is the call stack.

TWinControl.DefaultHandler((no value))
TCustomForm.DefaultHandler((no value))
TControl.WndProc((134, 0, 0, 0, 0, 0, 0, 0, 0, 0))
TWinControl.WndProc((134, 0, 0, 0, 0, 0, 0, 0, 0, 0))
TCustomForm.WndProc((134, 0, 0, 0, 0, 0, 0, 0, 0, 0))
TFormStdDialog.WndProc((134, 0, 0, 0, 0, 0, 0, 0, 0, 0))
TWinControl.MainWndProc((134, 0, 0, 0, 0, 0, 0, 0, 0, 0))
StdWndProc(269022,134,0,0)
StdWndProc(268914,15,0,0)
TWinControl.DefaultHandler((no value))
TWinControl.WMSysCommand((274, 61558, 53019577, 953, 953, 809, 0))
TControl.WndProc((274, 61558, 53019577, 0, 61558, 0, 953, 809, 0, 0))
TWinControl.WndProc((274, 61558, 53019577, 0, 61558, 0, 953, 809, 0, 0))
TWinControl.MainWndProc((274, 61558, 53019577, 0, 61558, 0, 953, 809, 0, 0))
StdWndProc(268914,274,61558,53019577)
TWinControl.DefaultHandler((no value))
TControl.WMNCLButtonDown((161, 6, 953, 809, 0))
TControl.WndProc((161, 6, 53019577, 0, 6, 0, 953, 809, 0, 0))
TWinControl.WndProc((161, 6, 53019577, 0, 6, 0, 953, 809, 0, 0))
TWinControl.MainWndProc((161, 6, 53019577, 0, 6, 0, 953, 809, 0, 0))
StdWndProc(268914,161,6,53019577)
TApplication.ProcessMessage((268914, 161, 6, 53019577, 63654046, (953, 809)))
TApplication.HandleMessage
TCustomForm.ShowModal
ShowCustomerCallDlg(#0#$B#0#0#$D'Ý',$35CCF48)
TFormViewForfeitPreview.BtnLogCallClick($35C3C54)
TControl.Click
TButton.Click
TMenuBtn.Click
TButton.CNCommand((48401, 6844, 0, 268988, 0))
TControl.WndProc((48401, 6844, 268988, 0, 6844, 0, 6844, 4, 0, 0))
TWinControl.WndProc((48401, 6844, 268988, 0, 6844, 0, 6844, 4, 0, 0))
TButtonControl.WndProc((48401, 6844, 268988, 0, 6844, 0, 6844, 4, 0, 0))
TMenuBtn.WndProc((48401, 6844, 268988, 0, 6844, 0, 6844, 4, 0, 0))
TControl.Perform(48401,6844,268988)
DoControlMsg(268988,(no value))
TWinControl.WMCommand((273, 6844, 0, 268988, 0))
TControl.WndProc((273, 6844, 268988, 0, 6844, 0, 6844, 4, 0, 0))
TWinControl.WndProc((273, 6844, 268988, 0, 6844, 0, 6844, 4, 0, 0))
TWinControl.MainWndProc((273, 6844, 268988, 0, 6844, 0, 6844, 4, 0, 0))
StdWndProc(269000,273,6844,268988)
TWinControl.DefaultHandler((no value))
TControl.WMLButtonUp((514, 0, 89, 20, (89, 20), 0))
TControl.WndProc((514, 0, 1310809, 0, 0, 0, 89, 20, 0, 0))
TWinControl.WndProc((514, 0, 1310809, 0, 0, 0, 89, 20, 0, 0))
TButtonControl.WndProc((514, 0, 1310809, 0, 0, 0, 89, 20, 0, 0))
TMenuBtn.WndProc((514, 0, 1310809, 0, 0, 0, 89, 20, 0, 0))
TWinControl.MainWndProc((514, 0, 1310809, 0, 0, 0, 89, 20, 0, 0))
StdWndProc(268988,514,0,1310809)
TApplication.ProcessMessage((268988, 514, 0, 1310809, 63652015, (1169, 469)))
TApplication.HandleMessage
TApplication.Run
MyApp


#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,815 posts
  • Gender:Male

Posted 22 October 2016 - 12:19 AM

Hi,

 

Can you again send me mini demo. It will help me a lot, I hope it's easy (probably something due checking FieldType).

 

Thank you.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 FourWhey

FourWhey
  • Members
  • 156 posts

Posted 24 October 2016 - 07:56 PM

I tried to make a sample using Access, which doesn't have the same datatype (Long text) vs (Memo) and it doesn't happen there. If I use sql to query a table it does it there.

 

I'll try and put together something, to help reproduce the issue, but it you can do the same. Just add a table and a few columns to it where one of them is a memo, then query it.



#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,815 posts
  • Gender:Male

Posted 10 November 2016 - 10:26 PM

Hi,

 

I'm trying to reproduce this bug, but without luck.

 

Can you please try to modify attached demo (ADO, Access Database inside \Data sub-folder) to help me cause an error.Attached File  ADO 2.zip   77.66KB   1 downloads


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#5 FourWhey

FourWhey
  • Members
  • 156 posts

Posted 11 November 2016 - 09:26 PM

Hi,

 

I'm trying to reproduce this bug, but without luck.

 

Can you please try to modify attached demo (ADO, Access Database inside \Data sub-folder) to help me cause an error.attachicon.gifADO 2.zip

 

I've already tried reproducing it using Access and was unable to reproduce it there, since it doesn't have the Memo datatype only Long text.  If I use SQL server and the Memo datatype it does it every time.



#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,815 posts
  • Gender:Male

Posted 11 November 2016 - 11:36 PM

Hi,

 

Will try to use SQL server then. Can you only tell me which data components you use (TADOQuery, TADOTable?)


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#7 FourWhey

FourWhey
  • Members
  • 156 posts

Posted 14 November 2016 - 04:41 PM

Hi,

 

Will try to use SQL server then. Can you only tell me which data components you use (TADOQuery, TADOTable?)

 

TADOQuery. Make sure you have ExpandContent = true, it seems to be part of the issue.  If I have it disabled it doesn't do it.

Also, if you click the column header to sort by the memo column, it crashes and jumps to TNxDBCellSource6.CreateCell(929).

 

Here's a snippet.

{ Blob }
if Assigned(DataField)
  and DataField.IsBlob and not DataField.IsNull then
begin
...

Call stack

TNxDBCellSource6.CreateCell(5,30)
TNxDBCellSource6.GetCell(5,30)
TNxVirtualGrid6.GetCell(5,30)
TNxGridView6.PaintCell(5,30,(416, 208, 457, 224, (416, 208), (457, 224)))
TNxReportGridView6.PaintCells
TNxGridView6.Paint
TNxListGridView6.Paint
TNxReportGridView6.Paint
TNxCustomGrid6.Paint
TNextDBGrid6.Paint
TNxControl6.PaintWindow(???)
Project1


#8 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,815 posts
  • Gender:Male

Posted 15 November 2016 - 06:50 PM

Hi,

 

Tested with SQL Server and text field (Memo), TADOQuery and seems to work fine.

 

Not sure if I already fixed it, or need something more to include in equation.

 

Also enabled ExpandContent and still work. I will release new update in a day and you can check it again.

 

Very small demo project may also help. I have SQL Express installed, and you can for example create one table Persons, with Id, FirstName, LastName and Note (Text).


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#9 FourWhey

FourWhey
  • Members
  • 156 posts

Posted 15 November 2016 - 11:34 PM

Okay.  I'll keep an eye out for the update. Thank for your hard work, you do a great job with support.



#10 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,815 posts
  • Gender:Male

Posted 17 November 2016 - 04:36 PM

Hi,

 

I have release update.

 

Hope that some of your reported bugs are fixed. Please also tell me if this issue disappeared.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#11 FourWhey

FourWhey
  • Members
  • 156 posts

Posted 22 November 2016 - 05:44 PM

Hi,

 

I have release update.

 

Hope that some of your reported bugs are fixed. Please also tell me if this issue disappeared.

 

I'll give a try, but for now I won't be able to use it unless it's much more stable.  I've run into too many issues, and even though our application is for internal use, it looks bad when it's crashing / throwing errors or has random bugs all the time. For now, I've removed most of the v6 controls from the project.

 

One of the new things that's been reported, is that NxDatePicker6 (more issues with PopUpControl6 I imagine) doesn't always disappear when closed, so it remains on screen, floating above the main application window and can't be closed.

Attached Files



#12 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,815 posts
  • Gender:Male

Posted 22 November 2016 - 09:28 PM

Hi,

Hope that it will become more stable during time.

If nothing, hope that v5 can be still used in your project.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#13 FourWhey

FourWhey
  • Members
  • 156 posts

Posted 23 November 2016 - 12:30 AM

Hi,

Hope that it will become more stable during time.

If nothing, hope that v5 can be still used in your project.

 

TNxDatePickerView.SetStartDay (NxPopupCtrls6: 1960) AV when clicking.

 

If you add a break point there, you can see in the call stack that it was called twice.  The first time is where it's initialized right after the constructor is called, second is where it's set to match the design time state, and this is where it throws the AV.

 

I see there's a comment about it throwing an AV in D6, and it also does in D7 too. Unfortunately this is what I use.



#14 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,815 posts
  • Gender:Male

Posted 23 November 2016 - 09:52 AM

For some reason it doesn't occur in later Delphi versions. For previous version I have used D7 for development, but now I start from XE6. Unfortunately there are some differences, especially with interfaces.

 

I will fix it now, and hope that you will be eventually be able to use it.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#15 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,815 posts
  • Gender:Male

Posted 23 November 2016 - 09:59 AM

Hi,
 
Yes, interfaces :) I have fixed it now, and re-uploaded if you want to give it a chance.
 
NxPopupCtrls6.pas and NxEdit6.pas are only changed, or copy/paste following portions of code:
 
{ added interface }
 INxDateControl = interface
    ['{6EBFA4F7-B1AB-4B9E-A000-99DE8F3C1D9C}']
    procedure SetStartDayOfWeek(const Value: TNxStartDayOfWeek);
    property StartDayOfWeek: TNxStartDayOfWeek write SetStartDayOfWeek;
  end;
 
  TNxDatePopupControl6 = class(TNxEditPopupControl6, INxPopupControl,
    INxDateControl) // <--- included here too
and
 
function TNxDatePicker6.CreatePopupControl: INxPopupControl;
var
  DateControl: INxDateControl;
begin
  Result := TNxDatePopupControl6.Create(Self);
  if Supports(Result, INxDateControl, DateControl) then
  begin
    DateControl.StartDayOfWeek := Self.StartDayOfWeek;
  end;
end;

boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#16 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,815 posts
  • Gender:Male

Posted 23 November 2016 - 10:02 AM

I will try to keep more time in D6 and D7 (as it was once my favorite IDE for long time). It's seems that people still use them.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#17 FourWhey

FourWhey
  • Members
  • 156 posts

Posted 28 November 2016 - 04:44 PM

Thank you for the quick fix.



#18 FourWhey

FourWhey
  • Members
  • 156 posts

Posted 28 November 2016 - 06:48 PM

I will try to keep more time in D6 and D7 (as it was once my favorite IDE for long time). It's seems that people still use them.

 

If I could, I would switch to a newer of Delphi. I have a license for DXE8, but can't use it for my main project due to a custom data control not supporting Unicode. I think D2007 was the last ANSI only version, so maybe I could use that. I have the source code for the control, but I lack the time to convert it. The biggest issue with going Unicode, is the change to ADO for the binary data type from string to byte.  On top of the control changes, much of our existing code accesses qry.FieldByName.AsString throughout to reference binary fields and do hex conversion etc. all of these would need to be addressed. Last year, I went through and converted many of the units, and controls but was never able to get a stable build.  I spent about 1 week working on it, each time that it looked like I was making headway, I'd work past one blocking bug only for it to reveal many more. In the end I just ran out of time.

 

Believe me, I hate being on an old version of Delphi. I'd love to be able to take advantage of newer language features like generics. I consider myself to be primarily a C# developer, I frequently think of how I'd approach a problem with that tool set in mind and then get all depressed that I'm using this old version of Delphi that has none of the things I'd like to use.



#19 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,815 posts
  • Gender:Male

Posted 28 November 2016 - 07:29 PM

Hi,

I fully understand you,

I'm still using D6 features even in DXE6 or Delphi Berlin. Problem are interfaces for sure.

But at least debugger is better, and not to forget refactoring.

But I will try to dedicate more time to D6 and D7 since people are not able to purchase new versions.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users