View Issue Details

IDProjectCategoryView StatusLast Update
0011663LazarusWidgetsetpublic2013-09-03 12:07
ReporterFarshad Mohajeri Assigned ToFelipe Monteiro de Carvalho  
PrioritynormalSeveritymajorReproducibilityrandom
Status closedResolutionfixed 
Product Version0.9.25 (SVN) 
Fixed in Version0.9.27 (SVN) 
Summary0011663: ARM/WinCE: calling TForm.ShowModal raises "Division By Zero" Exception
DescriptionRandomly, calling Form.ShowModal() raises the "Division by zero" error. I don't know exactly how to reproduce this but it must happens if you call ShowModal() by pressing a Button on the UI as fast as you can. The form I'm testing contains some basic controls like TLabel and TButton. Same App works with no problem if I use Show() instead of ShowModal().

I'll try to provide a testcase.

TagsNo tags attached.
Fixed in Revision
LazTarget1.4
WidgetsetWinCE
Attached Files

Activities

Vincent Snijders

2008-07-15 21:24

manager   ~0020713

Maybe caused by focussing an already focused form (calling showmodal twice on the same form)??

Farshad Mohajeri

2008-07-15 23:32

reporter   ~0020717

I think it should be technically impossible to call it twice from UI. Once you call the ShowModal focus is passed to the new Form and it will stay there until you close it. User shouldn't be able to call ShowModal twice no matter how fast he presses the UI controls.

Vincent Snijders

2008-07-15 23:42

manager   ~0020718

"should" it the right word here, indeed.

Felipe Monteiro de Carvalho

2008-07-16 00:41

developer   ~0020720

Please provide a test project

Felipe Monteiro de Carvalho

2008-08-14 04:34

developer   ~0021312

Without a test project I cannot reproduce and thus cannot fix.

Farshad Mohajeri

2008-08-19 22:48

reporter   ~0021500

Last edited: 2008-08-19 23:28

Test case uploaded.

Download the file smodal.exe to a WM5/6 device and run it. Press Button1 on main form. To speed up things a TTimer automates the Close/Open process for the Modal Form (which could be done manually too). After 10-30 secs you'll get an Exception: Division by Zero.

2008-08-19 23:21

 

FPCBug.rar (440,616 bytes)

Felipe Monteiro de Carvalho

2009-08-17 18:46

developer   ~0029933

I fixed in some recent revisions while doing fixes for TOpenDialog,

Issue History

Date Modified Username Field Change
2008-07-15 18:36 Farshad Mohajeri New Issue
2008-07-15 18:36 Farshad Mohajeri Widgetset => WinCE
2008-07-15 21:24 Vincent Snijders LazTarget => post 1.2
2008-07-15 21:24 Vincent Snijders Note Added: 0020713
2008-07-15 21:24 Vincent Snijders Assigned To => Felipe Monteiro de Carvalho
2008-07-15 21:24 Vincent Snijders Status new => acknowledged
2008-07-15 23:32 Farshad Mohajeri Note Added: 0020717
2008-07-15 23:42 Vincent Snijders Note Added: 0020718
2008-07-16 00:41 Felipe Monteiro de Carvalho Note Added: 0020720
2008-07-16 00:41 Felipe Monteiro de Carvalho Status acknowledged => feedback
2008-08-14 04:34 Felipe Monteiro de Carvalho Note Added: 0021312
2008-08-19 22:48 Farshad Mohajeri Note Added: 0021500
2008-08-19 23:21 Farshad Mohajeri File Added: FPCBug.rar
2008-08-19 23:24 Farshad Mohajeri Note Edited: 0021500
2008-08-19 23:28 Farshad Mohajeri Note Edited: 0021500
2008-08-25 14:51 Vincent Snijders Status feedback => assigned
2009-08-17 18:46 Felipe Monteiro de Carvalho Fixed in Revision => 21246
2009-08-17 18:46 Felipe Monteiro de Carvalho Status assigned => resolved
2009-08-17 18:46 Felipe Monteiro de Carvalho Fixed in Version => 0.9.27 (SVN)
2009-08-17 18:46 Felipe Monteiro de Carvalho Resolution open => fixed
2009-08-17 18:46 Felipe Monteiro de Carvalho Note Added: 0029933
2009-08-17 18:50 Felipe Monteiro de Carvalho Fixed in Revision 21246 =>
2011-12-01 11:22 Marc Weustink Status resolved => closed
2013-09-03 12:07 Martin Friebe LazTarget post 1.2 => 1.4