Original War Support Bug Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report #24  -  Canvas does not allow drawing
Posted Mar 04, 2014 - updated Mar 23, 2015
action_vote_minus_faded.png
0
Votes
action_vote_plus_faded.png
icon_info.png This issue has been closed with status "Fixed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Bug report
  • Status
     
    Fixed
  • Assigned to
     Stucuk
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     kalinkus27@onet.pl
  • Owned by
    Not owned by anyone
  • Estimated time
    Not estimated
  • Time spent
    No time spent
  • Category
    Patch Installer
  • Resolution
    RESOLVED
  • Priority
    Not determined
  • Reproducability
    Not determined
  • Severity
    Not determined
  • Targetted for
    icon_milestones.png Not determined
Issue description
While installing lastest patch:
  1. General Info
  2. ------------
  3. Setup Name : Original War v1.12.10.1 Patch
  4. Setup EXE Name : OWPatch_1.12.10.1.exe
  5.  
  6. Pak Info
  7. --------
  8. ID : OWPF
  9. Version : 1
  10. Count : 8570
  11.  
  12. ErrorType : Setup Thread
  13. ErrorText : Canvas does not allow drawing
  14.  
  15. Params :
  16. ParamCount : 0
  17.  
  18. Windows Info
  19. ------------
  20. Product : Windows 7
  21. BuildNumber : 7601
  22. ServicePack : Service Pack 1
  23. ServicePackMajor : 1
  24. ServicePackMinor : 0
  25.  
  26. Physical Memory : 4096MB
  27. CPU Speed : 3093Mhz
Steps to reproduce this issue
podczas wybrania folderu docelowego podczas instalacji wyskoczył błąd

#3
Comment posted by
 Stucuk
Mar 04, 23:23
If you run the patch with -silent as a parameter it will install without using a GUI. Note that if you run it with the parameter that you can not close the patch until its finished or the OWP files will become corrupt. It displays a message when its finished installing.
#6
Comment posted by
 jmwatt
May 15, 05:39
I am having this bug under wine 1.7.2 on Open Suse Linux 13.1 on a version that was purchased from steam. I realize that this isn't exactly a supported configuration but I imagine it also effects windows users.

I at one point was able to get 1.12.2's patch to install under wine but I have not been able to get later ones to install due to this bug. It appears that part of the code that writes the status of the update to the screen tries to write to somewhere it shouldn't and creates that error and that the error is a regression in the installer. The error occurs near when the message "Writing data1.owp`s Header" is shown.

Also, the setup.exe that was released as a workaround causes an insert disk2 message that cannot be bypassed when used with the -silent option.

General Info
------------
Setup Name : Original War v1.12.10.1 Patch
Setup EXE Name : OWPatch_1.12.10.1.exe

Pak Info
--------
ID : OWPF
Version : 1
Count : 8570

ErrorType : Setup Thread
ErrorText : Canvas does not allow drawing

Params : OWPATCH_1.12.10.1.EXE --SILENT
ParamCount : 2

Windows Info
------------
Product : Windows XP Professional
BuildNumber : 2600
ServicePack : Service Pack 3
ServicePackMajor : 3
ServicePackMinor : 0

Physical Memory : 2048MB
CPU Speed : 3470Mhz


#7
Comment posted by
 Stucuk
icon_reply.pngMay 15, 07:05, in reply to comment #6
To use silent mode its a single - not double. So you want the parameters to be:

OWPATCH_1.12.10.1.EXE -SILENT

That will make it not use any GUI which gets around the problem (One which i have never been able to re-produce on Windows XP or Windows 7 on 2 different PC's). The bug seems to be more apparent through WINE than through Windows.

If you don't want the insert disk2 message(Which shouldn't cause any problems) you just need to copy all the OWP's from disk 2 into the folder called Disk2 in the installation directory. By default the CD versions of Original War didn't install all of the games files and kept them on Disk 2. Digital versions should never ask for Disk 2 as they install all files to the hard drive.
#8
Comment posted by
 jmwatt
icon_reply.pngMay 15, 07:15, in reply to comment #7


Stucuk wrote:
To use silent mode its a single - not double. So you want the parameters to
be:

OWPATCH_1.12.10.1.EXE -SILENT

That will make it not use any GUI which gets around the problem (One which
i have never been able to re-produce on Windows XP or Windows 7 on 2
different PC's). The bug seems to be more apparent through WINE than
through Windows.

If you don't want the insert disk2 message(Which shouldn't cause any
problems) you just need to copy all the OWP's from disk 2 into the folder
called Disk2 in the installation directory. By default the CD versions of
Original War didn't install all of the games files and kept them on Disk 2.
Digital versions should never ask for Disk 2 as they install all files to
the hard drive.


It appears that something with steam makes patching difficult. I just ran the 1.12.2 patch in gui mode followed by the 1.12.10 patch with silent with a single dash and it worked. However, it appears that if you haven't recently started the game from the steam launcher instead of the command line that you get weird disk 2 messages which make the patch not run. I only have the steam version and definitely got disk 2 messages that caused the patch to fail. (I also noticed that every directory I clicked on in the 1.12.2 installer gave an access violation warning typical of some type of pointer error in the code).

I am blown away by what a good game this is and absolutely in awe of your effort to support it so many years later. Kudos, cheers, and thanks!

#9
Comment posted by
 Stucuk
icon_reply.pngMay 15, 08:30, in reply to comment #8
Well if you run it through steam it will set the registry entries for where OW is installed(Patches use this over the default directory programmed into them if it exists). If you have the access violations i can try and trace them, but since its running through WINE it could simply be a WINE error.
#10
Comment posted by
 Radzio
May 26, 08:49
http://bugs.winehq.org/show_bug.cgi?id=36523

But since the same thing appears on some Windows installs, I guess this is a bug in the patch installer. It helps to run it with one thread.
#11
Comment posted by
 Stucuk
icon_reply.pngMay 26, 10:00, in reply to comment #10
http://forum.stucuk.net/viewtopic.php?t=2651

Already seen the WINE report, and already done something about it. Btw it should run in a single thread as the setup tries to make it run on the first core(Though it seems WINE ignores it).
#12
Comment posted by
 Radzio
May 26, 13:03
Yeah, but there must be some history in the bug report. :D

I guess you could share the way you tried to force it to run on one core only because it could be useful to fix a possible flaw in Wine.
#15
Comment posted by
 Stucuk
icon_reply.pngMay 26, 17:21, in reply to comment #12
  1. procedure ForceSingleCore;
  2. begin
  3. try
  4. SetProcessAffinityMask(GetCurrentProcess(),$01);
  5. except
  6. asm nop end;
  7. end;
  8. end;
#16
Comment posted by
 Radzio
May 26, 18:16
http://source.winehq.org/WineAPI/kernel32.html

This function is implemented in Wine and I couldn't google that it is broken. It is rather fully functional. Moreover, some Windows installs are affected so it is probably not the problem anyway.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms686223%28v=vs.85%29.aspx

Since this is just a plain Windows function, it does not throw any exceptions. And your catch block is pointless.

Maybe try some remarks from the above documentation? I am about these in particular:
If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

If the process affinity mask requests a processor that is not configured in the system, the last error code is ERROR_INVALID_PARAMETER.

A process affinity mask is a bit vector in which each bit represents a logical processor on which the threads of the process are allowed to run. The value of the process affinity mask must be a subset of the system affinity mask values obtained by the GetProcessAffinityMask function. A process is only allowed to run on the processors configured into a system. Therefore, the process affinity mask cannot specify a 1 bit for a processor when the system affinity mask specifies a 0 bit for that processor.
#17
Comment posted by
 Stucuk
icon_reply.pngMay 28, 01:24, in reply to comment #16
All it does is set the mask to the first processor. As long as its a duel core or higher its going to be a valid id. It has nothing to do with the problem, its just the code i use to set the app to use a single core.

The catch code is very old and isn't harming anyone.
#18
Comment posted by
 Radzio
May 28, 04:52
But it seems not to work in Wine or some Windows installs.
#19
Comment posted by
 Stucuk
icon_reply.pngMay 28, 21:01, in reply to comment #18
WINE isn't perfect. Code works fine on Windows 7 on a AMD FX 8350. Task Manager (Once it has admin rights) shows only the first CPU selected.

Technically if you have a CPU which has core 1 disabled (CPU makers don't waste faulty CPU's they just disable the faulty cores and sell them as lower core versions) then it may not work. But that doesn't explain WINE.

#20
Comment posted by
 Radzio
May 29, 04:22
Nothing's perfect. ;-)

You could just log the error so we could see the reason. I can try it on Wine.
#21
Comment posted by
 Stucuk
icon_reply.pngMay 29, 08:07, in reply to comment #20
You can easily create a delphi application that uses the code and debug it fully without me having to keep sending you new versions with slight changes.