Jump to content

Latest Beta


Jon
 Share

Recommended Posts

Maybe it's one of those bugs where it's always been broken and some in memory buffer has moved with the new compiler and a previously unseen memory problem is showing up. I hate those.

No, the crash happens in the changes I made the other day but I can't figure out why. A std::vector is becoming corrupt for no reason I can determine. I reverted my changes and used const_cast to silence the compiler errors and the code worked using the original std::set. Definitely related to my changes but I've no clue why. I do have a couple things to try when I find time but if that doesn't fix it we may have to go with the nasty const_cast version until I can determine what the code is supposed to do so it can be re-written

Link to comment
Share on other sites

It's a pity that valgrind doesn't exist for Windows OSes. OTOH AutoIt definitely is way too Windows dependent to have any hope using such a valuable tool.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

  • Administrators

No, the crash happens in the changes I made the other day but I can't figure out why. A std::vector is becoming corrupt for no reason I can determine. I reverted my changes and used const_cast to silence the compiler errors and the code worked using the original std::set. Definitely related to my changes but I've no clue why. I do have a couple things to try when I find time but if that doesn't fix it we may have to go with the nasty const_cast version until I can determine what the code is supposed to do so it can be re-written

I assume that set wasn't used in our code because of the properties mentioned here?: http://stackoverflow.com/questions/3704273/c-dequeue-vs-vector-and-c-map-vs-set (uniqueness, order, etc).
Link to comment
Share on other sites

Indeed valgrind act as magic and is able to spot incredibly subtle causes, right.

What is not working is Debug buttons of any dev environment. Choose any buggy code as source and hit Debug: code is still buggy afterwards.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

I assume that set wasn't used in our code because of the properties mentioned here?: http://stackoverflow.com/questions/3704273/c-dequeue-vs-vector-and-c-map-vs-set (uniqueness, order, etc).

I suspect it was originally a set because sets are implemented as binary trees which means they are speedy. Also it appears to have the same interface as the object using the set so I think that was also a factor.

I think I'm going about the problem wrong. Maybe the code should be using a set and returning references instead of pointers. Probably require more changes to the code but I think it's probably the correct way.

Link to comment
Share on other sites

Indeed valgrind act as magic and is able to spot incredibly subtle causes, right.

What is not working is Debug buttons of any dev environment. Choose any buggy code as source and hit Debug: code is still buggy afterwards.

It shouldn't be the software's job to make sure other software works. That's what you pay a programmer for.
Link to comment
Share on other sites

For what it's worth here is my bug report. Don't cancel your wedding or your child's birthday party.

$oObject.Example.Example() has odd colorings. The first example is bold blue and the second example is plain black text. The '.E' in the second is another color altogether.

Link to comment
Share on other sites

It shouldn't be the software's job to make sure other software works. That's what you pay a programmer for.

So I should get rid of the Visual Studio debugger, then?

Really, Richard, you say some dumb things sometimes but you're really saying some incredibly dumb things today.

Link to comment
Share on other sites

It solves a crucial problem: Where the fuck is my code crashing.

It gives you the runtime situation but it doesn't just read the code and say "right here dumbass."

Not calling you one, but that's how you'd feel if a program just pointed out your errors for you.

Edited by Richard Robertson
Link to comment
Share on other sites

It gives you the runtime situation but it doesn't just read the code and say "right here dumbass."

Not calling you one, but that's how you'd feel if a program just pointed out your errors for you.

In some cases, yes it does. Seeing which line the crash happens on is often enough to know why the crash exists. Anyway, I feel SOOOO much better when I spend a half hour going through my code to find the dumbass mistake myself. Sorry, but if I had something that could go through my code and tell me where the errors were BEFORE shipping and WITHOUT spending hours looking for it after-the-fact, then I'll take it.

You're not going to win this, Richard. You're comment was just plain idiotic. You show many any programmer and you've shown me a programmer who makes mistakes. Some of those mistakes can be easily caught by software-based tools looking for them. Have you ever use Au3Check even once in your life? Guess what it is: A tool to detect mistakes in your code. Sometimes we make typos in otherwise fundamentally sound pieces of code. Sometimes we accidentally type "=" when we mean "==". Sometimes we get in a hurry and forget to add that call to delete. It happens, it doesn't mean we are bad programmers. Should we ship a product with bugs just because we're too proud to use tools to detect them? I feel more like a dumbass that AutoIt was shipped with a blindingly obvious memory leak in FileOpen() than I ever would having such an error pointed out to me by software. Keep in mind I feel that way and it wasn't even code I touched. Hell, the C++ compiler is a tool that helps detect bugs, there are many cases where it will issue a warning for otherwise working but less than ideal code. I guess we shouldn't use the compiler, either?

Any tool that exists to ensure the programmer does not make mistakes and to assist the programmer in correcting mistakes is a good thing. Anybody who says otherwise is not someone worth listening to. Full stop.

Link to comment
Share on other sites

I've found this reading to be very enlightning about common pitfalls in C[++], providing lights about "it worked with previous releases of the same compiler" issues and much more.

It shows how seamingly correct simple code can turn into something you'd never expect.

A must read, that you write C[++] occasionally or 10 hours a day.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...