digitalmars.D - Access Violation line number
- =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?= (6/6) Aug 18 2005 Hi.
- Sean Kelly (6/8) Aug 18 2005 You can't :p Access violations are triggered by the hardware and handle...
- Jarrett Billingsley (10/22) Aug 18 2005 You know what would be awesome? If D did null object checking like it d...
- AJG (3/8) Aug 18 2005 YES. Please.
- ElfQT (3/3) Aug 18 2005 A bitt off, but speaking of Assert, a text message would be also highly
- Chuck Esterbrook (8/33) Aug 20 2005 I just wanted to cast my vote for this idea. This would be a great
- =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?= (3/37) Aug 20 2005 This would work exactly as I want. An AssertError before the access
- Ben Hinkle (5/11) Aug 20 2005 Run the program in WinDbg (or gdb on Linux). It will stop at the violati...
Hi. How can I obtain the line number where an Access Violation occured? Up until now I've scattered lots of writefs to see when they would stop printing but it's a lot of guessing work. Can't the access violation message print at least the function/method that is in execution atm? Thanks.
Aug 18 2005
In article <de2828$2qi3$1 digitaldaemon.com>, =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?= says...Hi. How can I obtain the line number where an Access Violation occured?You can't :p Access violations are triggered by the hardware and handled by hook functions in Phobos. Your best bet would be to alter that code to signal the debugger. Sean
Aug 18 2005
"Sean Kelly" <sean f4.ca> wrote in message news:de29h0$2saa$1 digitaldaemon.com...In article <de2828$2qi3$1 digitaldaemon.com>, =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?= says...You know what would be awesome? If D did null object checking like it does array bounds checking. Array bounds checking works like: assert(someIndex>=0 && someIndex<a.length); x=a[someIndex]; Kind of an implicit assert. The same could be done for member access, such as assert(obj !is null); obj.doSomething(); This would help find probably 90% of the access violations that you get in D.Hi. How can I obtain the line number where an Access Violation occured?You can't :p Access violations are triggered by the hardware and handled by hook functions in Phobos. Your best bet would be to alter that code to signal the debugger. Sean
Aug 18 2005
You know what would be awesome? If D did null object checking like it does array bounds checking. Array bounds checking works like: assert(someIndex>=0 && someIndex<a.length); x=a[someIndex];Kind of an implicit assert.The same could be done for member access, such as assert(obj !is null); obj.doSomething();YES. Please. Thank you, --AJG.
Aug 18 2005
A bitt off, but speaking of Assert, a text message would be also highly appreciated. I guess that was asked before.
Aug 18 2005
On Thu, 18 Aug 2005 14:48:26 -0400, "Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote:"Sean Kelly" <sean f4.ca> wrote in message news:de29h0$2saa$1 digitaldaemon.com...I just wanted to cast my vote for this idea. This would be a great productivity boost. This is also the type of thing we could work in ourselves if we had a D-to-D front end (see my tiny thread in this news group, "D-to-D [was: ..."). -ChuckIn article <de2828$2qi3$1 digitaldaemon.com>, =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?= says...You know what would be awesome? If D did null object checking like it does array bounds checking. Array bounds checking works like: assert(someIndex>=0 && someIndex<a.length); x=a[someIndex]; Kind of an implicit assert. The same could be done for member access, such as assert(obj !is null); obj.doSomething(); This would help find probably 90% of the access violations that you get in D.Hi. How can I obtain the line number where an Access Violation occured?You can't :p Access violations are triggered by the hardware and handled by hook functions in Phobos. Your best bet would be to alter that code to signal the debugger. Sean
Aug 20 2005
This would work exactly as I want. An AssertError before the access violation. Jarrett Billingsley wrote:"Sean Kelly" <sean f4.ca> wrote in message news:de29h0$2saa$1 digitaldaemon.com...In article <de2828$2qi3$1 digitaldaemon.com>, =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?= says...You know what would be awesome? If D did null object checking like it does array bounds checking. Array bounds checking works like: assert(someIndex>=0 && someIndex<a.length); x=a[someIndex]; Kind of an implicit assert. The same could be done for member access, such as assert(obj !is null); obj.doSomething(); This would help find probably 90% of the access violations that you get in D.Hi. How can I obtain the line number where an Access Violation occured?You can't :p Access violations are triggered by the hardware and handled by hook functions in Phobos. Your best bet would be to alter that code to signal the debugger. Sean
Aug 20 2005
"Julio César Carrascal Urquijo" <adnoctum phreaker.net> wrote in message news:de2828$2qi3$1 digitaldaemon.com...Hi. How can I obtain the line number where an Access Violation occured? Up until now I've scattered lots of writefs to see when they would stop printing but it's a lot of guessing work. Can't the access violation message print at least the function/method that is in execution atm? Thanks.Run the program in WinDbg (or gdb on Linux). It will stop at the violation and you can get the stack and open the source and view the problem statement. Compile with -g.
Aug 20 2005