View Issue Details

IDProjectCategoryView StatusLast Update
0005402JEDI VCL03 Donationspublic2010-11-22 22:31
Reporterpka4916Assigned Tojfudickar 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.40 
Target VersionFixed in Version 
Summary0005402: Crash in progressbar with Thread Dialog fix 0005392:
Descriptionafter this was added from my donation
0005392: Missing some JvThreadDialog Options in the Component Inspector

it crashes now if I make the maxprogress > 100

I use
progressdialog.DialogOptions.ProgressBarMax:=5300;

as soon as I use

importnfothread.ThreadDialogForm.Show;

the program crashes with

First chance exception at $75A1B727. Exception class EInvalidOperation with message 'TJvDynControlVCLProgressBar property out of range'.

it was working fine with my donation soure :)

Additional InformationDon't see the JVCL part in my category,so I just put it under Donation

TagsNo tags attached.

Relationships

child of 0005392 resolvedjfudickar Missing some JvThreadDialog Options in the Component Inspector 

Activities

outchy

2010-11-15 10:35

administrator   ~0018108

move to the JVCL project.

jfudickar

2010-11-15 12:33

developer   ~0018110

Could you create a sample showing the behaviour

pka4916

2010-11-15 14:07

reporter   ~0018111

In my import thread I only have this code. and the importlist.count = 5300
importlist: TListBox;
progressdialog: TJvThreadSimpleDialog;


progressdialog.DialogOptions.Caption:='Importing Files';
progressdialog.DialogOptions.ProgressBarMax:=importlist.Count;
progressdialog.DialogOptions.ProgressBarMin:=1;
importnfothread.ThreadDialogForm.Show;


for i := 0 to importlist.Count - 1 do
begin
progressdialog.DialogOptions.ProgressBarPosition:= i;
progressdialog.DialogOptions.InfoText:='Importing File '+inttostr(i)+' of ' +inttostr(importlist.Count-1);
end;

This is generating the error, while if I replace the PAS file with the one I uploaded, it's working fine.

jfudickar

2010-11-18 00:34

developer   ~0018126

Please post the full source code of the sample application.

pka4916

2010-11-18 05:03

reporter   ~0018128

I'll upload a test project.
since i started from scratch, I can't get it to work at all
Getting an OS failure, randomly.

BTW, the dialog is attached to a Thread.

2010-11-18 05:04

 

testbar.zip (8,002 bytes)

pka4916

2010-11-19 01:55

reporter   ~0018137

ok, figured out the problem

by DEFAULT the ProgressBarMax = 0 in the control.
If I change it to 100 then it's fine.

So, even if you change it in a procedure, it will crash on that,
so I guess you need to make the default 100 instead of 0

pka4916

2010-11-19 01:57

reporter   ~0018138

in the control itself..

(sorry for the 2nd note. Can't edit mine for some reason. (no button)

jfudickar

2010-11-21 21:49

developer   ~0018140

I've changed your code and now I don't get any errors.

The main question: Why do you call the show inside the thread?


procedure TForm1.Button1Click(Sender: TObject);
begin
JvThread1.ExecuteWithDialog(self);
end;


procedure TForm1.JvThread1Execute(Sender: TObject; Params: Pointer);
var
i : integer;
begin
progressdialog.DialogOptions.Caption:='Importing Files';
progressdialog.DialogOptions.ProgressBarMax:=5400;
progressdialog.DialogOptions.ProgressBarMin:=1;
//jvthread1.ThreadDialogForm.Show;
for i := 0 to 5400 do
begin
progressdialog.DialogOptions.ProgressBarPosition:= i;
progressdialog.DialogOptions.InfoText:='Importing File '+inttostr(i)+' of 5400';
sleep(1);
end;

pka4916

2010-11-21 23:16

reporter   ~0018141

? that's how it's showing once I attach the progress bar to the thread
(option in the Thread control).


How else do I need to use it then ?

pka4916

2010-11-21 23:18

reporter   ~0018142

btw. if I change the 0 in the progressdialog control to 100, then I don't get the error. (see 2 posts above it)

jfudickar

2010-11-21 23:45

developer   ~0018143

There is no reason to call the ThreadDialogForm.Show manually.

Call
JvThread1.ExecuteWithDialog(self);
as shown in my code. And everything is fine.

pka4916

2010-11-22 01:43

reporter   ~0018144

ok, thanks. missed that command..
Then this issue can be closed

Issue History

Date Modified Username Field Change
2010-11-13 02:22 pka4916 New Issue
2010-11-13 02:22 pka4916 IDE version => Delphi/C++Builder 2009
2010-11-15 10:34 outchy Project JEDI Code Library => JEDI VCL
2010-11-15 10:35 outchy Note Added: 0018108
2010-11-15 10:35 outchy Category Donation => 03 Donations
2010-11-15 10:35 outchy Product Version Version 2.3 (Subversion repository/Daily zips) => 3.40
2010-11-15 10:47 obones Relationship added child of 0005392
2010-11-15 12:21 jfudickar Assigned To => jfudickar
2010-11-15 12:33 jfudickar Note Added: 0018110
2010-11-15 13:44 obones Status new => feedback
2010-11-15 14:07 pka4916 Note Added: 0018111
2010-11-18 00:34 jfudickar Note Added: 0018126
2010-11-18 05:03 pka4916 Note Added: 0018128
2010-11-18 05:04 pka4916 File Added: testbar.zip
2010-11-19 01:55 pka4916 Note Added: 0018137
2010-11-19 01:57 pka4916 Note Added: 0018138
2010-11-21 21:49 jfudickar Note Added: 0018140
2010-11-21 23:16 pka4916 Note Added: 0018141
2010-11-21 23:18 pka4916 Note Added: 0018142
2010-11-21 23:45 jfudickar Note Added: 0018143
2010-11-22 01:43 pka4916 Note Added: 0018144
2010-11-22 22:31 jfudickar Status feedback => resolved
2010-11-22 22:31 jfudickar Resolution open => fixed