New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal Error when open MMEX 1.3.0 #979

Closed
ibnbr opened this Issue Jan 3, 2017 · 27 comments

Comments

Projects
None yet
7 participants
@ibnbr

ibnbr commented Jan 3, 2017

make sure these boxed are checked before submitting your issue - thank you!

  • Check OS
    • Windows
    • Mac OSX
    • Linux
  • Check MMEX version
  • 1.3.x
  • 1.2.x
  • 1.1 or older

XML of error -> http://pastebin.com/9QzbJjm0

mmex_2017-01-03_09-10-04
chrome_2017-01-03_09-11-07

@guanlisheng guanlisheng added this to the v1.3.x milestone Jan 4, 2017

@vomikan

This comment has been minimized.

Contributor

vomikan commented Jan 4, 2017

We need more details to investigate this issue.
Could you try install portable mmex and create new empty DB.
Then open exiting DB.

@ibnbr

This comment has been minimized.

ibnbr commented Jan 4, 2017

I cant open a new DB, because this error occurs before I choose de Langague.

I tested all 1.30 portable build.

On version 1.27 it's all OK.

Edit: I'm a developer in other languages, if You need something more technical, explain me how to do.

Thanks

@Spoker

This comment has been minimized.

Spoker commented Jan 4, 2017

I have the same issue on a 64-bit win7 pro SP1 machine where I am not an admin.
On another 64-bit win 10 machine, where I am an admin, it works fine.

@ibnbr

This comment has been minimized.

ibnbr commented Jan 4, 2017

I'm admin on this machine. It's Win10, I tried run as admin Don't Work.

On my notebook with Win10 works fine.

@vomikan

This comment has been minimized.

Contributor

vomikan commented Jan 4, 2017

  • Seems mmex can't cteate mmexini.db3 file. For portable folder be sure that the folder is not Read Only.

  • May be there are others msvcp120.dll and msvcr120.dll files in the system?

@Spoker

This comment has been minimized.

Spoker commented Jan 4, 2017

I tried it again with the latest build (i chose 32-bit version this time), but same error.
I can attach a log file.

MoneyManagerEx.txt
error

@ibnbr

This comment has been minimized.

ibnbr commented Jan 4, 2017

It's not read only.

theres is a lot of msvcp120.dll in my PC, A search of msvcp120.dll in C:

explorer_2017-01-04_11-51-21

@vomikan

This comment has been minimized.

Contributor

vomikan commented Jan 10, 2017

@ibnbr

This comment has been minimized.

ibnbr commented Jan 10, 2017

nothing, still have error

mmex_2017-01-10_13-24-06

@Spoker

This comment has been minimized.

Spoker commented Jan 11, 2017

Same here, problem persists.

@stef145g

This comment has been minimized.

Contributor

stef145g commented Feb 3, 2017

@ibnbr , I noted that you are a developer as well. Could you use MSVC 2015 and build a debug version?
Instructions on how to build mmex is in the readme.txt file under build\msw-vc-2015 and build\msw-vc-2017

Running in the debug version will hopefully be able to pinpoint where it fails. Running in the IDE will definitely help.

@ibnbr

This comment has been minimized.

ibnbr commented Feb 3, 2017

@stef145g I get error installing MSVC 2015/2017, I think the problem is my PC.

Error: http://i.imgur.com/RCehFkg.png

I'm using mmex on another PC and it's OK.

@stef145g

This comment has been minimized.

Contributor

stef145g commented Feb 3, 2017

@ibnbr you may me able to check out your system for system errors by running the command in an administrator console:
screenshot 2017-02-04 00 26 13
Discovered this command while investigating another problem on my brother's computer. My computer completes verification without errors.

@pdoggyster

This comment has been minimized.

pdoggyster commented Feb 7, 2017

I get same error with portable 1.3.x

@pdoggyster

This comment has been minimized.

pdoggyster commented Feb 8, 2017

@stef145g
I tried run in the debug mode and I get an error in the mongoose.c. See in the pic
2017-02-09 00_40_23-mmex debugging - microsoft visual studio

@stef145g

This comment has been minimized.

Contributor

stef145g commented Feb 9, 2017

Thanks for the screen shot. It appears to be associated with setting up the http server provided by mongoose, but not sure at what point this is occurring within the mmex main code.

Could you try it again - activate 'Break' button. This will allow you to bring up the 'call stack' screen. This will show the subsequent calls to this procedure.

@pdoggyster

This comment has been minimized.

pdoggyster commented Feb 9, 2017

@stef145g

Did you think of this?
image

@stef145g

This comment has been minimized.

Contributor

stef145g commented Feb 11, 2017

@pdoggyster
Looking at the call stack, while the failed call position matches, the other code lines do not appear to match my code.

Mongoose has been updated and perhaps you may not have the latest submodule at SHA-1: 36a1927915f966f20486a80070f0428f2606a53a


The call stack indicates that it fails when attempting to send usage stats via mongoose connection server. Sending usage stats can be turned off by setting the key: SENDUSAGESTATS to FALSE in mmexini.db3. Some users have reported that this makes no difference while other reports say that this works for them. This bug appears to be a difficulty one to solve.

@stef145g

This comment has been minimized.

Contributor

stef145g commented Feb 11, 2017

@pdoggyster you can ignore the first part of my last post.

Sending user stats and setting a break point at the fail point, I get the same line codes. Using the mouse pointer, hovering over the variable pointer nc and expanding it shows an active manager connection:
msvc screenshot 2017-02-11 13 21 56
I have stepped over the fail point in order to show the value of the variable: mg_http_handler
Can you see similar results before executing the problem code?

@pdoggyster

This comment has been minimized.

pdoggyster commented Feb 11, 2017

hovering over the variable pointer nc in the 5049 line:
image

@pdoggyster

This comment has been minimized.

pdoggyster commented Feb 11, 2017

in the 5050 line:
image

@stef145g

@pdoggyster

This comment has been minimized.

pdoggyster commented Feb 11, 2017

I couldn't find the SENDUSAGESTATS key in the mmexini.db3. This key isn't setting up in the setting_v1 table only the UUID

@stef145g

This comment has been minimized.

Contributor

stef145g commented Feb 18, 2017

The SENDUSAGESTATS key is only set in the mmexini.db3 file when it is changed by options. It is initially hard coded with a default setting of 'TRUE' in file option.cpp line 181. You may need to create a key or change the line in option.cpp to disable it for testing purposes.

What your screen shots have highlighted is that the mongoose server is not being started, resulting in a crash.

I have attempted to determine how mongoose is activated and used in my machine. I can disable line 194 in mmex.cpp and mmex still works. I have also set up various breakpoints within mongoose, and these are not being activated. In my machine, it appears that the mongoose server is not being accessed but a http connection is still being made.
Perhaps @siena123 or @guanlisheng can shed more light on this.

@siena123

This comment has been minimized.

Contributor

siena123 commented Feb 18, 2017

Mongoose server and SENDUSAGESTATS are two completely different items and are handled differently although both use mongoose to do the work.

Mongoose server is started as its own thread in webserver.cpp line 161. Commenting out line 194 in mmex.cpp would do the same thing as setting the ENABLEWEBSERVER option to FALSE.

The SENDUSAGESTATS is also done in its own thread which is started in Model_Usage.cpp line 190.

The WebServerThread and SendStatsThread code is also located in their respective files from which their threads are started.

From the screen shot provided in an earlier post the mg_connection pointer was set to null which is check for before being used in the webserver.cpp line 111 but I noticed that we are not doing that in Model_Usage.cpp line 214/216 which could be the problem.

The other item i noticed was the comment about not being an admin on the system which would mean more restricted rights and the system could have failed to properly create the mongoose instance to send the usage stats so the mg_connection pointer would then be null and we are not checking for a valid pointer before passing it to the mg_set_protocol_http_websocket function which is where it is shown at the break point.

siena123 added a commit to siena123/moneymanagerex that referenced this issue Feb 18, 2017

siena123 added a commit that referenced this issue Feb 18, 2017

Merge pull request #1061 from siena123/feat-791
fix(#979): check for null pointer
@siena123

This comment has been minimized.

Contributor

siena123 commented Feb 18, 2017

@pdoggyster, I updated the code with a check for the the null pointer that I suspect is your problem. Could you get the latest code (or make the same change I did) and try it in the debugger again.

Thanks

@Spoker

This comment has been minimized.

Spoker commented Feb 18, 2017

@siena123 I can confirm that the fatal error on startup is fixed after your latest commit.
Thank you!

@pdoggyster

This comment has been minimized.

pdoggyster commented Feb 20, 2017

Yes, this fix solved the problem. Thanks!
Which release will include this fix?
@siena123

vomikan added a commit that referenced this issue Feb 23, 2017

@vomikan vomikan closed this Feb 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment