Author Topic: Codeblocks Error "Failed to convert xxx file" when running threadsearch plugin  (Read 688 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5055
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Hi, do you guys see this issue? I'm using the latest nightly build version.
I see this day by day, here is the screen shot, search one the forum I get such post about ten years ago. Codeblocks Error "Failed to convert file", but the post said we have to add a second parameter to the file.Open() function, but when I search the ThreadSearch's source code, they all have the second argument.

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5055
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
I did some further test, it looks like this issue only happens on wx2.8 based C::B, my self build C::B which is wx3.1 based don't show this error message.

To test this issue, you can directly run threadsearch on the file "sdk\resources\lexers\lexer_powershell.sample". While, I also see that in my wx2.8, I can't open the file in the build-in editor, the editor just shows empty content. While under wx3.1 based C::B, I can correctly open the file under the buildl-in editor.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1919
i too get this error many times, but only on wx3.0 builds... It is really annoying, for example if you search in *.* and you have some .bmp files in it... But i never investigated into it..

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10967
    • Travis build status
You cannot open a bmp in a cbeditor and this is what threadsearch tries to do. Not sure why. Probably to do correct encoding detection. I've not investigated, too.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5055
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Is it possible to translate those message box(dialog) to some logs, because the message box is so annoying, while I can live with the logs. ;)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10967
    • Travis build status
Probably. Many people want to be able to disable various info windows. So a config system for those might be useful.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1919
Isn't there the annoying dialog api?And there should be a subfunction for MessageBox that creates a hide able dialog.. I don't know if it is possible to log it instead...
If this is not a wx dialog it should be pretty easy...