Delphi Stack Overflow Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any stack overflow delphi 7 questions you might have Meta Discuss the workings and policies
Stack Overflow Error C++
of this site About Us Learn more about Stack Overflow the company Business Learn more about fix stack overflow error hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow
Stack Overflow Error Windows Xp
is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up stack overflow error in delphi up vote 5 down vote favorite I have a procedure which calls several functions: procedure TForm1.Button1Click(Sender: TObject); var rawData: TRawData; rawInts: TRawInts; processedData: TProcessedData; begin stack overflow javascript error rawData := getRawData(); rawInts := getRawInts(rawData); processedData := getProcessedData(rawInts); end; The data types are defined like this: TRawData = array[0..131069] of Byte; TRawInts = array[0..65534] of LongInt; TProcessedData = array[0..65534] of Double; running the program with just: rawData := getRawData(); rawInts := getRawInts(rawData); Works totally fine. However, when I try to run: getProcessedData(rawInts) I get a stackoverflow error. I don't see why this is. The function code for getProcessedData is very simple: function getProcessedData(rawInts : TRawInts) : TProcessedData; var i: Integer; tempData: TProcessedData; scaleFactor: Double; begin scaleFactor := 0.01; for i := 0 to 65534 do tempData[i] := rawInts[i] * scaleFactor; Result := tempData; end; Why is this causing an error ? delphi stack-overflow share|improve this question edited Mar 27 '14 at 20:04 Zdravko Danev 7,81211435 asked Mar 27 '14 at 19:52 Tim Mottram 199310 When taking the code out of the getProcessedData function and putting it manually in the procedure
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us
Stack Overflow Line Error
Learn more about Stack Overflow the company Business Learn more about hiring developers
Stack Overflow Line 0 Error
or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack stack overflow error java Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Delphi stack overflow and access violation error http://stackoverflow.com/questions/22697837/stack-overflow-error-in-delphi when setting array (of records) length up vote 3 down vote favorite I am busy building an application in which I am reading data from more two files of "records". I have a very strange error, which pops up depending on the sequence in which I open the files (see code below). If I click button1 followed by button 2, thus calling the file of "weather data http://stackoverflow.com/questions/5413918/delphi-stack-overflow-and-access-violation-error-when-setting-array-of-records records" followed by the file of "parameters records", all is fine. If I do this the other way around, I get a "stack overflow" followed by "access violation at 0x7c90e898: write of address" error. This happens when I call SetLength for the array in Button1Click. The weather data file has about 550 records, and the parameters file has about 45 records. Can anyone see anything obvious wrong with my code? I am not sure how to attach files, or make them available, if anyone wants to use them to test... unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, Grids,FileCtrl,Contnrs; type TWeatherData = record MyDate : TDate; Rainfall : Double; Temperature : Double; end; TParameters = record Species : string[50]; ParameterName: string[50]; ParameterValue : double; end; TForm1 = class(TForm) Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); Var WeatherDataFile : file of TWeatherData; j : integer; WeatherDataArray : array of TWeatherData; MyFileSize : Integer; begin AssignFile(WeatherDataFile,'C:\Test5.cmbwthr') ; Reset(WeatherDataFile); MyFileSize := FileSize(WeatherDataFile); SetLength(WeatherDataArray,MyFileSize); j := 0; try while not Eof(Weath
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta http://stackoverflow.com/questions/27985689/delphi-property-stackoverflow-error Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack http://www.delphipages.com/forum/showthread.php?t=62028 Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping stack overflow each other. Join them; it only takes a minute: Sign up Delphi property stackoverflow error up vote 7 down vote favorite 4 My Property Class: unit SubImage; interface type TSubImage = class private { private declarations } function getHeight: Integer; function getWidth: Integer; procedure setHeight(const Value: Integer); procedure setWidth(const Value: Integer); protected { protected declarations } public stack overflow error { public declarations } property width : Integer read getWidth write setWidth; property height : Integer read getHeight write setHeight; published { published declarations } end; implementation { TSubImage } function TSubImage.getHeight: Integer; begin Result:= height; end; function TSubImage.getWidth: Integer; begin Result:= width; end; procedure TSubImage.setHeight(const Value: Integer); begin height:= Value; end; procedure TSubImage.setWidth(const Value: Integer); begin width:= Value; end; end. Assignment: objSubImg.width:= imgOverview.width; objSubImg.height:= imgOverview.heigh Interesting Error: stackoverflow at xxxxxx I am learning to properties in Delphi. I created a class, but it gives an error. I couldn't understand, where is my mistake? Also i dont understand why we use property instead of setter/getter methods. Anyway can someone help me, how can i fix this code ? I can not set property value. delphi share|improve this question asked Jan 16 '15 at 14:04 Dauezevy 1 why always vote down? I just trying to learn....... –Dauezevy Jan 16 '15 at 14:12 2 I really don't understand the downvote. This is a quite beautifully asked question. You could