Recent

Author Topic: OpenDialog brings debugger to crash down  (Read 9447 times)

Astro005

  • Newbie
  • Posts: 1
OpenDialog brings debugger to crash down
« on: August 09, 2007, 11:03:29 am »
I'm not so experienced with the use of different components, so I tried how OpenDialog should work. A short testing sample looked like this:

 
Code: [Select]
OpenDialog1.InitialDir := AktuellerPfad ;
  IF OpenDialog1.Execute THEN
    begin
      Dateiname := OpenDialog1.FileName ;
      MessageDlg(Dateiname,mtInformation,[mbOK],0) ;
    end ;


ofOverWritePrompt = True; ofPathMustExist = True; ofFileMustExist = True; ofCreatePrompt = True; ofEnableSizing = True; ofViewDetail = True; all other properties = False.

The code works well as long as I click on an existing File in the dialog window. When I modify the name (either if the file is existing or it does not exist), I get a warning windows. When I try now to open the dialog again, then the debugger crashes down saying: "Debuggerfehler. Der Debugger ist abgestürzt." (debugger error. The debugger has crashed down). Sometimes the debugger crashes immediately down.

So my question is: what am I doing wrong? Where is my mistake? Can anybody help me? Thanks a lot! :lol:  :lol:

Astro005   :roll:

WhiteRaven

  • Newbie
  • Posts: 2
OpenDialog brings debugger to crash down
« Reply #1 on: August 11, 2007, 03:51:55 am »
Not only a Open Dialog. Exception raises on creating handle of a CustomDialog, and raised by the RPC server. May be parameters to open this dialog are sended incrrectly. I can't solve this problem too... :-(

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
OpenDialog brings debugger to crash down
« Reply #2 on: August 11, 2007, 09:43:00 pm »
I can reproduce this issue. Strangely enough the crash does not happen if I run the compiled app in gdb from the command line.

Can you create a bug report with your example program?

WhiteRaven

  • Newbie
  • Posts: 2
OpenDialog brings debugger to crash down
« Reply #3 on: August 15, 2007, 12:57:18 pm »
I has been searched the sources of LCL for probably wrong code and compare it with WinAPI examples (MSDN). The result is: This error appends on All applications that uses FileDialogs (Not only Lazarus applications, but like a Notepad, e.t.c.), This error is External and (checked by OllyDebug) is a part of RPC service, this error handled by RPC service too. In this reason exception raises only while debug process, not runtime. Try to make file, run it without debugger and see the result, all work Ok!

Yes, i can create debug report. What must be included in it?

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
OpenDialog brings debugger to crash down
« Reply #4 on: August 15, 2007, 08:08:39 pm »
Can you try to run the application in gdb from the command line.

See for instructions: http://wiki.lazarus.freepascal.org/Creating_a_Backtrace_with_GDB#Creating_a_Backtrace

 

TinyPortal © 2005-2018