Huw & Jon,
Sorry - ignore my previous post - I thought Ubuntu 11 was the issue, not
SW203bx
I also get the divide by 0 error with my setup (10.10) on SW203b6
···
--
regards,
Malcolm Osborne
Sedgefield, South Africa
Huw & Jon,
Sorry - ignore my previous post - I thought Ubuntu 11 was the issue, not
SW203bx
I also get the divide by 0 error with my setup (10.10) on SW203b6
--
regards,
Malcolm Osborne
Sedgefield, South Africa
I finally tried it on Ubuntu Natty (11.04). The program opened, but when I tried to open a past series I the division by zero error:
Exception occurred at address 68477FF5
Exception code C0000094: Division by zero
Process PID=31 Image: C:\Program Files\Sailwave\sailwave.exe
Thread 1 Handle=00000054 TID=32
EAX=00000000 EBX=684FCFF4 ECX=00000000 EDX=00000000
ESI=001682D8 EDI=00000000 EBP=0033C69C ESP=0033C664
EIP=68477FF5 FLG=00210246
Call Stack:
68477FF5
6847BA46
684DC4FB
684DC36A
684DCABC
684DF24A
005A98E8
684DCABC
684DF0CD
6849F181
It’s quite do-able to set the necessary DLL exceptions for Sailwave in Wine, if someone can figure out which DLL is causing the crash.
— In sailwave@yahoogroups.com, Malcolm Osborne <malcolmo@…> wrote:
Huw & Jon,
Sorry - ignore my previous post - I thought Ubuntu 11 was the issue, not
SW203bxI also get the divide by 0 error with my setup (10.10) on SW203b6
–
regards,
Malcolm Osborne
Sedgefield, South Africa
Hi,
Done a bit of investigation as to why Wine is crashing. The call that is causing it is a CallWindowProcA with a message of EM_SETSEL wtih a start and end position of 0. This call is to the USER32.DLL.
This call should set the cursor position to the start of the text/edit control
I tracked this down to the code below which is from the Wine source code. for Wine 1.3.20 (which still exhibits the problem)
static inline INT get_vertical_line_count(EDITSTATE *es)
{
INT vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height;
return max(1,vlc);
}
It appears that the line_height is 0. hence the divide by 0 error
It also only seems to call this function for Multi-Line text / edit controls
At a guess this is the new compiler that Colin is using is producing some unusual code but as Windows does not produce an error I guess Wine should handle it also.
I’m not a linux man although I’m sure with a bit of work I could give you a hacked USER32.DLL that would fix it, but it needs to get fixed in the Wine code so its fixed for future releases. Any Volunteers?
Jon
On 20 May 2011 23:04, Malcolm Osborne malcolmo@telkomsa.net wrote:
Huw & Jon,
Sorry - ignore my previous post - I thought Ubuntu 11 was the issue, not
SW203bxI also get the divide by 0 error with my setup (10.10) on SW203b6
–
regards,
Malcolm Osborne
Sedgefield, South Africa
Hi
Below is a link to a new user32.dll that I created which stops the crash of the new sailwave when running under wine.
http://dl.dropbox.com/u/220425/user32.dll
In Ubuntu go - Applications - Wine - Browse C: Drive
Open the windows folder then the system32 folder
in there you will find the file user32.dll rename this to user32org.dll or anything you wish
then download the file from the link above and put it in the system32 folder
Don’t know if it will work under other builds
Tested it under Ubuntu 11.04 and seems OK
if it doesn’t work delete it and rename the orginal back to user32.dll
Let me know how it goes
Jon
On 21 May 2011 16:20, Jon Eskdale jon@eskdale.org wrote:
Hi,
Done a bit of investigation as to why Wine is crashing. The call that is causing it is a CallWindowProcA with a message of EM_SETSEL wtih a start and end position of 0. This call is to the USER32.DLL.
This call should set the cursor position to the start of the text/edit controlI tracked this down to the code below which is from the Wine source code. for Wine 1.3.20 (which still exhibits the problem)
static inline INT get_vertical_line_count(EDITSTATE *es)
{
INT vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height;return max(1,vlc);
}
It appears that the line_height is 0. hence the divide by 0 error
It also only seems to call this function for Multi-Line text / edit controlsAt a guess this is the new compiler that Colin is using is producing some unusual code but as Windows does not produce an error I guess Wine should handle it also.
I’m not a linux man although I’m sure with a bit of work I could give you a hacked USER32.DLL that would fix it, but it needs to get fixed in the Wine code so its fixed for future releases. Any Volunteers?
Jon
On 20 May 2011 23:04, Malcolm Osborne malcolmo@telkomsa.net wrote:
Huw & Jon,
Sorry - ignore my previous post - I thought Ubuntu 11 was the issue, not
SW203bxI also get the divide by 0 error with my setup (10.10) on SW203b6
–
regards,
Malcolm Osborne
Sedgefield, South Africa
Before you get too excited there are some other files which I will need to post. It does work on my machine but don’t try it yet I’ll update it when I have the correct files
Jon
On 21 May 2011 20:38, Jon Eskdale jon@eskdale.org wrote:
Hi
Below is a link to a new user32.dll that I created which stops the crash of the new sailwave when running under wine.http://dl.dropbox.com/u/220425/user32.dll
In Ubuntu go - Applications - Wine - Browse C: Drive
Open the windows folder then the system32 folder
in there you will find the file user32.dll rename this to user32org.dll or anything you wish
then download the file from the link above and put it in the system32 folderDon’t know if it will work under other builds
Tested it under Ubuntu 11.04 and seems OK
if it doesn’t work delete it and rename the orginal back to user32.dll
Let me know how it goes
Jon
On 21 May 2011 16:20, Jon Eskdale jon@eskdale.org wrote:
Hi,
Done a bit of investigation as to why Wine is crashing. The call that is causing it is a CallWindowProcA with a message of EM_SETSEL wtih a start and end position of 0. This call is to the USER32.DLL.
This call should set the cursor position to the start of the text/edit controlI tracked this down to the code below which is from the Wine source code. for Wine 1.3.20 (which still exhibits the problem)
static inline INT get_vertical_line_count(EDITSTATE *es)
{
INT vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height;return max(1,vlc);
}
It appears that the line_height is 0. hence the divide by 0 error
It also only seems to call this function for Multi-Line text / edit controlsAt a guess this is the new compiler that Colin is using is producing some unusual code but as Windows does not produce an error I guess Wine should handle it also.
I’m not a linux man although I’m sure with a bit of work I could give you a hacked USER32.DLL that would fix it, but it needs to get fixed in the Wine code so its fixed for future releases. Any Volunteers?
Jon
On 20 May 2011 23:04, Malcolm Osborne malcolmo@telkomsa.net wrote:
Huw & Jon,
Sorry - ignore my previous post - I thought Ubuntu 11 was the issue, not
SW203bxI also get the divide by 0 error with my setup (10.10) on SW203b6
–
regards,
Malcolm Osborne
Sedgefield, South Africa
It looks like user32.dll can't be overridden in WINE, so it'll have to be a fixed DLL to resolve the problem.
http://www.winehq.org/docs/wineusr-guide/config-wine-main
Thanks Jon, let us know when you are ready for testing. When this is working to everyone's satisfaction, one of us can create a script that can be run to fix a Wine installation so Sailwave will work properly. I think the chances are very good that a Wine update will overwrite USER32.DLL - it appears to be fairly core to the program. I guess whatever fix script that gets written will have to be run after any update.
Hummm, does anyone know the order that is used in searching for DLLs? Perhaps the hacked DLL can be put in the Sailwave program folder.
http://dl.dropbox.com/u/220425/user32.dll
In Ubuntu go - Applications - Wine - Browse C: Drive
Open the windows folder then the system32 folder
in there you will find the file user32.dll rename this to user32org.dll or
anything you wish
then download the file from the link above and put it in the system32 folderDon't know if it will work under other builds
Tested it under Ubuntu 11.04 and seems OK
if it doesn't work delete it and rename the orginal back to user32.dll
Let me know how it goes
Jon
Hi Andy,
You are correct the user32.dll can’t be overwritten using the Wine Gui as it is one of the core dll’s
This one I created is for Ubuntu 11.04 and V1.3.20 of wine. Whether it will work with 10 I don’t know as it is one of the main dlls
http://dl.dropbox.com/u/220425/user32.dll.so
This is my modified dll which needs to go into
/usr/local/lib/wine
and this is the fake dll that Wine uses to go with it (The way that wine works is it has fake dlls )
http://dl.dropbox.com/u/220425/user32.dll
This goes into
/usr/local/lib/wine/fakedlls
It is also the same one that goes into the windows\system32 directory so you may want to copy it there also, but my system copies it there on its own (sometimes)
You will need admin rights to write to these directories
Let me know how it goes.
So ideally to support all the different variants of linux a fix really needs to go into the Wine source code, but may be now Colin knows the area of the problem he may be able to change Sailwave to work - If its the new compiler that may not be easy.
Jon
On 22 May 2011 12:44, Andy andy@sailor.nu wrote:
It looks like user32.dll can’t be overridden in WINE, so it’ll have to be a fixed DLL to resolve the problem.
http://www.winehq.org/docs/wineusr-guide/config-wine-main
Thanks Jon, let us know when you are ready for testing. When this is working to everyone’s satisfaction, one of us can create a script that can be run to fix a Wine installation so Sailwave will work properly. I think the chances are very good that a Wine update will overwrite USER32.DLL - it appears to be fairly core to the program. I guess whatever fix script that gets written will have to be run after any update.
Hummm, does anyone know the order that is used in searching for DLLs? Perhaps the hacked DLL can be put in the Sailwave program folder.
In Ubuntu go - Applications - Wine - Browse C: Drive
Open the windows folder then the system32 folder
in there you will find the file user32.dll rename this to user32org.dll or
anything you wish
then download the file from the link above and put it in the system32 folder
Don’t know if it will work under other builds
Tested it under Ubuntu 11.04 and seems OK
if it doesn’t work delete it and rename the orginal back to user32.dll
Let me know how it goes
Jon
Thanks Jon,
Okay, files copied. I'm using 1.3.15 version of Wine. Lib directories are somewhat different for me - they are /usr/lib/wine and /usr/lib/wine/fakedlls. I also manually copied into \windows\system32.
I haven't tested all functions yet, but a past series opens no problem, which was crashing previously. I'll run a few tests.
Was your fix to the DLL generic enough that it would be accepted by WineHQ?
http://dl.dropbox.com/u/220425/user32.dll.so
This is my modified dll which needs to go into
/usr/local/lib/wine
Hi Andy,
I have the directories you mention as well but I guess its because I downloaded all the source for Wine and recompiled it that it has put it in the local directory. As I mentioned before I have very limited linux knowledge - Happy with assembly language though and at least thats the same for Linux and windows!
All I did for the fix was to make the value 1 if it was 0 using the max function as that was just a single line of code
0 divided by 1 gives 0 where as the 0/0 gives an exception
It’s a simple fix but whether the real solution is to check the size of the control and then not call the function is the question - Even though its more elegant its more code - I just went for the easy fix - especially as I had the challenge of compiling Wine to deal with.
Jon
On 23 May 2011 13:40, Andy andy@sailor.nu wrote:
Thanks Jon,
Okay, files copied. I’m using 1.3.15 version of Wine. Lib directories are somewhat different for me - they are /usr/lib/wine and /usr/lib/wine/fakedlls. I also manually copied into \windows\system32.
I haven’t tested all functions yet, but a past series opens no problem, which was crashing previously. I’ll run a few tests.
Was your fix to the DLL generic enough that it would be accepted by WineHQ?
http://dl.dropbox.com/u/220425/user32.dll.so
This is my modified dll which needs to go into
/usr/local/lib/wine