Author Topic: SpellChecker crash  (Read 9155 times)

Offline sarun

  • Multiple posting newcomer
  • *
  • Posts: 14
SpellChecker crash
« on: March 26, 2012, 03:53:52 am »
I've built Code::Blocks SVN 7909 and 7910 and I found some problem with SpellChecker plugin. After I open editor settings and press OK, Code::Blocks crashed. And this is the crash from build log :
Quote
Problem signature:
  Problem Event Name:   APPCRASH
  Application Name:   codeblocks.exe
  Application Version:   0.0.0.0
  Application Timestamp:   4f6fb031
  Fault Module Name:   SpellChecker.dll
  Fault Module Version:   0.0.0.0
  Fault Module Timestamp:   4f[/img]6fb043
  Exception Code:   c0000005
  Exception Offset:   00048d36
  OS Version:   6.1.7601.2.1.0.256.48
  Locale ID:   1033
  Additional Information 1:   c85f
  Additional Information 2:   c85f88310a005693e260adfb2aa30865
  Additional Information 3:   f8cb
  Additional Information 4:   f8cb526cea840a05e3da65a966f86f09

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt
(this log is from windows 7)

This build use MinGW-GCC version 4.6.2

From my experience, the problem exception code "c0000005" is something about NULL pointer. Could someone fix this?

EDIT: If I remove SpellChecker.dll from share\CodeBlocks\plugins, it'll be fine.

PS. To admins, I'm sorry if this topic is in the wrong category.

[attachment deleted by admin]
« Last Edit: March 26, 2012, 03:56:53 am by sarun »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: SpellChecker crash
« Reply #1 on: March 26, 2012, 07:00:43 am »
After I open editor settings and press OK, Code::Blocks crashed.
Sorry, works fine here. Did you forget to update your sources/resources? Try with a nightly - is it the same there?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline sarun

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: SpellChecker crash
« Reply #2 on: March 26, 2012, 08:06:36 am »
What compiler do you use, official MinGW or TDM-GCC?

Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Re: SpellChecker crash
« Reply #3 on: March 26, 2012, 09:02:18 am »
Did you happen to apply a patch from the SpellChecker thread?
At some point there was a crash candidate, caused by the configuration panel pointing to a language that isn't available.

The workaround is to right-click in the status bar (the bottom right corner of the Code::Blocks frame), where you can see "de_CH" or something similar. change it to a language you actually have available, and C::B won't crash in the editor config dialog any more.

Also, please try this build and let us know if that one works.
« Last Edit: March 26, 2012, 09:04:48 am by ptDev »

Offline sarun

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: SpellChecker crash
« Reply #4 on: March 26, 2012, 09:26:21 am »
@MortenMacFly : The nightly bulid works fine, but due to @ptDev, the nightly build has de_CH on the right corner, but my build has a plus sign instead of de_CH.

Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Re: SpellChecker crash
« Reply #5 on: March 26, 2012, 10:02:41 pm »
@MortenMacFly : The nightly bulid works fine, but due to @ptDev, the nightly build has de_CH on the right corner, but my build has a plus sign instead of de_CH.

The default setting of de_CH has nothing to do with my patch. That is not the problem in itself.
de_CH has always been the default language selection of the SpellChecker (you can look up in SpellCheckerConfig::Load()). You get the cross (flag of Switzerland) in your local build, because that flag .png is included in the repository, and it gets copied to ... share\CodeBlocks\Spellchecker during the contrib plugins build.

The problem is caused by a missing check when populating and selecting the dropdown in the configuration page. de_CH is loaded to status bar field as the current string/selection (since it is a valid selection, because it is in the language map, but the language is not installed in the nightly build, nor in the unofficial installer build, no flag is shown there, and the string appears). Then, when the Editor configuration dialog appears, the Spellchecker configuration page tries to look up for the matching human readable name in the language name map, gets the end() iterator, and still tries to get a string from there. There's your access violation.

I'll try to conjure a simple fix for this, unless @danselmi already noticed it.

Offline danselmi

  • Developer
  • Almost regular
  • *****
  • Posts: 203
Re: SpellChecker crash
« Reply #6 on: March 26, 2012, 10:20:20 pm »
Fixed in rev. 7913.
Thanks for reporting.