Solved M!Table x64 crash

Report bugs and possible workarounds.
Gamadil
France
Posts: 15
Joined: 11 Jan 2019, 12:01
Location: LYON, France

M!Table x64 crash

Post by Gamadil » 12 Jan 2019, 13:10

/EDIT ADMIN
The posts concerning M!Table x64 crash are moved to this dedicated topic



Hi micsto

I'm happily using mtbl for 20 years, but I'm quite in trouble... there is a huge application (massively using mtbl) I have to translate from 32 bits (works nice in GTD7.0/32) to GTD7.0.5/64. I'm using mtbl70x64, (last version dated 12/10/2018) and any call to a mtbl function is provoking instability, quickly leading to the horrific "Internal memory has become invalid" message, or a crash. Seems the first table accept to be formatted with MTblSubClass , but any subsequent call to this function or mtbl function (or use of the table, like selecting a row) trigger the error.

I started the mtbl.app application to make some more inquiries - seems to works quite fine, anyway better than with my application, but totally crash (with GTD crashing to when in run mode) when I'm clicking on any column title 'like "I'm a column header group", so I suppose there is basically some problem in this version of mtbl. Or may I be doing something wrong ? Is there any previous steps I missed like regsvr32 something ?

Thanks for the nice work on mtbl - and for the help

Guillaume

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 1260
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: M!Table 3.0.1 has been released

Post by Dave Rabelink » 12 Jan 2019, 21:10

Hi Guillaume,

I just tested the M!Table sample application in TD70 x64 and TD71 x64 and found no crashes when clicking column titles.
Is there any previous steps I missed like regsvr32 something
No steps needed. M!Table is registration-less.

Could be a missing or different version of the Microsoft runtime?


Just another question, out of interest:

Is there a specific reason you need or want the application to be 64 bit?
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Gamadil
France
Posts: 15
Joined: 11 Jan 2019, 12:01
Location: LYON, France

Re: M!Table 3.0.1 has been released

Post by Gamadil » 14 Jan 2019, 13:20

Hi Dave

Thanks for the answer - glad to know the problem is probably locally on my side and is not impairing the whole principle of the migration. I confirm I can't click on column title in the demo application, or on any of the row headers without getting an immediate crash... I will try installing everything clean on a new workstation and see if the problem is repeating. Which version of windows are you using ? (I'm on W7).

I'm currently developing and maintaining applications for various customers in CTD 3.1, CTD 6.3, CTS 7.0/32 and CTD 7.0/64 on the same workstation (but I know it sounds crazy). I try to keep each environment clean and independent of the others, but I suspect I've got somewhere a bad dll or register entry interfering with the mtbl/64 version... I will continue looking.

For your question : The customer I'm working for is using this huge (really huge - this is the whole management of blood transfusion activity at country level) application using mainly Citrix clients. They want to switch from their current 3.1 version to 7.0 (mainly to allow the creation and use of web services based on the same functional code as the actual fat clients), and all the new Citrix servers farms they plan to use for that are 64 bits, so they consider they will get better performances and a "cleaner" environment by using a 100% 64 bits solution, may it be for the application itself, web services or Oracle clients. I'm personally not that sure the performance gain will be really interesting, but customer's king (and, well know fact, power drive you mad). Beside, it seems the bright days of 32 bit architectures are now fading, and the future is probably in full 64 bits platforms, so this is a good occasion to switch since there will be a lot to do anyway on validation to change the environment for 3000+ users - lost for lost, maybe it's better to go as far as we can :)

Cheers
Guillaume

micsto
Germany
Posts: 748
Joined: 07 Mar 2017, 16:07
Location: Germany

Re: M!Table 3.0.1 has been released

Post by micsto » 17 Jan 2019, 10:56

Hi Guillaume,

I've tested the M!Table demo app (64 Bit) in my environment and there are no crashes when clicking on a column and/or row header.
I'd recommend a stand alone installation of TD 7.05/64 on a clean workstation, then retest the M!Table demo app and/or your application.

Gamadil
France
Posts: 15
Joined: 11 Jan 2019, 12:01
Location: LYON, France

Re: M!Table 3.0.1 has been released

Post by Gamadil » 23 Jan 2019, 17:35

Hi Micsto

Thanks for the reply. I tried to execute the same application on a "new" workstation and it is indeed working quite fine. Just to get me out of a doubt, which version of windows are you using ? My "new" workstation is W10, and the one I've got the problem is W7, so I can't exclude so far a compatibility problem...

I'm stil looking for the problem - tried a lot of things like reinstalling the C++ redistributable packages and so on, but the problem is still there and I'm really wondering at what can happen. As soon as I MtblSubClass a table window (no more needed), clicking on a column or row header get me an instant crash. I traced the execution, and this is not a CTD instruction or DLL call - seems it is just the message sent to Windows itself to highlight the column/row which is provoking the crash.

I will continue searching...

Gamadil
France
Posts: 15
Joined: 11 Jan 2019, 12:01
Location: LYON, France

Re: M!Table 3.0.1 has been released

Post by Gamadil » 23 Jan 2019, 17:44

One last thing : I don't need to SubClass, just calling any function is enough, including MtlIsSubClassed

With a base application with only one main window containing one table window containing one column.
(mtbl.apl is included)

On SAM_CreateComplete
Call SalTblInsertRow( tbl1, TBL_MaxRow )

--> I can click on the row header of the row

On SAM_CreateComplete
Call SalTblInsertRow( tbl1, TBL_MaxRow )
If not MTblIsSubClassed(tbl1)
Call SalMessageBox( "no", "Test", 1 )

--> I get the "no" message. Then, the click on the same row header gets me instant crash.

If you have any insight on that I will take it :)

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 1260
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: M!Table 3.0.1 has been released

Post by Dave Rabelink » 23 Jan 2019, 21:51

Hi Guillaume,

Just as an extra test. Are you able to use TD 7.1.1 x64 with your sample to see if the crash is also occurring in that version?
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Gamadil
France
Posts: 15
Joined: 11 Jan 2019, 12:01
Location: LYON, France

Re: M!Table 3.0.1 has been released

Post by Gamadil » 24 Jan 2019, 09:11

Hi Dave

This is exactly the same in 7.1.

Best regards

Gamadil
France
Posts: 15
Joined: 11 Jan 2019, 12:01
Location: LYON, France

Re: M!Table 3.0.1 has been released

Post by Gamadil » 24 Jan 2019, 09:22

And another small test :

If I create 2 tables in my windows, (tbl1 and tlb2) and use MtblIsSubClassed() only on tbl1, click on tbl2 crash all the same.
Even if I open the main window, call MtblIsSubClassed on tbl1, then open a dialog box containing another tbl3 table window -> Crash when clicking on row header on tbl3.

So calling the Mtbl function changes something for all table windows objects, may them be already created or created after the call, and even if they where never associated with any Mtbl function.

Any hint ?

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 1260
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: M!Table 3.0.1 has been released

Post by Dave Rabelink » 24 Jan 2019, 11:00

I have setup a Windows7 system with TD 7.1.1 x64 and there I get indeed the crash.
The same exe created there works on 2 Windows 10 systems.

Seems to be OS related.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Gamadil
France
Posts: 15
Joined: 11 Jan 2019, 12:01
Location: LYON, France

Re: M!Table 3.0.1 has been released

Post by Gamadil » 24 Jan 2019, 11:07

Thanks ! I think I can stop searching for issues on my workstation, there is probably a problem with Windows 7.

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 1260
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: M!Table 3.0.1 has been released

Post by Dave Rabelink » 24 Jan 2019, 11:46

Ok. I investigated further.

I have to come back on my previous post, I do have a crash on 1 Windows 10 system.

So I used ProcMon on the Windows 10 system where the test application crashes and also on the system where it does not crash.

What I see is that the crash occurs just after the mtbllang files. See screenshots below:

This is the trace on the non-crashing situation:
NoCrash.png

Here the crash log:
Crash.png

Maybe this can help Michael to pinpoint the issue. Could be something related to the language functionality.
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Gamadil
France
Posts: 15
Joined: 11 Jan 2019, 12:01
Location: LYON, France

Re: M!Table 3.0.1 has been released

Post by Gamadil » 24 Jan 2019, 13:50

Hi

Good idea... did the same and get slightly different result with W7/CTD7.0. At the moment I click on the row header I start getting RegQueryKey orders, then IRP_MJ_READ on mfc110u.dll (probably an mtbl call), then IRP_MJ_QUERY_INFORMATION on my executable, and... crash.
crash.png
You do not have the required permissions to view the files attached to this post.

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 1260
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: M!Table 3.0.1 has been released

Post by Dave Rabelink » 24 Jan 2019, 14:33

Well, in my situation I get a crash immediately when starting the sample executable, so not only when clicking on headers.

I created a sample, just one form and one table which subclasses MTbl on create of the table. Build exe and placed in the TD runtime folder along with the MTable dll's.
The crashing executable is on Win7 and on one Win10 machine when starting it.
The other Win10 machine it runs ok and I can also click the headers.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

micsto
Germany
Posts: 748
Joined: 07 Mar 2017, 16:07
Location: Germany

Re: M!Table 3.0.1 has been released

Post by micsto » 30 Jan 2019, 10:32

@Dave
M!Table registers the default language files ( mtbllang.de and mtbllang.en) on "startup", more precisely it's the last action in DllMain.
I don't think that this causes the crash, because M!Table simply checks if the file exists and - if so - inserts an entry into a language map ( STL object ).

@Gamadil
M!Table doesn't read the registry.

We're ( of course :mrgreen: ) using M!Table in our applications, and there are no problems throughout the company, and we're talking about aprox. 100 users.
However, we don't have any Windows 7 workstations.

I could provide the sourcecode so that one of you could debug M!Table in his environment (Visual Studio 2013 required)...

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 0 guests